/* ===================================
   Mobile Hamburger Menu & Overlay
   Coelho Landscaping
   =================================== */

/* Hamburger Button - Hidden on Desktop */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
    position: relative;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: white;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger Animation when Open */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background: linear-gradient(180deg, #2d5016 0%, #1a2f0e 100%);
    z-index: 1050;
    transition: right 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
}

.mobile-nav-overlay.open {
    right: 0;
}

/* Overlay Backdrop */
.mobile-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

/* Body scroll lock */
body.menu-open {
    overflow: hidden;
}

/* Mobile Nav Header */
.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-nav-logo {
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

/* Mobile Nav Links */
.mobile-nav-links {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.mobile-nav-links > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav-links > li > a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 14px 20px;
    font-size: 1.05rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.mobile-nav-links > li > a:hover,
.mobile-nav-links > li > a:active {
    background: rgba(255, 255, 255, 0.1);
}

/* Accordion Toggle for Dropdowns */
.mobile-accordion-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    color: white;
    padding: 14px 20px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.mobile-accordion-toggle:hover,
.mobile-accordion-toggle:active {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-accordion-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.mobile-accordion-toggle.expanded .mobile-accordion-arrow {
    transform: rotate(180deg);
}

/* Accordion Content (Sub-menu) */
.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.15);
}

.mobile-accordion-content.open {
    max-height: 800px;
}

.mobile-accordion-content a {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 10px 20px 10px 32px;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-accordion-content a:hover,
.mobile-accordion-content a:active {
    background: rgba(255, 255, 255, 0.08);
    color: #ff6b35;
}

/* Sub-accordion (nested sub-services) */
.mobile-sub-accordion-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 10px 20px 10px 32px;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.mobile-sub-accordion-toggle:hover,
.mobile-sub-accordion-toggle:active {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-sub-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
}

.mobile-sub-accordion-content.open {
    max-height: 600px;
}

.mobile-sub-accordion-content a {
    padding-left: 48px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

/* Mobile Phone CTA */
.mobile-nav-cta {
    padding: 20px;
    margin-top: 10px;
}

.mobile-nav-cta a {
    display: block;
    background: #ff6b35;
    color: white;
    text-align: center;
    padding: 14px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
    transition: background 0.3s ease;
}

.mobile-nav-cta a:hover {
    background: #e55a2e;
}

/* ===================================
   Mobile Responsive Breakpoint
   =================================== */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    /* Adjust header for mobile */
    .header-content {
        flex-wrap: nowrap;
    }

    .phone-cta {
        display: none;
    }

    .logo {
        font-size: 1.4rem;
    }

    /* Service grids single column */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 30px 20px;
    }

    /* Footer single column */
    .footer-content {
        grid-template-columns: 1fr;
    }

    /* Content grids */
    .content-grid {
        grid-template-columns: 1fr;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Typography */
    .section-title {
        font-size: 1.8rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .cta-section h2 {
        font-size: 1.8rem;
    }

    .cta-section p {
        font-size: 1rem;
    }

    /* Reduce section padding on mobile */
    .services,
    .service-details,
    .page-content,
    .cta-section,
    .map-section {
        padding: 50px 0;
    }

    .hero {
        padding: 60px 0;
    }

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

    /* Blog responsive */
    .related-grid {
        grid-template-columns: 1fr;
    }

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

    /* Service area grid */
    .area-grid,
    .areas-grid {
        grid-template-columns: 1fr;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

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

    .section-title {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }
}
