/* ============================================
   CELINA NEW HOME INSPECTION - GLOBAL STYLES
   (Forest Green Theme - Optimized with Google Fonts)
   ============================================ */

:root {
  /* COLORS */
  --primary: #1a472a;        /* Forest Green - "Safe/Approved" */
  --primary-light: #2d5f3f;
  --accent: #e67e22;         /* Orange - "Construction/Action" */
  --accent-light: #f39c12;
  --text-dark: #1f2937;
  --text-light: #4b5563;     /* FIXED: Proper gray for contrast (was #f9fafb - too light) */
  --bg-light: #f9fafb;
  --white: #ffffff;
  --border: #e5e7eb;
  --success: #10b981;
  --danger: #ef4444;
  
  /* FONTS (Matching your Google Fonts) */
  --font-serif: 'Merriweather', serif;
  --font-sans: 'Source Sans Pro', sans-serif;
  
  /* SPACING & SHADOWS */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--white);
}

/* ============================================
   ACCESSIBILITY & UTILITIES
   ============================================ */
/* Allows keyboard users to skip nav - Crucial for A11y */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px;
  z-index: 2000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Better Focus States (For keyboard navigation) */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--primary);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-lg);
}

h2 {
  font-size: 2rem;
  margin-top: var(--spacing-lg);
  text-align: center;
}

h3 {
  font-size: 1.5rem;
  color: var(--primary-light);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-dark);
  font-size: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* CONTAINER & LAYOUT */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--spacing-xl) 0;
}

.bg-light {
  background-color: var(--bg-light);
}

/* HEADER / NAVIGATION */
header {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.logo span {
  color: var(--accent);
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

nav a {
  font-weight: 600;
  color: var(--primary);
  position: relative;
}

/* Underline animation for nav links */
nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active-nav::after {
  width: 100%;
}

/* HERO SECTION */
.hero {
  /* Green overlay with optional background image */
  background: linear-gradient(rgba(26, 71, 42, 0.88), rgba(26, 71, 42, 0.85)), url('../assets/img/hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--white);
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Orange glow effect */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(230, 126, 34, 0.15);
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  font-size: 2.8rem;
  margin-bottom: var(--spacing-lg);
}

.hero p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto var(--spacing-lg);
}

/* CALL NOW BOX (Phone in Hero) */
.contact-info-hero {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  display: inline-block;
  margin: var(--spacing-lg) auto;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(26, 71, 42, 0.1);
}

.contact-info-hero p {
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.contact-info-hero .phone-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.contact-info-hero .phone-number a {
  color: var(--white);
  text-decoration: none;
  transition: text-shadow 0.3s ease;
}

.contact-info-hero .phone-number a:hover {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* PRIMARY CTA BUTTON */
.cta-primary {
  background: var(--accent);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  display: inline-block;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

.cta-primary:hover {
  background: var(--accent-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

/* CARDS & GRIDS */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.card {
  background: var(--white);
  padding: var(--spacing-lg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.highlight-card {
  border-top: 4px solid var(--accent);
  background: #fffcf5;
}

/* TESTIMONIALS - FIXED CONTRAST */
.card p.testimonial-text {
  color: #4b5563;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* CONTENT BLOCKS */
.content-block {
  background: var(--bg-light);
  padding: var(--spacing-lg);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-lg);
  border-left: 4px solid var(--accent);
}

/* TRUST BAR */
.trust-bar {
  background: #f0fdf4;
  padding: 1.5rem 0;
  border-bottom: 1px solid #dcfce7;
}

.trust-badges {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  margin: var(--spacing-lg) 0;
  flex-wrap: wrap;
}

.badge {
  background: var(--primary);
  color: var(--white);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
}

/* FAQ SECTION */
.faq-item {
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.faq-question.active::after {
  content: '-';
  transform: rotate(0deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  color: var(--text-light);
}

.faq-answer.active {
  max-height: 500px;
  padding-bottom: var(--spacing-md);
}

.faq-answer p {
  padding-bottom: var(--spacing-md);
}

/* CONTACT INFO BLOCK */
.contact-info {
  background: var(--bg-light);
  padding: var(--spacing-lg);
  border-radius: var(--radius);
  margin: var(--spacing-lg) 0;
  text-align: center;
}

.contact-info p {
  margin-bottom: var(--spacing-sm);
  font-size: 1.1rem;
}

.phone-number {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.phone-number a {
  color: var(--accent);
  transition: color 0.3s ease;
}

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

/* CONTACT FORM */
form {
  max-width: 600px;
  margin: var(--spacing-lg) auto;
}

.form-group {
  margin-bottom: var(--spacing-md);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--primary);
}

input,
textarea {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

/* FOOTER - FIXED CONTRAST & ACCESSIBILITY */
footer {
  background: var(--primary);
  color: var(--white);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

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

.footer-section h4 {
  color: var(--accent-light);
  margin-bottom: var(--spacing-md);
  font-family: var(--font-serif);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--spacing-sm);
}

/* FIXED: Footer links now have proper contrast (white, underlined) */
.footer-section a {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent-light);
  text-decoration-color: var(--accent-light);
}

/* FIXED: Footer bottom text now has proper contrast (no opacity reduction) */
.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--spacing-lg);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.footer-bottom a {
  color: #ffffff;
  font-weight: 600;
  margin: 0 5px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.footer-bottom a:hover {
  color: var(--accent-light);
}

footer p,
footer li,
footer span {
  color: rgba(255, 255, 255, 0.9);
}

/* MOBILE MENU */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
  padding: 0.5rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

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

  .hero {
    padding: 3rem var(--spacing-lg);
  }
}

@media (max-width: 640px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    padding: var(--spacing-lg);
    border-bottom: 2px solid var(--border);
    display: none;
    gap: var(--spacing-md);
    box-shadow: var(--shadow-lg);
  }

  nav ul.active {
    display: flex;
  }

  nav li {
    text-align: center;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border);
  }

  nav li:last-child {
    border-bottom: none;
  }

  .contact-info-hero {
    padding: 1rem 1.5rem;
  }

  .contact-info-hero .phone-number {
    font-size: 1.5rem;
  }

  .hero::before {
    width: 300px;
    height: 300px;
  }
}