/* ========================================
   Casa Floresta - Custom Styles
   ======================================== */

/* Smooth scrolling & Overflow Lock */
html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}


/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f2f6fa;
}
::-webkit-scrollbar-thumb {
    background: #73a5d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4682b4;
}

/* ---- Navbar Scrolled ---- */
.navbar-scrolled {
    background: rgba(22, 40, 58, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.75);
}

/* ---- Hero Slideshow ---- */
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ---- Gallery Masonry ---- */
.gallery-grid {
    display: block;
}

@media (min-width: 640px) {
    .gallery-grid {
        columns: 2;
        column-gap: 16px;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        columns: 3;
    }
}

@media (min-width: 1280px) {
    .gallery-grid {
        columns: 4;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(22, 40, 58, 0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ---- Lightbox ---- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background 0.3s ease;
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ---- Space Cards ---- */
.space-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.space-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(22, 40, 58, 0.2);
}

.space-card img {
    transition: transform 0.6s ease;
}

.space-card:hover img {
    transform: scale(1.08);
}

/* ---- Divider ---- */
.section-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4682b4, #708090);
    border-radius: 2px;
}

/* ---- Menu Category Card ---- */
.menu-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(115, 165, 208, 0.15);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s ease;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(22, 40, 58, 0.12);
    border-color: rgba(115, 165, 208, 0.35);
}

/* ---- Parallax-style sections ---- */
.parallax-bg {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* ---- Hamburger Animation ---- */
.menu-open .hamburger-lines span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-open .hamburger-lines span:nth-child(2) {
    opacity: 0;
}

.menu-open .hamburger-lines span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ---- Counter Animation ---- */
.counter {
    font-variant-numeric: tabular-nums;
}

/* ---- Loading Skeleton ---- */
.img-skeleton {
    background: linear-gradient(90deg, #e1edf4 25%, #c8dceb 50%, #e1edf4 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Contact Form ---- */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #c8dceb;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #223d55;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #708090;
    box-shadow: 0 0 0 3px rgba(112, 128, 144, 0.15);
}

.form-input::placeholder {
    color: #4682b4;
    opacity: 0.5;
}

/* ---- Pulse WhatsApp ---- */
#whatsapp-float {
    animation: whatsapp-pulse 2s ease-in-out infinite;
}

@keyframes whatsapp-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
}
