/* ===== GLOBAL STYLES & VARIABLES ===== */
:root {
  /* Brand Colors */
  --primary-red: #e63946;
  --primary-black: #1a1a1a;
  --primary-white: #ffffff;
  --primary-yellow: #ffd166;
  --primary-green: #a8dadc;
  --dark-red: #c1121f;
  --light-gray: #f8f9fa;
  --text-color: #333333;
  --border-color: #e0e0e0;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--primary-white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1;
  /* CRUCIAL ADDITIONS FOR LAYOUT AND FOOTER */
  display: flex;
  flex-direction: column;
  min-height: 0; /* Prevents content from being cut off in flex containers */
  /* END CRUCIAL ADDITIONS */
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Background Utility Classes */
.light-gray-bg {
  background-color: var(--light-gray);
}
.white-bg {
  background-color: var(--primary-white);
}

/* Text Highlights */
.text-highlight {
  color: var(--primary-red);
}
.primary-yellow {
  color: var(--primary-yellow);
}

/* ===== BUTTON STYLES ===== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-red);
  color: var(--primary-white);
  border: 2px solid var(--primary-red);
}

.btn-primary:hover {
  background-color: var(--dark-red);
  border-color: var(--dark-red);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
}

.btn-secondary:hover {
  background-color: var(--primary-red);
  color: var(--primary-white);
}

.btn-light {
  background-color: var(--primary-white);
  color: var(--primary-red);
  border: 2px solid var(--primary-white);
}

.btn-light:hover {
  background-color: transparent;
  color: var(--primary-white);
}

.btn-centered {
  display: block;
  margin: 30px auto 0 auto;
  width: fit-content;
}

/* ===== HEADER & NAVIGATION ===== */
.main-header {
  background-color: var(--primary-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  width: 100%;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo-img {
  height: 80px;
  width: auto;
  transition: all 0.3s ease;
}

.main-nav {
    display: flex; /* Default to flex for desktop */
    align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-link {
  color: var(--primary-black);
  text-decoration: none;
  padding: 10px 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-red);
}

.nav-link.active {
  color: var(--primary-red);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 15px;
  width: calc(100% - 30px);
  height: 2px;
  background-color: var(--primary-red);
}

.mobile-menu-toggle {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
  position: relative; /* Needed for span positioning */
  
  /* NEW STYLES FOR BUTTON AESTHETICS */
  padding: 8px; /* Add padding around the bars */
  border: 1px solid var(--border-color); /* Subtle border */
  border-radius: 8px; /* Rounded corners */
  background-color: var(--light-gray); /* Light background */
  transition: all 0.3s ease; /* Smooth transition for hover effects */
}

.mobile-menu-toggle:hover {
    background-color: var(--primary-red); /* Red background on hover */
    border-color: var(--primary-red); /* Red border on hover */
}

.mobile-menu-toggle:hover span {
    background-color: var(--primary-white); /* White bars on hover */
}


.mobile-menu-toggle span {
  height: 3px;
  width: 100%;
  background-color: var(--primary-black); /* Default bar color */
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Hamburger to X animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background-color: var(--primary-white); /* Ensure white when active */
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    background-color: var(--primary-white); /* Ensure white when active */
}


/* ===== HERO SECTION (This will be moved to index.css) ===== */
/* This section is here because it was in your working main.css, but will be moved */
.hero {
  background: linear-gradient(rgba(26, 26, 26, 0.85), rgba(26, 26, 26, 0.85)),
    url('/assets/images/hero-bg.jpg') no-repeat center center/cover;
  color: var(--primary-white);
  padding: 180px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: 3.2rem;
  margin-bottom: 25px;
  line-height: 1.2;
  font-weight: 700;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* ===== GENERAL SECTION STYLING (Used by multiple public pages) ===== */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  position: relative;
  font-weight: 700;
  color: var(--primary-black);
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 5px;
  background-color: var(--primary-yellow);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* ===== SERVICE CARDS (General Styling - used on index.html) ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  background-color: var(--primary-white);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-left: 4px solid var(--primary-red);
  display: block;
  text-decoration: none;
  color: var(--text-color);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--primary-green);
  color: var(--primary-white);
  font-size: 2.5em;
}

.service-card h3 {
  margin-bottom: 15px;
  color: var(--primary-black);
  font-size: 1.4em;
  font-weight: 600;
}
.service-card p {
  font-size: 0.95em;
  line-height: 1.7;
  opacity: 0.9;
}

/* ===== TESTIMONIAL SLIDER (General Styling - used on index.html) ===== */
/* Note: The testimonial-slider specific layout will be moved to index.css,
   but the general card and button styles can remain here if they are truly global. */
.testimonials-section {
  padding: 80px 0;
  position: relative;
}

.slider-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
}

.testimonial-slider {
  display: flex;
  gap: 30px;
  padding: 30px 0;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.testimonial-slider::-webkit-scrollbar {
  display: none;
}

.testimonial-card {
  flex: 0 0 calc(33.333% - 20px);
  min-width: 300px;
  background-color: var(--primary-white);
  padding: 35px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
  border-top: 5px solid var(--primary-yellow);
  scroll-snap-align: start;
}

/* Slider navigation buttons */
.slider-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(26, 26, 26, 0.7);
  color: var(--primary-white);
  border: none;
  padding: 15px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  font-size: 1.2rem;
  transition: background-color 0.3s ease;
}

.slider-button:hover {
  background-color: var(--primary-red);
}

.prev-button {
  left: 0;
}

.next-button {
  right: 0;
}

/* ===== CTA SECTION (General Styling - used on index.html and other pages) ===== */
.cta-section {
  background-color: var(--primary-red);
  color: var(--primary-white);
  padding: 80px 0;
  text-align: center;
}

.cta-content h2 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.cta-content p {
  font-size: 1.15rem;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}


/* ===== FOOTER STYLES (Global) ===== */
.main-footer {
  background-color: var(--primary-black);
  color: var(--primary-white);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo-container {
  background-color: var(--primary-white);
  padding: 12px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 20px;
}

.footer-logo {
  height: 60px;
  width: auto;
  display: block;
}

.footer-title {
  color: var(--primary-yellow);
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: 600;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--primary-white);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 5px 0;
}

.footer-links a:hover {
  color: var(--primary-yellow);
  transform: translateX(5px);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  color: var(--primary-white);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
  color: var(--primary-yellow);
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.contact-info i {
  margin-right: 10px;
  color: var(--primary-yellow);
  width: 20px;
  text-align: center;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  font-size: 13px;
}

/* ===== ANIMATIONS (Global) ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN (Global - Affects header/footer and general sections) ===== */
@media (max-width: 768px) {
  .header-content {
    flex-direction: row; /* Keep logo and toggle on one row */
    justify-content: space-between; /* Space them out */
    align-items: center;
    padding: 15px 20px; /* Add padding for mobile */
  }

  .main-nav {
    position: absolute;
    top: 100%; /* Position below the header */
    left: 0;
    width: 100%;
    background-color: var(--primary-white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex-direction: column;
    overflow: hidden; /* Hide overflow when collapsed */
    max-height: 0; /* Initially collapsed */
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
  }

  .main-nav.active {
    max-height: max-content; /* Use max-content for dynamic height */
    padding-bottom: 10px; /* Reduced padding for compactness */
  }

  .nav-list {
    display: none; /* Hide by default on mobile */
    flex-direction: column;
    width: 100%;
    margin-top: 0; /* Remove top margin */
  }

  .main-nav.active .nav-list { /* Show when main-nav is active */
    display: flex;
  }

  .nav-list li {
    width: 100%;
    text-align: center;
  }

  .nav-link {
    display: block;
    padding: 8px 20px; /* Reduced padding for compactness */
    border-bottom: 1px solid var(--border-color); /* Separator for menu items */
  }
  .nav-link:last-child {
      border-bottom: none;
  }
  .nav-link.active::after {
      display: none; /* Hide underline on mobile menu items */
  }

  .mobile-menu-toggle {
    display: flex !important; /* IMPORTANT: Force show menu toggle button on mobile */
    position: static; /* Remove absolute positioning from here as it's within header-content flex */
    transform: none; /* Remove transform from here */
  }

  /* Hero section responsive styles (will be moved to index.css) */
  .hero { /* This will be moved to index.css */
    padding: 150px 0 80px;
  }

  .hero-title { /* This will be moved to index.css */
    font-size: 2.2rem;
  }

  .hero-actions { /* This will be moved to index.css */
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  /* Testimonial slider responsive styles (will be moved to index.css) */
  .slider-container { /* This will be moved to index.css */
    padding: 0 20px;
  }

  .prev-button,
  .next-button { /* These will be moved to index.css */
    padding: 10px;
    font-size: 1rem;
  }
}

/* Form Styles (kept here as forms might be global, e.g., login, register, contact) */
.form-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 40px;
    background-color: var(--primary-white);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-container:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.form-title {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 35px;
    font-size: 2.2em;
    font-weight: 600;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 25px;
}

.form-group-compact {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

.form-group-full {
    width: 100%;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
}

.form-group-compact label,
.form-group-full label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95em;
}

.form-control-compact,
.form-control {
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--light-gray);
}

.form-control-compact:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}

textarea.form-control-compact,
textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.form-button {
    display: block;
    width: 100%;
    padding: 18px;
    background-color: var(--primary-red);
    color: var(--primary-white);
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-button:hover {
    background-color: var(--dark-red);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.form-button:active {
    transform: translateY(0);
}

.field-error {
    color: var(--primary-red);
    font-size: 0.88em;
    margin-top: 6px;
}

/* Adjust padding/margins for flash messages if needed, often handled in base.html */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

