/* assets/css/layout.css */

/* Navbar */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}
.site-header.scrolled {
    border-color: var(--clr-border);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: .35rem;
    text-decoration: none;
}
.site-logo img {
    height: 40px;
    width: auto;
    display: block;
    -webkit-text-fill-color: unset;
}
.site-logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.primary-nav a {
    font-weight: 500;
    font-size: .9375rem;
    color: var(--clr-dark);
    transition: color var(--transition);
    white-space: nowrap;
}
.primary-nav a:hover { color: var(--clr-primary); }

/* Dropdown */
.primary-nav li { position: relative; }

.primary-nav .menu-item-has-children > a::after {
    content: ' ▾';
    font-size: .7rem;
    opacity: .6;
    display: inline-block;
    transition: transform .2s ease;
}
.primary-nav .menu-item-has-children.is-open > a::after {
    transform: rotate(-180deg);
}

.primary-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(-6px);
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 210px;
    padding-top: 10px;
    padding-bottom: .4rem;
    list-style: none;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    text-align: left;
}

.primary-nav .sub-menu a {
    display: block;
    width: 100%;
    padding: .55rem 1.25rem;
    font-size: .9rem;
    color: var(--clr-dark);
    white-space: nowrap;
    text-align: left;
    transition: color var(--transition), background var(--transition);
}
.primary-nav .sub-menu a:hover {
    color: var(--clr-primary);
    background: rgba(37,99,235,.05);
}

.primary-nav .menu-item-has-children.is-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dark mode toggle button */
.dark-toggle {
    background: none;
    border: 2px solid var(--clr-border);
    border-radius: var(--radius-pill);
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.dark-toggle:hover { border-color: var(--clr-primary); }

/* Hamburger (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--clr-dark);
    border-radius: 2px;
    transition: all var(--transition);
}

/* Footer */
.site-footer {
    background: var(--clr-dark);
    color: rgba(255,255,255,.7);
    padding-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-brand .site-logo { -webkit-text-fill-color: white; background: none; color: white; }
.footer-brand p { margin-top: .75rem; font-size: .9rem; }

.footer-col h4 {
    color: var(--clr-white);
    font-size: .875rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1.25rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .6rem; }
.footer-col a { color: rgba(255,255,255,.7); font-size: .9rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--clr-white); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 1.5rem;
    font-size: .875rem;
}

/* WhatsApp Bubble */
.whatsapp-bubble {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 56px;
    height: 56px;
    background: var(--clr-whatsapp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,.4);
    transition: transform var(--transition);
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
}
.whatsapp-bubble:hover { transform: scale(1.1); color: white; }

/* Responsive */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .primary-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--clr-white); padding: 1.5rem; border-bottom: 1px solid var(--clr-border); }
    .primary-nav.open { display: block; }
    .primary-nav ul { flex-direction: column; gap: 1rem; }
    .nav-toggle { display: flex; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}
