/* ==========================================================
   Oia Residence — Premium Header
   v1.0.0
   ========================================================== */

/* -- Reset & base ------------------------------------------ */
#oia-header *,
#oia-menu-overlay *,
#oia-header *::before,
#oia-menu-overlay *::before,
#oia-header *::after,
#oia-menu-overlay *::after {
    box-sizing: border-box;
    margin: 0;
}

/* -- Header bar -------------------------------------------- */
#oia-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 48px;
    pointer-events: none;
    transition: padding 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.5s ease;
}

#oia-header > * {
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

#oia-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 170px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.38) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.5s ease;
}

#oia-header.is-scrolled::before {
    opacity: 0;
}

#oia-header.is-scrolled {
    padding: 12px 48px;
    background-color: rgba(8, 28, 52, 0.22);
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 4px 20px rgba(0,0,0,0.1);
}

@keyframes oia-icon-spin {
    0% { transform: rotate(0deg) scale(1); animation-timing-function: linear; }
    18% { transform: rotate(0deg) scale(1); animation-timing-function: cubic-bezier(0.76, 0, 0.18, 1); }
    44% { transform: rotate(360deg) scale(1); animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
    54% { transform: rotate(360deg) scale(1.13); animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); }
    63% { transform: rotate(360deg) scale(1); animation-timing-function: linear; }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes oia-icon-hover-pulse {
    0%,  100% { transform: scale(1.05); }
    50%        { transform: scale(1.10); }
}

.oia-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    line-height: 0;
    flex-shrink: 0;
    text-decoration: none;
}

.oia-logo-icon {
    height: 58px;
    width: auto;
    display: block;
    flex-shrink: 0;
    transform-origin: center center;
    animation: oia-icon-spin 14s linear infinite;
    transition: height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.4s ease;
}

.oia-logo-text {
    height: 46px;
    width: auto;
    display: block;
    transition: height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease, filter 0.5s ease;
}

.oia-logo:hover .oia-logo-icon,
.oia-logo:focus-within .oia-logo-icon {
    animation: oia-icon-hover-pulse 1.6s ease-in-out infinite;
    filter: drop-shadow(0 0 16px rgba(255, 198, 21, 0.60)) drop-shadow(0 0 5px rgba(255, 198, 21, 0.30)) brightness(1.10);
}

.oia-logo:hover .oia-logo-text,
.oia-logo:focus-within .oia-logo-text {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.30)) brightness(1.08);
}

#oia-header.is-scrolled .oia-logo-icon { height: 42px; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.4)); }
#oia-header.is-scrolled .oia-logo-text { height: 34px; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.4)); }

.oia-header-right { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }

a.oia-header-phone, a.oia-header-phone:visited {
    display: inline-flex; align-items: center; justify-content: center;
    color: rgba(255, 255, 255, 0.85); text-decoration: none;
    transition: color 0.3s, transform 0.3s; flex-shrink: 0; padding: 6px;
}
a.oia-header-phone:hover, a.oia-header-phone:focus {
    color: #65c3f2; transform: scale(1.1); text-decoration: none; outline: none;
}

a.oia-header-whatsapp, a.oia-header-whatsapp:visited {
    display: inline-flex; align-items: center; justify-content: center;
    color: #25D366; text-decoration: none; transition: color 0.3s, transform 0.3s;
    flex-shrink: 0; position: relative; padding: 6px; animation: oia-pulse 3s ease-in-out infinite;
}
a.oia-header-whatsapp:hover, a.oia-header-whatsapp:focus {
    color: #2ee87a; transform: scale(1.1); text-decoration: none; outline: none; animation: none;
}

@keyframes oia-pulse {
    0%, 100% { filter: drop-shadow(0 0 0px rgba(37, 211, 102, 0)); }
    50% { filter: drop-shadow(0 0 10px rgba(37, 211, 102, 0.5)) drop-shadow(0 0 24px rgba(255, 255, 255, 0.15)); }
}

.oia-header-right::before { display: none; }

button#oia-menu-toggle.oia-menu-btn {
    width: 62px; height: 62px; border-radius: 50%;
    background-color: transparent; border: 1px solid rgba(255, 255, 255, 0.35);
    cursor: pointer; display: inline-flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 6px; padding: 0;
    position: relative; z-index: 100001; flex-shrink: 0;
    transition: border-color 0.35s ease, background-color 0.35s ease, transform 0.35s ease;
    -webkit-tap-highlight-color: transparent; outline: none; box-shadow: none;
    -webkit-appearance: none; appearance: none;
}
button#oia-menu-toggle.oia-menu-btn:hover {
    transform: scale(1.08); border-color: rgba(255, 255, 255, 0.65);
    background-color: rgba(16, 134, 204, 0.28);
    box-shadow: 0 0 20px rgba(16, 134, 204, 0.25), inset 0 0 12px rgba(255,255,255,0.04);
}
button#oia-menu-toggle.oia-menu-btn:focus, button#oia-menu-toggle.oia-menu-btn:active {
    background-color: transparent; outline: none; box-shadow: none;
}
button#oia-menu-toggle.oia-menu-btn:focus-visible { outline: 1px solid #ffc615; outline-offset: 4px; }

.oia-menu-btn__line {
    display: block; width: 24px; height: 1.5px;
    background-color: rgba(255, 255, 255, 0.9); border-radius: 0;
    transition: transform 0.35s ease, opacity 0.35s ease; pointer-events: none;
}
.oia-menu-btn.is-active .oia-menu-btn__line { opacity: 0; transform: scaleX(0); }
/* ==========================================================
   FULL-SCREEN MENU OVERLAY
   ========================================================== */
.oia-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 100000; background-color: #1086cc;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
    clip-path: circle(0% at calc(100% - 72px) 52px);
    transition: clip-path 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    pointer-events: none;
}
.oia-menu-overlay.is-open { pointer-events: auto; }

@keyframes oia-ambient {
    0%   { transform: scale(1) translate(0%, 0%); }
    33%  { transform: scale(1.06) translate(-2%, 1%); }
    66%  { transform: scale(0.97) translate(2%, -2%); }
    100% { transform: scale(1) translate(0%, 0%); }
}

.oia-menu-overlay::before {
    content: ''; position: absolute; inset: -20%;
    background: radial-gradient(ellipse 70% 60% at 50% 52%, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.03) 40%, transparent 70%);
    pointer-events: none; animation: oia-ambient 14s ease-in-out infinite; will-change: transform;
}
.oia-menu-overlay::after {
    content: ''; position: absolute; bottom: -18%; right: -10%;
    width: 70vmin; height: 70vmin; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.07);
    pointer-events: none; animation: oia-ambient 18s ease-in-out infinite reverse;
}

button#oia-menu-close.oia-menu-close {
    position: absolute; top: 28px; right: 48px; width: 52px; height: 52px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18);
    border-radius: 50%; cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; z-index: 100002;
    outline: none; box-shadow: none; -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none; appearance: none; padding: 0;
    transition: transform 0.4s ease, background 0.3s ease, border-color 0.3s ease;
}
button#oia-menu-close.oia-menu-close:hover {
    transform: rotate(90deg); background: rgba(255,198,21,0.1); border-color: rgba(255,198,21,0.4);
}
button#oia-menu-close.oia-menu-close:focus, button#oia-menu-close.oia-menu-close:active {
    background: transparent; outline: none;
}
button#oia-menu-close.oia-menu-close:focus-visible { outline: 1px solid rgba(255,198,21,0.4); outline-offset: 4px; }

.oia-menu-close span {
    position: absolute; width: 20px; height: 1.5px;
    background-color: rgba(255,255,255,0.7); border-radius: 0; transition: background-color 0.3s;
}
.oia-menu-close span:first-child { transform: rotate(45deg); }
.oia-menu-close span:last-child { transform: rotate(-45deg); }
.oia-menu-close:hover span { background-color: #ffc615; }

.oia-menu-nav {
    text-align: center; padding: 80px 20px 60px;
    width: 100%; max-width: 800px; position: relative; z-index: 1;
}
.oia-menu-nav::before {
    content: ''; position: absolute; top: -55%; left: -35%;
    width: 55vmin; height: 55vmin; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.05); pointer-events: none;
}

.oia-menu-list { list-style: none; padding: 0; margin: 0; }

.oia-menu-list li {
    margin: 0; padding: 0; opacity: 0; transform: translateY(16px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    text-align: center;
}
.oia-menu-overlay.is-open .oia-menu-list li { opacity: 1; transform: translateY(0); }

.oia-menu-overlay.is-open .oia-menu-list li:nth-child(1) { transition-delay: 0.25s; }
.oia-menu-overlay.is-open .oia-menu-list li:nth-child(2) { transition-delay: 0.35s; }
.oia-menu-overlay.is-open .oia-menu-list li:nth-child(3) { transition-delay: 0.45s; }
.oia-menu-overlay.is-open .oia-menu-list li:nth-child(4) { transition-delay: 0.55s; }
.oia-menu-overlay.is-open .oia-menu-list li:nth-child(5) { transition-delay: 0.63s; }
.oia-menu-overlay.is-open .oia-menu-list li:nth-child(6) { transition-delay: 0.71s; }
.oia-menu-overlay.is-open .oia-menu-list li:nth-child(7) { transition-delay: 0.79s; }
.oia-menu-overlay.is-open .oia-menu-list li:nth-child(8) { transition-delay: 0.87s; }
.oia-menu-overlay.is-open .oia-menu-list li:nth-child(9) { transition-delay: 0.95s; }
.oia-menu-overlay.is-open .oia-menu-list li:nth-child(10) { transition-delay: 1.03s; }
.oia-menu-overlay:not(.is-open) .oia-menu-list li { transition-delay: 0s; }

.oia-menu-list li a {
    display: inline-block; color: #fff; text-decoration: none;
    font-family: 'Josefin Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 36px; font-weight: 100; letter-spacing: 12px; text-transform: uppercase;
    padding: 22px 28px 24px;
    transition: color 0.4s, transform 0.4s, letter-spacing 0.45s, text-shadow 0.4s;
    line-height: 1.2; position: relative;
}
.oia-menu-list li a::after {
    content: ''; position: absolute; bottom: 10px; left: 50%;
    width: 36px; height: 1px; background: #ffc615;
    transform: translateX(-50%) scaleX(0); transform-origin: center;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.45s ease;
    opacity: 0;
}
.oia-menu-list li a:hover {
    color: #ffc615; transform: translateX(4px); letter-spacing: 15px;
    text-shadow: 0 0 80px rgba(255, 198, 21, 0.22);
}
.oia-menu-list li a:hover::after { transform: translateX(-50%) scaleX(1); opacity: 1; }

/* -- Bookings link — pill border highlight ----------------- */
.oia-menu-list li a[href*="bookings"],
.oia-menu-list li a[href*="bookings"]:visited {
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 99px;
    padding: 18px 44px 20px;
    transition: color 0.4s, transform 0.4s, letter-spacing 0.45s,
                text-shadow 0.4s, border-color 0.4s, background 0.4s;
}
.oia-menu-list li a[href*="bookings"]:hover {
    border-color: #ffc615;
    background: rgba(255, 198, 21, 0.08);
}

/* -- Contact button (bottom of menu) ----------------------- */
.oia-menu-contact {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 32px; color: rgba(255, 255, 255, 0.6); text-decoration: none;
    font-family: 'Josefin Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px; font-weight: 300; letter-spacing: 4px; text-transform: uppercase;
    padding: 10px 24px; border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 99px;
    transition: color 0.4s ease, border-color 0.4s ease, background 0.4s ease;
    opacity: 0; transform: translateY(12px);
}
.oia-menu-overlay.is-open .oia-menu-contact {
    opacity: 1; transform: translateY(0);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1) 1.1s,
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 1.1s,
                color 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}
.oia-menu-overlay:not(.is-open) .oia-menu-contact { transition-delay: 0s; }
.oia-menu-contact:hover { color: #fff; border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.06); }
.oia-menu-contact:visited { color: rgba(255, 255, 255, 0.6); }
/* ==========================================================
   FLOATING BOOKING FAB
   ========================================================== */
.oia-booking-fab {
    position: fixed; bottom: 22px; right: 32px; z-index: 99998;
    box-sizing: border-box; display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, #ffc615 0%, #e6a800 100%);
    color: #1a1a2e; text-decoration: none;
    font-family: 'Josefin Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
    padding: 18px 28px; border-radius: 50px;
    box-shadow: 0 4px 24px rgba(255, 198, 21, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, background 0.35s ease;
    animation: oia-fab-glow 3s ease-in-out infinite; cursor: pointer;
}
.oia-booking-fab:visited { color: #1a1a2e; text-decoration: none; }
.oia-booking-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 32px rgba(255, 198, 21, 0.5), 0 3px 12px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #ffd24d 0%, #ffc615 100%);
    color: #1a1a2e; text-decoration: none; animation: none;
}
.oia-booking-fab:active { transform: scale(0.96); }
.oia-fab-icon { flex-shrink: 0; }
.oia-fab-label { line-height: 1; }

@keyframes oia-fab-glow {
    0%, 100% { box-shadow: 0 4px 24px rgba(255, 198, 21, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 6px 36px rgba(255, 198, 21, 0.55), 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 6px rgba(255, 198, 21, 0.12); }
}

.oia-booking-fab.is-hidden {
    transform: translateY(120px); opacity: 0; pointer-events: none;
    transition: transform 0.4s ease, opacity 0.3s ease; animation: none;
}

/* ==========================================================
   RESPONSIVE — TABLET (max 1024px)
   ========================================================== */
@media (max-width: 1024px) {
    #oia-header { padding: 22px 28px; }
    #oia-header.is-scrolled { padding: 12px 28px; }
    .oia-logo { gap: 10px; }
    .oia-logo-icon { height: 50px; }
    .oia-logo-text { height: 40px; }
    #oia-header.is-scrolled .oia-logo-icon { height: 36px; }
    #oia-header.is-scrolled .oia-logo-text { height: 29px; }
    button#oia-menu-toggle.oia-menu-btn { width: 56px; height: 56px; }
    .oia-menu-btn__line { width: 20px; }
    .oia-menu-list li a { font-size: 30px; padding: 18px 24px; letter-spacing: 10px; }
    button#oia-menu-close.oia-menu-close { top: 22px; right: 28px; width: 48px; height: 48px; }
    .oia-menu-close span { width: 18px; }
    .oia-booking-fab { bottom: 18px; right: 28px; padding: 16px 24px; font-size: 13px; }
    .oia-menu-list li a[href*="bookings"] { padding: 14px 36px 16px; }
}

/* ==========================================================
   RESPONSIVE — MOBILE (max 768px)
   ========================================================== */
@media (max-width: 768px) {
    #oia-header { padding: 16px 20px; }
    #oia-header.is-scrolled { padding: 10px 20px; }
    .oia-logo { gap: 9px; }
    .oia-logo-icon { height: 52px; }
    .oia-logo-text { height: 40px; }
    #oia-header.is-scrolled .oia-logo-icon { height: 40px; }
    #oia-header.is-scrolled .oia-logo-text { height: 31px; }
    .oia-header-right { gap: 16px; }
    a.oia-header-phone svg { width: 20px; height: 20px; }
    a.oia-header-whatsapp svg { width: 22px; height: 22px; }
    button#oia-menu-toggle.oia-menu-btn { width: 50px; height: 50px; gap: 5px; }
    .oia-menu-btn__line { width: 18px; }
    .oia-menu-nav { padding: 70px 16px 40px; }
    .oia-menu-list li a { font-size: 24px; letter-spacing: 6px; padding: 22px 20px; }
    .oia-menu-list li a[href*="bookings"] { padding: 14px 32px 16px; font-size: 22px; }
    .oia-menu-contact { font-size: 11px; letter-spacing: 3px; margin-top: 24px; padding: 8px 20px; }
    button#oia-menu-close.oia-menu-close { top: 16px; right: 20px; width: 44px; height: 44px; }
    .oia-menu-close span { width: 16px; }
    .oia-booking-fab {
        bottom: 14px; right: auto; left: 50%; transform: translateX(-50%);
        padding: 15px 22px; font-size: 13px; letter-spacing: 1px; gap: 8px;
    }
    .oia-booking-fab:hover { transform: translateX(-50%) scale(1.08); }
    .oia-booking-fab:active { transform: translateX(-50%) scale(0.96); }
    .oia-booking-fab.is-hidden { transform: translateX(-50%) translateY(120px); }
    .oia-fab-icon { width: 18px; height: 18px; }
}

/* ==========================================================
   RESPONSIVE — SMALL MOBILE (max 400px)
   ========================================================== */
@media (max-width: 400px) {
    #oia-header { padding: 14px 16px; }
    #oia-header.is-scrolled { padding: 8px 16px; }
    .oia-logo { gap: 7px; }
    .oia-logo-icon { height: 46px; }
    .oia-logo-text { height: 36px; }
    #oia-header.is-scrolled .oia-logo-icon { height: 36px; }
    #oia-header.is-scrolled .oia-logo-text { height: 28px; }
    .oia-header-right { gap: 12px; }
    a.oia-header-phone svg { width: 18px; height: 18px; }
    a.oia-header-whatsapp svg { width: 20px; height: 20px; }
    button#oia-menu-toggle.oia-menu-btn { width: 44px; height: 44px; gap: 4px; }
    .oia-menu-btn__line { width: 16px; }
    .oia-menu-list li a { font-size: 20px; letter-spacing: 5px; padding: 12px 16px; }
    button#oia-menu-close.oia-menu-close { top: 14px; right: 16px; width: 40px; height: 40px; }
    .oia-menu-close span { width: 15px; }
}

@media (max-height: 500px) {
    .oia-menu-overlay { align-items: flex-start; }
    .oia-menu-nav { padding: 60px 16px 30px; }
    .oia-menu-list li a { font-size: 20px; letter-spacing: 5px; padding: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .oia-menu-overlay { transition: opacity 0.3s ease; clip-path: none !important; opacity: 0; }
    .oia-menu-overlay.is-open { opacity: 1; }
    .oia-menu-list li { transition: none; opacity: 1; transform: none; }
    .oia-menu-btn__line { transition: none; }
    .oia-logo-icon, .oia-logo:hover .oia-logo-icon, .oia-logo:focus-within .oia-logo-icon { animation: none; }
    #oia-header { transition: none; }
    .oia-logo img { transition: none; }
    a.oia-header-whatsapp { animation: none; }
}