/* ============================================================================
   VILLA NICKOLAS - COMPLETE STYLESHEET
   Organized by page structure matching index (1) (1).html
   ============================================================================ */

/* ============================================================================
   1. COLOR VARIABLES & THEME
   ============================================================================ */
:root {
    /* Palette A - Classic Light Blue + Gold */
    --primary: #000000;
    --primary-rgb: 135, 206, 235;
    --primary-dark: #000000;
    --secondary: #000000;
    --accent: #000000;
    --accent-light: #faefc9;
    --light-bg: #ffffff;
    --muted-bg: #f8fafb;
    --dark-bg: #0f1729;
    --card-bg: #ffffff;
}

/* ============================================================================
   2. BASE & GLOBAL STYLES
   ============================================================================ */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

section {
    scroll-margin-top: 90px;
}

main#main-content > section {
    position: relative;
}

main#main-content > section + section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(92%, 1100px);
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(148, 163, 184, 0.65), rgba(0, 0, 0, 0));
    pointer-events: none;
}

/* ============================================================================
   3. UTILITY CLASSES & THEME COLORS
   ============================================================================ */
.text-primary { color: var(--primary) !important; }
.bg-primary { background: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.icon-accent { color: var(--accent) !important; }
.btn-primary { 
    background: #f1f5f9;
    color: #111827;
    border: 2px solid #92400e;
    border-radius: 6px;
    min-height: 36px;
    box-shadow: none;
    transition: all 0.2s;
}
.btn-primary:hover { 
    background: #92400e;
    color: #fff;
    border-color: #92400e;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   4. ANIMATIONS & EFFECTS
   ============================================================================ */
.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.8);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-alt {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hover-lift {
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

#rooms .rounded-lg,
#gallery .rounded-lg,
#beach-bar .rounded-lg,
#contact .rounded-lg {
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.pulse-border {
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0); }
}

.card-gradient {
    background: linear-gradient(135deg, var(--card-bg) 0%, #f1f7fb 100%);
}

.float-animation {
    animation: floatMove 3s ease-in-out infinite;
}

@keyframes floatMove {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================================
   5. HEADER & NAVIGATION
   ============================================================================ */
/* 
   <header class="fixed w-full z-50 glass-effect" ...>
   Layout: Logo + Desktop Navigation + Mobile Menu Button
   Uses Tailwind: fixed, w-full, z-50, glass-effect, flexbox, grid
   Custom CSS: glass-effect (backdrop-filter + dark background)
*/

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.site-header .nav-shell {
    transition: background 0.3s ease, box-shadow 0.3s ease, border-radius 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

.site-header.nav-floating {
    background: transparent;
    box-shadow: none;
}

.site-header.nav-floating .nav-shell {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 9999px;
    padding: 0.35rem 1.25rem;
    margin: 0.75rem auto;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.site-header.nav-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.site-header.nav-scrolled .nav-shell {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0 auto;
    box-shadow: none;
}

@media (max-width: 768px) {
    .site-header.nav-floating .nav-shell {
        margin: 0.5rem 0.75rem;
        border-radius: 20px;
    }
}

/* Mobile Menu (Hidden on desktop) - handled by Tailwind hidden/md:hidden classes */

/* Mobile menu link styling - ensure proper font size and padding */
#mobile-menu a {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    padding: 1rem 1rem !important;
}

.language-select {
    min-width: 72px;
    height: 34px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 0.6rem;
    cursor: pointer;
}

.language-select:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.45);
}

@media (max-width: 768px) {
    #mobile-menu a {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        padding: 1rem 1rem !important;
    }

    .language-select {
        min-width: 100%;
        height: 40px;
        font-size: 0.95rem;
    }
}

/* ============================================================================
   6. HERO SECTION - #home
   ============================================================================ */
/*
   <section id="home" class="hero-section ...>
   - Background image with blur effect
   - Overlay gradient to white
   - Centered content with animations
   - CTA button to scroll to rooms
*/

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--muted-bg);
    padding-top: 4rem;
}

.hero-bg {
    /* Background layer with blur and scale */
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, rgba(177, 177, 177, 0.575), rgba(255, 255, 255, 0.15)), url('villa-nickollas.jpg');
    background-size: cover;
    background-position: center;
    filter: none;
    transform: scale(1);
    z-index: 0;
}

.hero-overlay {
    /* Semi-transparent white gradient overlay */
    position: absolute;
    inset: 0;
    z-index: 5;
}

.hero-content {
    /* Text content centered above background */
    position: relative;
    z-index: 10;
}

/* Main page typography hierarchy */
#heroTagline {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: clamp(0.72rem, 1.4vw, 0.85rem);
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

#hero-title {
    letter-spacing: -0.01em;
    line-height: 1.08;
    color: #fff;
}

#hero-title .gradient-text {
    background: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
}

#heroSubtitle {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

#heroCtaBtn {
    background: #f1f5f9 !important;
    color: #111827 !important;
    border: 2px solid #92400e !important;
    border-radius: 6px;
    padding: 6px 14px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: none;
}

#heroCtaBtn:hover {
    background: #92400e !important;
    color: #fff !important;
    border-color: #92400e !important;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2) !important;
}

.hero-content #heroTagline,
.hero-content #hero-title,
.hero-content #heroSubtitle,
.hero-content #heroCtaBtn {
    opacity: 0;
    will-change: transform, opacity, filter;
}

.hero-content #heroTagline {
    animation: heroFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

.hero-content #hero-title {
    animation: heroTitleReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.hero-content #heroSubtitle {
    animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.hero-content #heroCtaBtn {
    animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}

#hero-title .gradient-text {
    background-size: 200% auto;
    animation: heroGradientShift 6s linear infinite;
}

@keyframes heroFadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroTitleReveal {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(0.985);
    }
    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes heroGradientShift {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-content #heroTagline,
    .hero-content #hero-title,
    .hero-content #heroSubtitle,
    .hero-content #heroCtaBtn {
        animation: none !important;
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
    }

    #hero-title .gradient-text {
        animation: none !important;
    }
}

#roomsHeading,
#galleryHeading,
#beachHeading,
#locationHeading,
#contactHeading {
    letter-spacing: -0.01em;
    line-height: 1.18;
}

#beachSubheading {
    letter-spacing: -0.01em;
    line-height: 1.2;
}

#beachText1,
#beachText2,
#contactPrompt {
    line-height: 1.75;
    color: #1f2937;
}

/* ============================================================================
   7. ROOMS & SUITES SECTION - #rooms
   ============================================================================ */
/*
   <section id="rooms" class="py-20 bg-gradient-to-b ...>
   - Gradient background from white to light gray
   - Section heading with underline
   - 3-column responsive grid of room cards
   - Each card has: image, title, description, book link
   - Hover effects: border color change, shadow expansion
*/

#rooms h2 span {
    /* Underline beneath section heading */
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--primary);
}

/* Room cards - handled by Tailwind grid layout and inline styles */

/* ============================================================================
   8. GALLERY SECTION - #gallery
   ============================================================================ */
/*
   <section id="gallery" class="py-20 bg-white">
   - White background
   - Section heading with underline
   - 3-column responsive grid of gallery images
   - Images with hover overlay text
*/

#gallery h2 span {
    /* Underline beneath section heading */
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--primary);
}

/* Gallery items - handled by Tailwind grid layout and inline styles */

/* ============================================================================
   9. LOCATION SECTION - #location
   ============================================================================ */
/*
   <section id="location" class="py-20 bg-white">
   - White background
   - Section heading with underline
   - Embedded Google Map with border and shadow
*/

#location h2 span {
    /* Underline beneath section heading */
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--primary);
}

/* Google Maps - handled by Tailwind and inline styles */

/* ============================================================================
   10. CONTACT SECTION - #contact
   ============================================================================ */
/*
   <section id="contact" class="py-20 bg-white">
   - White background
   - Section heading with underline
   - Two-column layout: contact info + contact form
   - Contact info: text, list items with icons, social buttons
   - Contact form: labels, inputs, textarea, submit button
*/

#contact h2 span {
    /* Underline beneath section heading */
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--primary);
}

/* Contact elements - handled by Tailwind and inline styles */

/* ============================================================================
   11. FOOTER
   ============================================================================ */
/*
   <footer class="bg-white py-8">
   - White background with top border
   - 3-column grid: company info, quick links, info text
   - Each column has: heading, content (p or ul)
   - Bottom section with year and heart icon
*/

/* Footer elements - handled by Tailwind and inline styles */

/* Bottom section with copyright and heart icon - handled by Tailwind and inline styles */

/* ============================================================================
   12. RESPONSIVE DESIGN & MOBILE TWEAKS
   ============================================================================ */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .site-header .h-16 > div.md\:hidden {
        margin-left: auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    section {
        padding: 3.5rem 1rem !important;
    }

    .site-header.nav-floating .nav-shell,
    .site-header.nav-scrolled .nav-shell {
        margin: 0.5rem 0.75rem;
        border-radius: 16px;
        padding: 0.4rem 0.9rem;
    }

    #mobile-menu-button {
        position: relative;
        top: auto;
        right: auto;
        z-index: 80;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 10px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    }

    #mobile-menu {
        position: fixed !important;
        top: 4rem !important;
        left: 0.75rem !important;
        right: 0.75rem !important;
        width: auto !important;
        max-height: calc(100vh - 5rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 14px;
        z-index: 75;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(15, 23, 42, 0.1);
        backdrop-filter: blur(10px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    }

    #mobile-menu a {
        color: #111827 !important;
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        padding: 0.85rem 1rem !important;
    }

    #mobile-menu .room-select-btn {
        margin: 0.5rem 0.85rem 0.85rem;
        border-radius: 12px;
    }

    .hero-bg {
        background-attachment: scroll;
        filter: none;
        transform: none;
        background-position: center top;
    }

    .hero-section {
        min-height: 82vh;
        padding: 5.25rem 1rem 2.5rem;
    }

    #hero-title,
    .hero-content h1 {
        font-size: clamp(2rem, 9vw, 2.6rem) !important;
        line-height: 1.15;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.15rem;
    }

    #rooms h2,
    #gallery h2,
    #beach-bar h2,
    #location h2,
    #contact h2 {
        font-size: clamp(1.65rem, 7vw, 2rem) !important;
        margin-bottom: 1.75rem !important;
    }

    #rooms .mt-12,
    #gallery .mt-12 {
        margin-top: 1.75rem !important;
    }

    #rooms .h-64,
    #gallery .h-72 {
        height: 13.5rem;
    }

    #location .h-96 {
        height: 18rem;
    }

    #contact .space-y-4 li {
        align-items: flex-start;
        gap: 0.6rem;
        line-height: 1.4;
    }

    #contact form input,
    #contact form textarea,
    #contact form button,
    #rooms a[href="booking.html"],
    #gallery a[href="gallery.html"],
    #beach-bar a[href="gallery.html"],
    #rooms a[href="Double Rooms.html"] {
        min-height: 44px;
    }

    .hover-lift:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    section {
        padding: 3rem 0.85rem !important;
    }

    .site-header.nav-floating .nav-shell,
    .site-header.nav-scrolled .nav-shell {
        margin: 0.45rem 0.55rem;
        padding: 0.35rem 0.75rem;
    }

    #mobile-menu {
        left: 0.55rem !important;
        right: 0.55rem !important;
    }

    #mobile-menu .room-select-btn {
        margin-left: 0.65rem;
        margin-right: 0.65rem;
    }

    #hero-title,
    .hero-content h1 {
        font-size: clamp(1.7rem, 10vw, 2.2rem) !important;
    }

    #contact .text-lg,
    #beach-bar .text-lg {
        font-size: 0.98rem !important;
    }
}

/* ============================================================================
   END OF STYLESHEET
   ============================================================================ */
/* Nudge desktop nav text slightly downward */
@media (min-width: 768px) {
  header nav a,
  .nav-btn {
    display: inline-block;
    transform: translateY(5px);
    transition: transform .18s ease;
  }
  header nav a:hover,
  .nav-btn:hover,
  header nav a:focus,
  .nav-btn:focus {
    transform: translateY(1px);
  }
}
