/* Explain: Styles for site structure, header, navigation, side drawer, footer, and responsive layouts. */
.container-x {
    width: 100%;
    max-width: 1220px;
    margin-inline: auto;
    padding-inline: 1rem;
}

.section-pad {
    padding-block: 4rem;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

html[data-theme="dark"] .site-header {
    background: rgba(8, 20, 40, 0.92);
}

.site-header.is-scrolled {
    box-shadow: 0 10px 30px rgba(14, 31, 61, 0.12);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    max-width: 1220px;
    margin-inline: auto;
    padding-block: 0.5rem;
    padding-inline: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-logo {
    height: 88px;
    width: 240px;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.3s ease;
}

.brand-logo.logo-dark,
.drawer-logo.logo-dark,
.footer-logo.logo-dark {
    display: none;
}

html[data-theme="dark"] .brand-logo.logo-light,
html[data-theme="dark"] .drawer-logo.logo-light,
html[data-theme="dark"] .footer-logo.logo-light {
    display: none;
}

html[data-theme="dark"] .brand-logo.logo-dark,
html[data-theme="dark"] .drawer-logo.logo-dark,
html[data-theme="dark"] .footer-logo.logo-dark {
    display: block;
}

/* ---------- Nav ---------- */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-inline: auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-color);
    white-space: nowrap;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--gold-dark);
    background: rgba(200, 162, 74, 0.12);
}

/* ---------- Header actions ---------- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.icon-btn:hover {
    border-color: var(--gold-color);
    color: var(--gold-dark);
    transform: translateY(-2px);
}

.icon-btn:active {
    transform: scale(0.94);
}

.menu-toggle {
    border-color: var(--gold-color);
    color: var(--gold-dark);
}

.header-cta {
    min-height: 44px;
}

/* ---------- Side drawer ---------- */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 20, 40, 0.62);
    z-index: 80;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    width: min(88%, 360px);
    z-index: 90;
    background: var(--card-color);
    padding: 1.25rem;
    overflow-y: auto;
    box-shadow: var(--shadow-strong);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease;
}

html[dir="rtl"] .mobile-drawer {
    transform: translateX(-100%);
}

.mobile-drawer.is-open,
html[dir="rtl"] .mobile-drawer.is-open,
html[dir="ltr"] .mobile-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.drawer-logo {
    height: 54px;
    width: 160px;
    object-fit: cover;
    object-position: center;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
}

.drawer-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.85rem 0.5rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease, color 0.2s ease, padding-inline-start 0.2s ease;
}

.drawer-nav a:hover,
.drawer-nav a:active {
    background: var(--surface-color);
    color: var(--gold-dark);
    padding-inline-start: 0.9rem;
}

.drawer-nav a i {
    color: var(--gold-dark);
    font-size: 0.75rem;
}

.drawer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
    background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy-color) 100%);
    color: #cfd8e6;
    margin-top: 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 2.75rem;
}

.footer-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 0.6rem;
}

.footer-about {
    font-size: 0.92rem;
    color: #b8c4d6;
    max-width: 40ch;
}

.footer-col h3 {
    position: relative;
    color: var(--gold-light);
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.footer-col h3::after {
    content: "";
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    width: 32px;
    height: 2px;
    border-radius: 999px;
    background: var(--gold-gradient);
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.9rem;
}

.footer-col a,
.footer-col span {
    text-decoration: none;
    color: #cfd8e6;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--gold-light);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.footer-contact i {
    color: var(--gold-light);
    margin-top: 0.3rem;
}

.footer-social {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

.footer-social a {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--gold-light);
    text-decoration: none;
    font-size: 1.05rem;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.footer-social a:hover {
    background: var(--gold-color);
    color: var(--navy-deep);
    transform: translateY(-3px);
}

.footer-qr {
    margin-top: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-qr img {
    width: 76px;
    height: 76px;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 4px;
}

.footer-qr span {
    font-size: 0.78rem;
    color: #b8c4d6;
    max-width: 12ch;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-block: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    max-width: 1220px;
    margin-inline: auto;
    padding-inline: 1rem;
}

.footer-legal {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-signature {
    flex: 1 0 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    color: #cfd8e6;
    font-size: 0.85rem;
    text-align: center;
    transition: color 0.25s ease, transform 0.2s ease;
}

.footer-signature .sig-name {
    color: var(--gold-light);
    font-weight: 700;
    transition: color 0.25s ease;
}

.footer-signature i {
    color: var(--gold-light);
    font-size: 0.95rem;
    transition: transform 0.25s ease, color 0.25s ease;
}

.footer-signature:hover,
.footer-signature:focus-visible {
    color: #ffffff;
}

.footer-signature:hover .sig-name,
.footer-signature:focus-visible .sig-name {
    color: var(--gold-color);
}

.footer-signature:hover i {
    transform: translateY(-2px) scale(1.1);
}

.footer-signature:hover .fa-hand-pointer {
    animation: sigTap 0.9s ease-in-out infinite;
}

.footer-signature:active {
    transform: scale(0.97);
}

@keyframes sigTap {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-3px) rotate(-12deg); }
}

/* ---------- Floating actions ---------- */
.floating-actions {
    position: fixed;
    inset-block-end: 1rem;
    inset-inline-end: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    z-index: 55;
}

.float-btn {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    text-decoration: none;
    border: none;
    box-shadow: var(--shadow-strong);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.float-btn:hover {
    transform: translateY(-4px);
}

.float-btn:active {
    transform: scale(0.92);
}

.float-wa { background: #25d366; }
.float-phone { background: var(--navy-color); }
.float-top { background: var(--gold-color); color: var(--navy-deep); display: none; }
.float-top.is-visible { display: inline-flex; }

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
    .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
    }
}

@media (max-width: 1023px) {
    .main-nav {
        display: none;
    }

    .header-cta .header-cta-label {
        display: none;
    }
}

@media (max-width: 640px) {
    .brand-logo { height: 60px; width: 168px; }
    .header-cta { display: none; }
    .section-pad { padding-block: 3rem; }
    .float-btn { width: 48px; height: 48px; font-size: 1.1rem; }
    .footer-logo { width: 120px; height: 120px; }
}