/* ===================================
   ARCHITECTURAL STUDIO CSS
   Theme: Racing Red & Charcoal
   Primary: #D32F2F | Secondary: #263238
   =================================== */

/* ===== ROOT VARIABLES ===== */
:root {
  --primary-color: #D32F2F;
  --secondary-color: #263238;
  --dark-charcoal: #1a1f23;
  --light-gray: #f5f5f5;
  --white: #ffffff;
  --transition-speed: 0.3s;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  --hover-shadow: 0 15px 40px rgba(211, 47, 47, 0.3);
}

/* ===== GLOBAL STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--secondary-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  font-weight: 700 !important;
  letter-spacing: -1px;
  color: var(--secondary-color) !important;
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
}

/* ===== NAVIGATION ===== */
.navbar {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--dark-charcoal) 100%) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  padding: 1rem 0;
  transition: all var(--transition-speed) ease;
}

.navbar.sticky-top {
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-size: 1.8rem !important;
  color: var(--white) !important;
  transition: transform var(--transition-speed) ease;
  font-weight: 700 !important;
}

.navbar-brand:hover {
  transform: translateX(5px);
  color: var(--primary-color) !important;
}

.navbar-brand .bi {
  color: var(--primary-color) !important;
  animation: pulse 2s infinite;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500 !important;
  padding: 0.5rem 1.2rem !important;
  margin: 0 0.2rem;
  border-radius: 8px;
  transition: all var(--transition-speed) ease;
  position: relative;
}

.navbar-dark .navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--primary-color);
  transition: width var(--transition-speed) ease;
}

.navbar-dark .navbar-nav .nav-link:hover::before,
.navbar-dark .navbar-nav .nav-link.active::before {
  width: 80%;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  background: rgba(211, 47, 47, 0.1);
  transform: translateY(-2px);
}

.navbar-toggler {
  border: 2px solid var(--primary-color) !important;
  padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.25) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(211, 47, 47, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--dark-charcoal) 50%, #1a1f23 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(211, 47, 47, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(211, 47, 47, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite reverse;
}

.hero-section .text-white {
  color: var(--white) !important;
  z-index: 2;
}

.hero-section .display-2 {
  color: var(--white) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease;
}

.hero-section .lead {
  color: rgba(255, 255, 255, 0.95) !important;
  animation: fadeInUp 1.2s ease;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-section .fs-5 {
  color: rgba(255, 255, 255, 0.9) !important;
  animation: fadeInUp 1.4s ease;
}

/* ===== BUTTONS ===== */
.btn {
  font-weight: 600 !important;
  border-radius: 50px;
  transition: all var(--transition-speed) ease;
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-lg {
  background: var(--primary-color) !important;
  color: var(--white) !important;
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
  border: 2px solid var(--primary-color) !important;
}

.btn-lg:hover {
  background: #b71c1c !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(211, 47, 47, 0.5) !important;
  color: var(--white) !important;
}

.btn-light {
  background: var(--white) !important;
  color: var(--secondary-color) !important;
  border: 2px solid var(--white) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-light:hover {
  background: var(--primary-color) !important;
  color: var(--white) !important;
  border-color: var(--primary-color) !important;
  transform: translateY(-3px);
}

.btn-outline-light {
  color: var(--white) !important;
  border: 2px solid var(--white) !important;
  background: transparent !important;
}

.btn-outline-light:hover {
  background: var(--white) !important;
  color: var(--secondary-color) !important;
  transform: translateY(-3px);
}

.btn-outline-dark {
  color: var(--secondary-color) !important;
  border: 2px solid var(--secondary-color) !important;
  background: transparent !important;
}

.btn-outline-dark:hover {
  background: var(--secondary-color) !important;
  color: var(--white) !important;
  transform: translateY(-3px);
}

.btn-sm {
  background: var(--primary-color) !important;
  color: var(--white) !important;
  border: 2px solid var(--primary-color) !important;
  padding: 0.4rem 1.2rem !important;
}

.btn-sm:hover {
  background: #b71c1c !important;
  color: var(--white) !important;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  background: var(--white);
  border-radius: 15px;
  transition: all var(--transition-speed) ease;
  cursor: pointer;
  border: 2px solid transparent;
  height: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), #ff5252);
  transform: scaleX(0);
  transition: transform var(--transition-speed) ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary-color);
}

.service-card .bi {
  color: var(--primary-color) !important;
  transition: all var(--transition-speed) ease;
}

.service-card:hover .bi {
  transform: scale(1.2) rotate(5deg);
  animation: pulse 1s infinite;
}

.service-card h3,
.service-card h4,
.service-card .h4 {
  color: var(--secondary-color) !important;
  font-weight: 700;
  margin-top: 1rem;
}

.service-card p {
  color: #546e7a !important;
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.1), rgba(211, 47, 47, 0.05));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: all var(--transition-speed) ease;
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--primary-color), #ff5252);
}

.service-card:hover .service-icon .bi {
  color: var(--white) !important;
}

.service-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.95), rgba(38, 50, 56, 0.95));
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-speed) ease;
  border-radius: 15px;
}

.service-card:hover .service-hover-overlay {
  opacity: 1;
}

.service-details {
  color: var(--white) !important;
}

/* ===== CARDS ===== */
.card {
  border: none !important;
  border-radius: 15px;
  overflow: hidden;
  transition: all var(--transition-speed) ease;
  background: var(--white);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--hover-shadow);
}

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--secondary-color) !important;
  font-weight: 700;
}

.shadow-sm {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
  box-shadow: var(--box-shadow) !important;
}

.shadow-lg {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2) !important;
}

/* ===== HOVER EFFECTS ===== */
.hover-lift {
  transition: all var(--transition-speed) ease;
}

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: var(--hover-shadow);
}

/* ===== BACKGROUND COLORS ===== */
.bg-light {
  background: #fafafa !important;
}

/* ===== TEXT COLORS ===== */
.text-light {
  color: rgba(255, 255, 255, 0.9) !important;
}

.text-white {
  color: var(--white) !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.5) !important;
}

.text-muted {
  color: #78909c !important;
}

/* ===== POSITION FIXED ELEMENTS ===== */
.position-fixed {
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), #ff5252) !important;
  color: var(--white) !important;
  border: none;
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
  z-index: 1000;
  transition: all var(--transition-speed) ease;
  cursor: pointer;
}

.position-fixed:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 30px rgba(211, 47, 47, 0.6);
}

/* ===== IMAGES ===== */
.img-fluid {
  transition: all var(--transition-speed) ease;
}

.img-fluid:hover {
  transform: scale(1.05);
}

.rounded {
  border-radius: 15px !important;
}

/* ===== ICONS ===== */
.bi {
  display: inline-block;
  vertical-align: middle;
}

.bi-check-circle-fill {
  color: var(--primary-color) !important;
}

/* ===== STATS SECTION ===== */
.col-6 {
  transition: all var(--transition-speed) ease;
}

.col-6:hover {
  transform: scale(1.05);
}

.col-6 .display-4,
.col-6 .display-6 {
  color: var(--primary-color) !important;
  font-weight: 800;
}

/* ===== FORMS ===== */
.form-control,
.form-select,
.form-control-lg,
.form-select-lg {
  border: 2px solid #e0e0e0 !important;
  border-radius: 10px !important;
  padding: 0.75rem 1rem !important;
  transition: all var(--transition-speed) ease;
  background: var(--white) !important;
  color: var(--secondary-color) !important;
}

.form-control:focus,
.form-select:focus,
.form-control-lg:focus,
.form-select-lg:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.15) !important;
  background: var(--white) !important;
}

.form-label {
  font-weight: 600;
  color: var(--secondary-color) !important;
  margin-bottom: 0.5rem;
}

.form-check-input {
  border: 2px solid #e0e0e0 !important;
  width: 1.5rem;
  height: 1.5rem;
}

.form-check-input:checked {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.15) !important;
}

.form-check-label {
  color: var(--secondary-color) !important;
  margin-left: 0.5rem;
}

/* ===== ALERTS ===== */
.alert {
  border-radius: 10px;
  border: none;
  padding: 1.5rem;
}

.alert-info {
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.1), rgba(211, 47, 47, 0.05)) !important;
  color: var(--secondary-color) !important;
  border-left: 4px solid var(--primary-color);
}

.alert-heading {
  color: var(--primary-color) !important;
  font-weight: 700;
}

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--dark-charcoal) 100%);
  color: rgba(255, 255, 255, 0.9) !important;
}

footer h5 {
  color: var(--white) !important;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
}

footer .list-unstyled li {
  margin-bottom: 0.75rem;
}

footer a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none;
  transition: all var(--transition-speed) ease;
  position: relative;
  display: inline-block;
}

footer a:hover {
  color: var(--primary-color) !important;
  padding-left: 5px;
}

footer .bi {
  color: var(--primary-color) !important;
  margin-right: 0.5rem;
}

footer .bi-facebook:hover,
footer .bi-instagram:hover,
footer .bi-twitter:hover,
footer .bi-youtube:hover {
  transform: scale(1.3);
  color: var(--white) !important;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: transparent !important;
  padding: 0;
  margin: 0;
}

.breadcrumb-item {
  color: rgba(255, 255, 255, 0.7) !important;
}

.breadcrumb-item.active {
  color: var(--white) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* ===== ACCORDION ===== */
.accordion-item {
  border: none !important;
  margin-bottom: 1rem;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.accordion-button {
  background: var(--white) !important;
  color: var(--secondary-color) !important;
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  border: none !important;
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, var(--primary-color), #ff5252) !important;
  color: var(--white) !important;
  box-shadow: none !important;
}

.accordion-button:focus {
  box-shadow: none !important;
  border: none !important;
}

.accordion-button::after {
  filter: brightness(0) invert(0.4);
}

.accordion-button:not(.collapsed)::after {
  filter: brightness(0) invert(1);
}

.accordion-body {
  padding: 1.5rem;
  background: var(--white);
  color: #546e7a !important;
}

/* ===== BADGES ===== */
.badge {
  background: var(--primary-color) !important;
  color: var(--white) !important;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--secondary-color), var(--dark-charcoal));
  color: var(--white) !important;
  padding: 1.5rem 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  animation: slideUp 0.5s ease;
}

.cookie-banner p {
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ===== UTILITY CLASSES ===== */
.opacity-25 {
  opacity: 0.25 !important;
}

.opacity-75 {
  opacity: 0.75 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fst-italic {
  font-style: italic !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(26, 31, 35, 0.98);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .navbar-nav {
    gap: 0.5rem;
  }

  .display-2 {
    font-size: 2.5rem !important;
  }

  .display-3 {
    font-size: 2rem !important;
  }

  .display-4 {
    font-size: 1.75rem !important;
  }

  .display-5 {
    font-size: 1.5rem !important;
  }

  .hero-section {
    min-height: 90vh;
    padding-top: 80px;
  }

  .position-fixed {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }

  .service-card {
    margin-bottom: 1.5rem;
  }

  .btn-lg {
    padding: 0.75rem 2rem !important;
    font-size: 1rem !important;
  }
}

@media (max-width: 767.98px) {
  .display-2 {
    font-size: 2rem !important;
  }

  .lead {
    font-size: 1.1rem !important;
  }

  .hero-section::before,
  .hero-section::after {
    width: 300px;
    height: 300px;
  }

  .col-md-4,
  .col-md-6,
  .col-md-8,
  .col-md-9,
  .col-md-12 {
    margin-bottom: 1rem;
  }

  footer h5::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .text-md-start,
  .text-md-end {
    text-align: center !important;
  }
}

@media (max-width: 575.98px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .display-2 {
    font-size: 1.75rem !important;
  }

  .btn-lg {
    padding: 0.6rem 1.5rem !important;
    font-size: 0.9rem !important;
  }

  .service-card {
    padding: 1.5rem !important;
  }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b71c1c;
}

/* ===== SELECTION ===== */
::selection {
  background: var(--primary-color);
  color: var(--white);
}

::-moz-selection {
  background: var(--primary-color);
  color: var(--white);
}

/* ===== FOCUS STATES ===== */
a:focus,
button:focus,
.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

/* ===== LOADING ANIMATION ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ===== PRINT STYLES ===== */
@media print {
  .navbar,
  .position-fixed,
  .cookie-banner,
  footer {
    display: none !important;
  }
}