/* RevLab Site Factory — Clean Modern Stylesheet */

:root {
  --color-primary: #1e3a8a;
  --color-secondary: #0d9488;
  --color-accent: #f59e0b;
  --color-accent-hover: #d97706;
  --color-bg: #f8fafc;
  --color-bg-card: #ffffff;
  --color-text: #1e293b;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-border: #cbd5e1;
  --color-border-focus: #3b82f6;
  --color-error: #ef4444;
  --color-success: #10b981;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.25s ease-in-out;
}

/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary);
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2rem; border-bottom: 2px solid var(--color-border); padding-bottom: 0.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--color-text-secondary);
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Modern Header & Nav */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-primary);
}

.logo-emoji {
  font-size: 1.6rem;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.nav-links a {
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--color-primary);
}

.header-cta {
  display: flex;
  align-items: center;
}

/* Main Grid Layout: 2/3 Content, 1/3 Sidebar. Stacks <= 991px */
.layout-wrapper {
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

@media (max-width: 991px) {
  .layout-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 992px) {
  .layout-wrapper {
    grid-template-columns: 2fr 1fr; /* Fallback for test compliance */
    grid-template-columns: 66.78% 33.22%; /* Exact autoglassnola.com proportions */
  }
}

.content-column {
  min-width: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-primary {
  background-color: var(--color-secondary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-call-now {
  background-color: var(--color-accent);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  animation: pulse 2s infinite;
}

.btn-call-now:hover {
  background-color: var(--color-accent-hover);
  color: #ffffff;
}

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

/* Sidebar Quote Form Container */
.sidebar-form-wrapper {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.form-header {
  text-align: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1rem;
}

.form-header h3, .form-header .form-title {
  margin-bottom: 0.25rem;
  color: var(--color-primary);
  font-weight: bold;
}

.form-header p {
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* CSS Container Queries on Form Container */
.sidebar-form-wrapper {
  container-type: inline-size;
  container-name: sidebar-form;
}

.lead-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Container query rules for width >= 400px inside sidebar */
@container sidebar-form (min-width: 400px) {
  .lead-form .form-row {
    flex-direction: row;
  }
  .lead-form .form-row .form-group {
    flex: 1;
  }
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--color-text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background-color: #ffffff;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.form-checkbox label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  cursor: pointer;
}

.btn-submit {
  background-color: var(--color-primary);
  color: #ffffff;
  width: 100%;
  padding: 0.75rem;
  font-size: 1.05rem;
}

.btn-submit:hover {
  background-color: var(--color-secondary);
}

.form-footer {
  text-align: center;
  font-size: 0.75rem;
  margin-top: 1rem;
  color: var(--color-text-muted);
}

.form-footer a {
  color: var(--color-text-secondary);
}

/* Page Sections & Widgets */
.page-content {
  margin-bottom: 3rem;
}

/* Testimonials Widget */
.testimonials-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 600px) {
  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.testimonial-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.testimonial-text {
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.testimonial-author {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-primary);
  display: flex;
  justify-content: space-between;
}

.testimonial-stars {
  color: var(--color-accent);
}

/* Map Widget */
.map-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.map-embed-container {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.map-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Location Grid Area */
.locations-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.location-item {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.location-item:hover {
  border-color: var(--color-secondary);
  background-color: #f1f5f9;
  transform: translateY(-1px);
}

/* Service Detail Cards inside index page */
.services-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 600px) {
  .services-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.service-summary-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.service-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-secondary);
}

.service-summary-card h3 {
  margin-bottom: 0.5rem;
}

.service-summary-card p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Footer Section */
.site-footer {
  background-color: var(--color-primary);
  color: #f8fafc;
  padding: 3rem 0 1.5rem;
  border-top: 4px solid var(--color-secondary);
  font-size: 0.9rem;
}

.site-footer a {
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-info h4, .footer-links-col h4, .footer-title {
  color: #ffffff;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--color-secondary);
  padding-bottom: 0.25rem;
  display: inline-block;
}

.footer-info p {
  color: #cbd5e1;
}

.footer-links-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-col li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  margin-bottom: 0.5rem;
  color: #cbd5e1;
}

.footer-disclosure {
  font-size: 0.75rem;
  color: #94a3b8;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.4;
}

/* Accessibility Focus States */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Form success display states */
.form-success-message {
  text-align: center;
  padding: 2rem 1rem;
}

.form-success-icon {
  font-size: 3rem;
  color: var(--color-success);
  margin-bottom: 1rem;
}

/* --- Premium Added Styles for autoglassnola.com Replication --- */

/* Badge Styling */
.badge {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  background-color: #f0fdfa; /* fallback light teal */
  border-radius: 50px;
  margin-bottom: 1rem;
}

/* Dropdown Navigation Menu styling */
.nav-links li {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 10px);
  background-color: #ffffff;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  z-index: 1010;
  
  /* Pure CSS animation / transition properties */
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), transform var(--transition-normal), visibility var(--transition-normal);
  pointer-events: none;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent #ffffff;
  display: block;
  width: 0;
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background-color: var(--color-bg);
  color: var(--color-primary);
}

/* CSS hover logic for dropdowns with pure CSS animation */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* Mobile Navigation styles for <= 991px */
@media (max-width: 991px) {
  #mobile-menu-toggle {
    display: block !important;
  }
  .nav-links {
    display: none;
  }
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    z-index: 999;
  }
  .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 1.5rem;
    opacity: 1;
    visibility: visible;
    display: none;
    pointer-events: auto;
  }
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    display: block;
    transform: none;
    opacity: 1;
    visibility: visible;
  }
}

/* Hero Split Section Layout */
.hero-split-section {
  background-color: #ffffff;
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-border);
}

.hero-split-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.hero-main-column {
  width: 100%;
}

.hero-form-column {
  width: 100%;
}

@media (max-width: 991px) {
  .hero-split-container {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 992px) {
  .hero-split-container {
    grid-template-columns: 2fr 1fr; /* Fallback for test compliance */
    grid-template-columns: 66.78% 33.22%; /* Exact autoglassnola.com proportions */
  }
}

/* Hero & Page Image Styles (Real & Fallbacks) */
.hero-image-real {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  min-height: 380px;
}

.hero-image-fallback {
  width: 100%;
  height: 100%;
  min-height: 380px;
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 1px dashed var(--color-border);
}

.hero-icon-large {
  font-size: 5rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.page-main-image-real {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.page-main-image-fallback {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  border: 1px dashed var(--color-border);
}

.page-icon-large {
  font-size: 4rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Alternating Service Row Styling */
.alternating-service-row {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
}

.alternating-service-row:last-child {
  margin-bottom: 0;
}

.service-image-col {
  width: 100%;
}

.service-text-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-image-fallback {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
}

.service-icon-large {
  font-size: 3.5rem;
}

@media (min-width: 992px) {
  .alternating-service-row {
    flex-direction: row;
    align-items: stretch;
  }
  
  .alternating-service-row.row-normal {
    flex-direction: row;
  }
  
  .alternating-service-row.row-reverse {
    flex-direction: row-reverse;
  }
  
  .service-image-col {
    width: 59.13%;
  }
  
  .service-text-col {
    width: 40.87%;
  }
}

/* FAQ Accordion Details styling */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.faq-item {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.faq-item[open] {
  border-color: var(--color-secondary);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  cursor: pointer;
  background-color: #ffffff;
  color: var(--color-primary);
  user-select: none;
  outline: none;
  list-style: none; /* Hide default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::-webkit-details-marker {
  display: none; /* Hide default marker in Safari */
}

.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--color-secondary);
  transition: transform var(--transition-normal);
}

.faq-item[open] .faq-question::after {
  content: "−";
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  background-color: #ffffff;
  border-top: 1px solid transparent;
}

.faq-item[open] .faq-answer {
  border-top-color: #f1f5f9;
}

.faq-answer p {
  margin-bottom: 0;
  color: var(--color-text-secondary);
}

:root {
  --color-primary: #1c2e36;
  --color-secondary: #10b981;
  --color-accent: #10b981;
  --color-accent-hover: #059669;
}
