/* CSS Variables based on A&S Tree Services Branding */
:root {
    --primary-green: #1b4d30;       
    --secondary-green: #297045;     
    --accent-light: #e8f3ec;        
    --bg-white: #ffffff;
    --bg-light-grey: #f8f9fa;
    --text-dark: #2c3e35;
    --text-body: #4a5568;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 20px rgba(27, 77, 48, 0.08);
    --transition: all 0.3s ease;
}

/* Reset & Accessibility */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

html, body {
    overflow-x: hidden; 
    width: 100%;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-body);
    line-height: 1.6;
    background-color: var(--bg-white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

p {
    margin-bottom: 1rem;
}

.text-highlight {
    color: var(--secondary-green);
}

/* Layout Utility */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-green);
}

.section-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-body);
}

.bg-light {
    background-color: var(--bg-light-grey);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    font-size: 0.95rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--secondary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-outline:hover {
    background-color: var(--accent-light);
}

.btn-outline-light {
    background-color: transparent;
    color: var(--bg-white);
    border-color: var(--bg-white);
}

.btn-outline-light:hover {
    background-color: var(--bg-white);
    color: var(--primary-green);
}

.icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Header & Navigation */
.site-header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

/* Flexbox Layout ensuring Desktop Navigation is completely centered */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.desktop-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.desktop-ctas {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Mobile Brand Text Styling (Hidden on Desktop) */
.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.mobile-brand-text {
    display: none; 
}

/* Desktop Logo - Scaled Up */
.logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.desktop-nav ul {
    display: flex;
    gap: 35px;
    list-style: none;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    transition: var(--transition);
    font-size: 0.95rem;
}

.desktop-nav a:hover {
    color: var(--primary-green);
}

/* Mobile Nav Elements */
.mobile-actions { display: none; align-items: center; gap: 12px; }
.mobile-icon-btn { width: 40px; height: 40px; border-radius: 4px; display: flex; align-items: center; justify-content: center; background-color: var(--accent-light); color: var(--primary-green); text-decoration: none; transition: var(--transition); }
.hamburger { display: none; width: 30px; height: 20px; position: relative; background: transparent; border: none; cursor: pointer; }
.hamburger span { display: block; position: absolute; height: 3px; width: 100%; background: var(--primary-green); border-radius: 2px; left: 0; transition: .25s ease-in-out; transform-origin: left center; }
.hamburger span:nth-child(1) { top: 0px; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg); top: -2px; left: 3px; }
.hamburger.active span:nth-child(2) { width: 0%; opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg); top: 19px; left: 3px; }

.mobile-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--bg-white); padding: 20px; flex-direction: column; gap: 10px; border-top: 1px solid var(--border-color); box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
.mobile-nav.active { display: flex; }
.mobile-nav a.mobile-link { text-decoration: none; color: var(--text-dark); font-weight: 600; font-family: 'Montserrat', sans-serif; display: block; padding: 12px; border-radius: 4px; background-color: var(--bg-light-grey); text-align: center; }
.mobile-nav a.mobile-nav-highlight { background-color: var(--primary-green); color: var(--bg-white); }

/* Hero Section (Video & Glassmorphism) */
.hero {
    position: relative;
    padding: 140px 0 120px;
    color: var(--bg-white);
    text-align: center;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

/* Video Background Layering */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Base overlay to slightly darken the raw video */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(27, 77, 48, 0.6) 0%, rgba(13, 43, 26, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
}

/* The Glassmorphism Box */
.glass-box {
    background: rgba(13, 43, 26, 0.45); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 60px 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero h1 {
    font-size: 3.8rem;
    color: var(--bg-white);
    margin-bottom: 25px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-lead {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-green);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    background-color: var(--accent-light);
    color: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.service-icon {
    width: 32px;
    height: 32px;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* Features Banner (Upgraded Design) */
.features-banner {
    background-color: var(--primary-green);
    background-image: radial-gradient(circle at 50% 50%, rgba(41, 112, 69, 0.4) 0%, transparent 100%);
    color: var(--bg-white);
    padding: 80px 0;
    border-top: 4px solid var(--secondary-green);
    border-bottom: 4px solid var(--secondary-green);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 35px 20px;
    backdrop-filter: blur(8px);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.feature-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.feature-icon {
    width: 65px;
    height: 65px;
    background-color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.feature-item:hover .feature-icon {
    transform: scale(1.1);
}

.feature-item h4 {
    color: var(--bg-white);
    font-size: 1.15rem;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Contact Section */
.contact-wrapper { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 60px; 
    align-items: start; 
}

.contact-info-panel h2 {
    font-size: 2.2rem;
    color: var(--primary-green);
}

.contact-details {
    list-style: none;
    margin-top: 30px;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.contact-details li svg {
    color: var(--primary-green);
    width: 24px;
    height: 24px;
}

.contact-details a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--secondary-green);
}

.contact-form-panel { 
    background-color: var(--bg-white); 
    padding: 40px; 
    border-radius: 8px; 
    box-shadow: var(--shadow-md); 
    border: 1px solid var(--border-color);
}

.contact-form-panel h3 {
    margin-bottom: 25px;
    font-size: 1.6rem;
}

.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; color: var(--text-dark); }
input, select, textarea { width: 100%; padding: 12px 16px; background-color: var(--bg-light-grey); color: var(--text-dark); border: 1px solid var(--border-color); border-radius: 4px; font-family: 'Open Sans', sans-serif; font-size: 1rem; transition: var(--transition); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-green); box-shadow: 0 0 0 3px var(--accent-light); }
textarea { resize: vertical; min-height: 120px; }

/* Footer */
footer { background-color: #123320; color: #a0aec0; padding: 60px 0 30px; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 40px; }
.footer-logo { height: 70px; margin-bottom: 15px; filter: brightness(0) invert(1); opacity: 0.9; }
.footer-brand { max-width: 350px; }
.footer-tagline { color: var(--bg-white); font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1.1rem; margin-bottom: 5px; }
.footer-links h4 { color: var(--bg-white); margin-bottom: 15px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #a0aec0; text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--bg-white); padding-left: 5px; }
.footer-bottom { text-align: center; font-size: 0.9rem; }

/* Back to Top */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 45px; height: 45px; background-color: var(--primary-green); color: var(--bg-white); border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: var(--transition); z-index: 999; }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background-color: var(--secondary-green); transform: translateY(-3px); }

/* Responsive Adjustments */
@media (max-width: 992px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
    .hero h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .desktop-nav, .desktop-ctas { display: none; }
    .mobile-actions, .hamburger { display: flex; }
    
    /* Reveal Mobile Brand Text */
    .mobile-brand-text {
        display: block;
        font-family: 'Montserrat', sans-serif;
        font-weight: 800;
        color: var(--text-dark);
        font-size: 1.1rem;
        line-height: 1.2;
        text-transform: uppercase;
    }
    
    /* Shrink the logo specifically for mobile layout */
    .logo-img { height: 55px; }
    
    .hero { padding: 80px 0; }
    .hero h1 { font-size: 2.5rem; }
    .glass-box { padding: 40px 20px; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; }
    
    .services-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    
    .footer-content { flex-direction: column; text-align: center; }
    .footer-brand { margin: 0 auto; }
    .footer-logo { margin: 0 auto 15px; }
}

@media (max-width: 480px) {
    .logo-img { height: 45px; }
    .mobile-brand-text { font-size: 0.9rem; }
    .features-grid { grid-template-columns: 1fr; gap: 25px; }
    .contact-form-panel { padding: 25px 20px; }
    .section-header h2 { font-size: 2rem; }
}