/**
 * Layout Styles
 * Navigation, footer, and major layout components
 */

/* Navbar */
.navbar {
    width: 100%;
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    background: #fff;
    border-bottom: 1px solid #e2e2e2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    z-index: 2000;
    overflow: visible;
}

/* Phone Banner */
.phone-banner {
    position: absolute;
    top: 0;
    right: 0;
    display: none;
    align-items: center;
    gap: 7px;
    background: linear-gradient(to right, transparent, #f4f4f4 40%);
    color: #3F4A5A;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    padding: 0.45rem 1.75rem;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 2001;
}

.phone-banner:hover {
    background: linear-gradient(to right, transparent, #e8e8e8 40%);
    color: #2e3744;
}

@media (max-width: 600px) {
    .phone-banner {
        font-size: 0.72rem;
        padding: 0.4rem 1rem;
        gap: 5px;
    }

    .phone-banner svg {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 1360px) {
    .phone-banner {
        display: flex;
        position: fixed;
        top: env(safe-area-inset-top, 0px);
        z-index: 999;
    }
}

.ae-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.ae-logo {
    height: 72px;
    width: auto;
}

.navbar .left-container {
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 1rem 2rem;
}

.navbar-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding: 1rem 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    overflow: visible;
}

.nav-links a {
    position: relative;
    color: #555;
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover {
    color: #111;
}

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

.drawer-call-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* About link specific styles */
.about-link:not(.active)::after {
    width: 0 !important;
}

.about-link:focus::after {
    width: 0 !important;
}

/* Contact link specific styles */
.contact-link:not(.active)::after {
    width: 0 !important;
}

.contact-link:focus::after {
    width: 0 !important;
}

/* Dropdown */
.dropdown {
    padding-top: 8px;
    padding-bottom: 8px;
    position: relative;
    display: inline-block;
}

.dropdown-content {
    visibility: hidden;
    position: absolute;
    top: calc(100% + 23px);
    left: 0;
    background-color: #fff;
    border: 1px solid #e2e2e2;
    min-width: 230px;
    padding: 0.5rem 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    z-index: 1999;
    border-radius: 0 0 6px 6px;
}

.dropdown-content a {
    color: #333;
    padding: 12px 18px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
    color: #111;
}

@media (min-width: 1361px) {
    .dropdown-content {
        clip-path: inset(0 0 100% 0);
        transition: clip-path 0.35s ease, visibility 0.35s;
    }

    .dropdown:hover .dropdown-content {
        visibility: visible;
        clip-path: inset(0 0 -20px 0);
    }

    .dropdown:hover > a::after {
        width: 100%;
        left: 0;
    }
}

.about-link,
.contact-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.dropdown-arrow {
    display: none;
}

.dropdown-arrow.rotate {
    transform: rotate(225deg);
}

.about-link:hover .dropdown-arrow {
    border-color: #111;
}

/* Mobile Menu */
.drawer-close {
    display: none;
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    color: #333;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    min-width: 44px;
    min-height: 44px;
}

/* Mobile/Tablet Responsive Navigation */
@media (max-width: 1360px) {
    .navbar-right {
        display: contents;
    }


    .navbar .left-container {
        padding-left: 0.75rem;
    }

    .ae-brand {
        gap: 5px;
    }

    .ae-logo {
        height: 42px;
    }

    .navbar-right .nav-links a {
        color: #555;
    }

    .navbar-right .nav-links a:hover {
        color: #111;
    }

    .dropdown {
        width: 100%;
        padding-top: 0;
        padding-bottom: 0;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 1rem;
        top: calc(50% + 1rem);
        transform: translateY(-50%);
        z-index: 1;
        color: #2a2a2a;
        margin-left: 0;
    }

    .quote-btn {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 250px;
        background-color: #fff;
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding-top: 4rem;
        padding-left: 1rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        width: 100%;
        text-align: left;
        padding: 8px;
        position: relative;
    }

    .nav-links a::after,
    .nav-links a.active::after,
    .nav-links a:hover::after {
        display: none;
    }

    .drawer-call-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--accent-gold);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.9rem;
        padding: 8px;
        margin-top: 0;
    }

    .nav-links .mobile-quote-btn::after {
        display: none;
    }

    .drawer-accent-bar {
        width: 40px;
        height: 2px;
        background: var(--accent-gold);
        margin: 1rem auto;
        align-self: center;
    }

    .drawer-close {
        display: block;
    }

    .dropdown-content a {
        width: 100%;
        padding: 0.75rem 1rem 0.75rem 2rem;
        padding-left: 1rem;
    }

    .dropdown-content {
        position: static;
        display: block;
        visibility: visible;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        clip-path: none;
        padding-top: 0;
        padding-bottom: 0;
        transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        background-color: #f0f0f0;
        border-radius: 0;
    }

    .dropdown-content.show {
        max-height: 300px;
        opacity: 1;
        clip-path: none;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .dropdown-content a {
        color: #333;
    }

    .dropdown-content a:hover {
        background-color: #e0e0e0;
    }

    .about-link {
        gap: 120px;
        width:100%;
    }

    .contact-link {
        gap: 108px;
        width:100%;
    }

    .dropdown-arrow {
        display: inline-block;
        width: 6px;
        height: 6px;
        border-right: 2px solid rgba(0, 0, 0, 0.6);
        border-bottom: 2px solid rgba(0, 0, 0, 0.6);
        transform: rotate(45deg);
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }
}

/* Footer */
.site-footer {
    background-color: #333333;
    color: #ccc;
    padding: 3rem 1rem;
    font-family: sans-serif;
    border-top: none;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-column {
    flex: 1 1 250px;
    min-width: 200px;
}

.footer-column h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-column p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-buttons .btn {
    display: inline-block;
    margin: 0 0.5rem 0.5rem 0;
    background-color: transparent;
    color: #ccc;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    border: none;
}

.footer-buttons .btn:hover {
    background-color: transparent;
}

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

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: #bbb;
    text-decoration: none;
}

.footer-column ul li a:hover {
    color: #fff;
    text-decoration: underline;
}

.newsletter form {
    display: flex;
    margin-bottom: 1rem;
}

.newsletter input[type="email"] {
    flex: 1;
    padding: 0.5rem;
    margin-right: 0.5rem;
    border: none;
    border-bottom: 1px solid #666;
    background-color: transparent;
    color: #fff;
}

.newsletter input[type="email"]::placeholder {
    color: #888;
}

.newsletter button {
    padding: 0.5rem 1rem;
    background-color: #888;
    color: #fff;
    border: none;
    cursor: pointer;
}

.newsletter button:hover {
    background-color: #666;
}

.estimate-btn {
    display: inline-block;
    margin-top: 0.5rem;
    background-color: #777;
    padding: 0.75rem 1.25rem;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
}

.estimate-btn:hover {
    background-color: #666;
}

.newsletter img {
    margin-top: 1rem;
    height: 40px;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer,
    .footer-column {
        text-align: left;
    }

    .footer-buttons {
        display: flex;
        justify-content: flex-start;
    }

    .newsletter form {
        justify-content: flex-start;
    }

    .newsletter input,
    .newsletter button {
        text-align: left;
    }
}

/* Footer Bottom - Copyright & Credits */
.footer-bottom {
    background-color: #222222;
    padding: 1.5rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 3rem -1rem -3rem -1rem;
}

.footer-bottom p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #999;
}

.developer-credit {
    font-size: 0.8rem;
}

.developer-credit a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.developer-credit a:hover {
    color: #fff;
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.875rem;
    background-color: #f2f2f2;
    color: #666;
}
