/* Modern Design System & Variables */
:root {
    /* Brand Colors - Ocean & Sun Palette */
    --primary: #0b6aa9;
    /* Deep Ocean Blue */
    --primary-700: #094f7e;
    /* Darker Navy */
    --accent: #ffba07;
    /* Golden Sun */
    --accent-light: #ffce47;
    /* Light Sun */

    /* Neutral scale */
    --ink: #1e293b;
    /* Dark Slate (Better than pure black) */
    --ink-light: #475569;
    /* Slate Gray */
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    /* Very light gray/blue tint */
    --line: #e2e8f0;

    /* Radii */
    --r-xs: 0.25rem;
    --r-sm: 0.5rem;
    --r-md: 1rem;
    --r-lg: 1.5rem;
    --r-full: 9999px;

    /* Shadows - Layered for depth */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --dur: 0.3s;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #ff6b6b);
    z-index: 9999;
    transition: width 0.1s;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea {
    font-family: inherit;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    /* Wider container for modern screens */
    margin: 0 auto;
    padding: 0 1.5rem;
}

.skip {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.skip:focus {
    left: 1rem;
    top: 1rem;
    background: white;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    border-radius: var(--r-sm);
}

/* 
   ---------------------------
   HEADER & NAV 
   ---------------------------
*/
header {
    position: fixed;
    /* Fixed header for persistent nav */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 0;
    transition: all var(--dur) var(--ease);
}

header.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--primary-700);
}

.brand img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
}

.brand-text {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

@media (max-width: 480px) {
    .brand-text {
        display: none;
        /* Hide brand text on very small screens to save space */
    }
}

/* Desktop Nav */
.nav-desktop {
    display: none;
    /* Mobile first */
}

@media (min-width: 900px) {
    .nav-desktop {
        display: flex;
        gap: 0.5rem;
    }
}

.nav-link {
    color: var(--ink);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--r-full);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

/* Mobile Toggle */
.hamb {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1100;
}

@media (min-width: 900px) {
    .hamb {
        display: none;
    }
}

.hamb span {
    width: 28px;
    height: 3px;
    background: var(--primary-700);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamb.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamb.active span:nth-child(2) {
    opacity: 0;
}

.hamb.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switcher {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-light);
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: var(--r-xs);
    transition: all 0.2s;
}

.lang-btn.active,
.lang-btn:hover {
    color: var(--primary);
    background: var(--bg-alt);
    border-color: var(--line);
}

@media (max-width: 480px) {
    .header-actions {
        gap: 0.5rem;
    }

    .lang-switcher {
        gap: 0.1rem;
    }

    .lang-btn {
        padding: 0.15rem 0.35rem;
        font-size: 0.75rem;
    }
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}

.close-menu {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 3rem;
    color: var(--ink);
    cursor: pointer;
    z-index: 1060;
    line-height: 1;
    transition: transform 0.2s, color 0.2s;
}

.close-menu:hover {
    color: var(--primary);
    transform: scale(1.1);
}

/* 
   ---------------------------
   WEATHER WIDGET 
   ---------------------------
*/
.weather-widget {
    position: fixed;
    top: 6.5rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--r-md);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    color: var(--ink);
    z-index: 20;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.weather-widget:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.weather-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.weather-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.weather-temp {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--primary-700);
}

.weather-loc {
    font-size: 0.75rem;
    color: var(--ink-light);
}

@media (max-width: 768px) {
    .weather-widget {
        top: 5.5rem;
        right: 1.25rem;
        padding: 0.5rem 0.75rem;
        background: rgba(255, 255, 255, 0.6);
    }

    .weather-icon {
        font-size: 1.5rem;
    }

    .weather-temp {
        font-size: 1rem;
    }

    .weather-loc {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .weather-widget {
        top: auto;
        bottom: 7rem;
        right: 1rem;
        left: auto;
        padding: 0.4rem 0.6rem;
        border-radius: var(--r-sm);
        gap: 0.4rem;
        background: rgba(255, 255, 255, 0.55);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        font-size: 0.85rem;
    }

    .weather-widget:hover {
        transform: translateY(-2px);
    }

    .weather-icon {
        font-size: 1.2rem;
    }

    .weather-temp {
        font-size: 0.85rem;
    }

    .weather-loc {
        font-size: 0.65rem;
    }
}

/* 
   ---------------------------
   HERO SECTION 
   ---------------------------
*/
.hero {
    position: relative;
    min-height: 90vh;
    /* Full viewport height impact */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--primary-700);
    /* Fallback */
    color: white;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    /* Simple Parallax would be done via JS or just fixed attachment if supported */
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 2rem;
    max-width: 800px;
    animation: fadeUp 1s ease-out;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    opacity: 0.9;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--ink);
    padding: 0.9rem 2rem;
    border-radius: var(--r-full);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-lg);
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--accent-light);
    box-shadow: 0 15px 30px rgba(255, 186, 7, 0.3);
}

/* 
   ---------------------------
   SECTIONS & CARDS 
   ---------------------------
*/
section {
    padding: 5rem 0;
}

section:nth-of-type(even) {
    background: var(--bg-alt);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.25rem;
    color: var(--primary-700);
    margin: 0 0 1rem;
}

.section-title .divider {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto;
    border-radius: 2px;
}

/* Apartments Grid - Force 2 columns for 4 items balance */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

@media (min-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        /* Force 2x2 layout for 4 items */
    }
}

.card {
    background: white;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--ease);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.card-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-700));
    padding: 1.5rem;
    position: relative;
    color: white;
}

.card-header h3 {
    margin: 0.5rem 0 0;
    font-size: 1.4rem;
    color: white;
}

.card-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--ink);
    padding: 0.2rem 0.6rem;
    border-radius: var(--r-full);
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-unique {
    font-size: 1.05rem;
    color: var(--ink);
    margin: 0 0 1rem;
    font-weight: 500;
}

.card-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--ink-light);
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

/* Wave Animation */
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 20;
}

.wave {
    display: block;
    width: 200%;
    height: 60px;
    position: relative;
    opacity: 0.8;
    animation: moveWave 6s linear infinite;
    transform: translate3d(0, 0, 0);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 24 150 28' preserveAspectRatio='none'%3E%3Cdefs%3E%3Cpath id='a' d='M-160 44c30 0 58-18 88-18s58 18 88 18 58-18 88-18 58 18 88 18v44h-352z'/%3E%3C/defs%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cuse xlink:href='%23a' x='48' y='0'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 50% 100%;
}

.wave:nth-child(2) {
    position: absolute;
    bottom: 0;
    opacity: 0.5;
    animation: moveWave 10s linear infinite;
    z-index: 1;
}

.wave:nth-child(3) {
    position: absolute;
    bottom: 0;
    opacity: 0.3;
    animation: moveWave 15s linear infinite;
    z-index: 0;
}

@keyframes moveWave {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-25%);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Splash Click Effect */
.splash {
    position: fixed;
    width: 20px;
    height: 20px;
    background: rgba(11, 106, 169, 0.6);
    /* Primary Blue transparent */
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    animation: splashData 0.8s ease-out forwards;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(11, 106, 169, 0.4);
}

@keyframes splashData {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

.card-body {
    padding: 1.5rem;
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: var(--ink);
    padding: 0.25rem 0.75rem;
    border-radius: var(--r-full);
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: var(--primary-700);
}

/* Gallery Masonry */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 1rem;
    grid-auto-rows: minmax(100px, auto);
}

.gallery-item {
    position: relative;
    border-radius: var(--r-md);
    overflow: hidden;
    cursor: zoom-in;
    break-inside: avoid;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* 
   ---------------------------
   AVAILABILITY SECTION
   ---------------------------
*/
.availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.avail-card {
    background: white;
    border-radius: var(--r-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--accent);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.avail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, rgba(255, 186, 7, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 0;
}

.avail-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.avail-header h3 {
    margin: 0 0 1rem;
    color: var(--primary-700);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.avail-badge {
    font-size: 0.8rem;
    background: var(--bg-alt);
    color: var(--ink-light);
    padding: 0.2rem 0.6rem;
    border-radius: var(--r-full);
    align-self: flex-start;
    border: 1px solid var(--line);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.avail-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex: 1;
    position: relative;
    z-index: 1;
}

.avail-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--ink);
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
}

.avail-list li:last-child {
    border-bottom: none;
}

.avail-list li>span:not(.icon) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.avail-list .icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-top: 2px;
}

.badge-sub {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--r-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-sub.glow {
    background: rgba(11, 106, 169, 0.1);
    color: var(--primary-700);
}

.badge-sub.outline {
    background: transparent;
    border: 1px solid var(--primary-700);
    color: var(--primary-700);
}

.btn-small {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.rules-box {
    margin-top: 3rem;
    background: white;
    padding: 2rem;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary);
}

/* 
   ---------------------------
   FORMS & FOOTER 
   ---------------------------
*/
form {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 500;
    color: var(--primary-700);
}

input,
textarea {
    padding: 0.9rem;
    border: 2px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 1rem;
    /* Prevent zoom on mobile */
    transition: border-color 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

footer {
    background: var(--primary-700);
    color: white;
    padding: 4rem 0 2rem;
    text-align: center;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer-socials a {
    color: white;
    opacity: 0.7;
    font-size: 1.5rem;
    transition: opacity 0.2s;
}

.footer-socials a:hover {
    opacity: 1;
}

/* FAB (Floating Action) for mobile */
.fab-container {
    display: none;
    /* Desktop default off */
}

@media (max-width: 768px) {
    .bookbar {
        display: none;
    }

    /* Hide the old stickty bar on tiny inputs */
    .fab-container {
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        z-index: 900;
    }

    .fab {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        box-shadow: var(--shadow-lg);
        font-size: 1.5rem;
        color: white;
        text-decoration: none;
    }

    .fab-wa {
        background: #25D366;
    }

    .fab-call {
        background: var(--primary);
    }

    .fab-mail {
        background: #EA4335;
    }
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal Class */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, var(--primary-700), var(--primary));
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    border-radius: var(--r-md);
    margin: 4rem auto;
    max-width: 1000px;
    box-shadow: 0 15px 30px rgba(11, 106, 169, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: rotateSlow 20s linear infinite;
    pointer-events: none;
}

@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.cta-banner h2 {
    font-size: 2.5rem;
    margin: 0 0 1rem;
    color: white;
}

.cta-banner p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-banner .btn {
    background: white;
    color: var(--primary-700);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-banner .btn:hover {
    background: var(--bg-alt);
    color: var(--primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}