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

/* Navbar */
.navbar {
    width: 100%;
    position: fixed;
    top: 0;
    background: rgb(0, 0, 0);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2000;
    overflow: visible;
}

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

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

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

.logo {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: bold;
    color: white;
    letter-spacing: 1px;
    padding-right: 20px;
}

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

.nav-links a {
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    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: white;
}

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

/* 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 {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;

    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background-color: #1e1e1e;
    border: 1px solid #2a2a2a;
    min-width: 230px;
    padding: 0.5rem 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    z-index: 1999;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.dropdown-content a {
    color: rgba(255, 255, 255, 0.85);
    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: #2b2b2b;
    color: #fff;
}

.dropdown-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (min-width: 1151px) {
    .dropdown:hover .dropdown-content {
        opacity: 1;
        visibility: visible;
        transform: translateY(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: #fff;
}

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

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
}

/* Mobile/Tablet Responsive Navigation */
@media (max-width: 1150px) {
    .dropdown {
        width: 100%;
    }

    .menu-toggle {
        display: block;
    }

    .quote-btn {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 250px;
        background-color: #333;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        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 {
        content: "";
        position: absolute;
        bottom: 0;
        left: 20px;
        right: 20px;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-links .mobile-quote-btn {
        width: 200px;
        margin: 1rem auto 0;
        padding: 0.6rem 1rem;
    }

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

    .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;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        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: #333;
        border-radius: 0;
    }

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

    .dropdown-content a {
        color: white;
    }

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

    .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(255, 255, 255, 0.85);
        border-bottom: 2px solid rgba(255, 255, 255, 0.85);
        transform: rotate(45deg);
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }
}

/* Footer */
.site-footer {
    background-color: #232323;
    color: #ddd;
    padding: 3rem 1rem;
    font-family: sans-serif;
}

.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: #fff;
    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 #555;
    background-color: transparent;
    color: #fff;
}

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

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

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

.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: #1a1a1a;
    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;
}
