/* ========================================
    1. CORE THEME & DESIGN TOKENS
   ======================================== */
:root {
    /* Brand Colors - Standard (Light Mode) */
    --accent-blue: #007bff;
    --digital-blue: #007bff;
    --restore-green: #28a745;
    --life-gold: #b8860b; /* Darker gold for better contrast on white */

    /* UI Tokens */
    --transition-speed: 0.4s;
    --overlay: rgba(0, 0, 0, 0.5);
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f9f9f9;
    --header-bg: url('assets/images/RoehBackground.jpg');
    --about-hero-bg: url('assets/images/PampaSkyline.jpg');
}

/* --- Dark Mode Variables Overrides --- */
html[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --card-bg: #2d2d2d;
    --overlay: rgba(0, 0, 0, 0.7);

    /* Dark Mode Brand Enhancements (Brighter for dark backgrounds) */
    --digital-blue: #3399ff;
    --restore-green: #2ecc71;
    --life-gold: #f1c40f;
}

/* ========================================
    2. HERO & ABOUT PAGE LAYOUT
   ======================================== */

/* The top banner section of the About page */
.about-hero {
    height: 35vh; /* Adjusted for better visibility */
    background: linear-gradient(var(--overlay), var(--overlay)), var(--about-hero-bg);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    color: white;
    padding: 0 1rem;
}

.about-hero h1 { 
    font-size: 3.5rem; 
    margin-bottom: 1rem; 
}

/* Global Centering for About Content sections */
.pillars-wrapper, 
.pampa-brand-section, 
.cta-section {
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;
}

/* The "Started in Pampa" gray box section */
.pampa-brand-section {
    background-color: var(--card-bg);
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1rem; 
}

.pampa-brand-content p {
    max-width: 750px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* The section that says "Ready to start a project?" */
.cta-section h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    text-align: center;
}

/* ========================================
    4. NAVIGATION (CENTRALIZED FLEXBOX)
   ======================================== */
.navbar {
    background: linear-gradient(var(--overlay), var(--overlay)), var(--header-bg);
    background-size: cover;
    background-position: center;
    padding: 2rem 1rem;
    color: white;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo, .theme-btn-wrapper { flex: 1; }

.logo { 
    display: flex; 
    align-items: center; 
    text-decoration: none; 
    color: white; 
    font-weight: bold; 
    font-size: 1.5rem; 
}

.logo img { height: 40px; margin-left: 12px; }

.nav-links {
    flex: 2;
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a { 
    text-decoration: none; 
    color: white; 
    font-weight: 500; 
    transition: color 0.3s; 
    padding-bottom: 4px;
}

.nav-links a:hover, .nav-links a.active { 
    color: var(--accent-blue); 
    border-bottom: 2px solid var(--accent-blue); 
}

.theme-btn-wrapper { display: flex; justify-content: flex-end; }
.theme-btn { background: none; border: none; cursor: pointer; font-size: 1.5rem; }

/* ========================================
    5. SERVICE CARD THEMES (SYNCHRONIZED)
   ======================================== */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.service-card {
    flex: 1 1 300px;
    max-width: 380px;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 15px;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card:hover { transform: translateY(-5px); }

/* --- Branch Specific logic using Variable Tokens --- */
.digital-card { border-top: 4px solid var(--digital-blue); }
.restore-card { border-top: 4px solid var(--restore-green); }
.life-card { border-top: 4px solid var(--life-gold); }

.digital-card .service-link { color: var(--digital-blue); font-weight: 600; }
.restore-card .service-link { color: var(--restore-green); font-weight: 600; }
.life-card .service-link { color: var(--life-gold); font-weight: 600; }

/* ========================================
    6. SUB-PAGE DESIGN SYSTEM
   ======================================== */
.subpage-header { text-align: center; margin-top: 5rem; padding: 0 1rem; }
.subpage-header h1 { font-size: 3rem; margin-bottom: 1rem; }

/* Sub-page Color Sync */
.digital-theme .subpage-header h1 { color: var(--digital-blue); }
.restore-theme .subpage-header h1 { color: var(--restore-green); }
.life-theme .subpage-header h1 { color: var(--life-gold); }

.subpage-content {
    max-width: 850px;
    margin: 4rem auto;
    padding: 2.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.subpage-content ul {
    margin-top: 1.5rem;
    padding-left: 2rem;
}

.subpage-content li { margin-bottom: 0.8rem; }

/* ========================================
    7. INTERACTIVE COMPONENTS (SLIDER & GHOST)
   ======================================== */

/* Ghost Engine: Scroll Reveal */
.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    will-change: transform, opacity;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Restoration Comparison Slider */
.slider-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 450px;
    margin: 3rem auto;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.img-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    clip-path: inset(0 0 0 100%);
    transition: clip-path 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-container:hover .img-after,
.slider-container[data-state="after"] .img-after {
    clip-path: inset(0 0 0 0);
}

.slider-container img { width: 100%; height: 100%; object-fit: cover; }

/* ========================================
    8. FORMS & BUTTONS
   ======================================== */
#contact {
    max-width: 700px;
    margin: 5rem auto;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 15px;
}

#contact input, #contact select, #contact textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
}

/* Large Pill Buttons */
.btn, .cta-btn {
    display: inline-block;
    min-width: 250px;
    padding: 18px 30px;
    background-color: var(--accent-blue);
    color: white;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

/* Branch specific CTA button colors */
.digital-theme .cta-btn { background-color: var(--digital-blue); }
.restore-theme .cta-btn { background-color: var(--restore-green); }
.life-theme .cta-btn { background-color: var(--life-gold); color: #000; }

.btn:hover, .cta-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ========================================
    9. FOOTER & MOBILE
   ======================================== */
@media (max-width: 768px) {
    .navbar-container { flex-direction: column; gap: 1.5rem; }
    .nav-links { gap: 1rem; flex-wrap: wrap; }
    .slider-container { height: 320px; }
    .subpage-header h1 { font-size: 2.2rem; }
    .btn, .cta-btn { width: 100%; }
}

footer { padding: 4rem 1rem; opacity: 0.7; text-align: center; }

.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 100;
}

/* Contact Form Styling */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem auto;
  max-width: 500px;
  text-align: left;
}

.contact-form label {
  font-weight: 600;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent2);
  background: rgba(255, 255, 255, 0.08);
}

.contact-btn {
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-btn:hover {
  background: var(--accent2);
  transform: translateY(-3px);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.modal-content {
  background: var(--card);
  padding: 2rem;
  border-radius: 16px;
  max-width: 400px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.modal.show {
  display: flex;
}
