html,
body {
    overflow-x: hidden;
}

body {
    font-family: "Inter", sans-serif;
    background-color: #f7f3e9;
    background-color: var(--tw-bg-bg-body, #f7f3e9);
    color: #2c3e50;
}

/* Floating animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Custom reveal animations */
.reveal-on-scroll {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.645, 0.045, 0.355, 1),
        transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.reveal-on-scroll.slide-in-from-left {
    transform: translateX(-40px);
}
.reveal-on-scroll.slide-in-from-right {
    transform: translateX(40px);
}
.reveal-on-scroll.zoom-in {
    transform: scale(0.95);
}
.reveal-on-scroll.fade-in-up {
    transform: translateY(40px);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateX(0) scale(1) translateY(0);
}

/* Custom gradient text */
.gradient-text {
    background: linear-gradient(45deg, #2a9d8f, #264653);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Section connector styling */
.section-connector {
    position: relative;
}
.section-connector::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -50px;
    transform: translateX(-50%);
    width: 2px;
    height: 50px;
    background-color: #e0e0e0;
}

/* Animated gradient background for hero */
.animated-gradient-bg {
    background: linear-gradient(-45deg, #f7f3e9, #e6ded4, #f0e9dd, #f7f3e9);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Interactive phone mockup style */
.phone-mockup {
    transition: transform 0.4s ease-out;
}
.phone-mockup:hover {
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) scale(1.05);
}

/* Class for hero decorative elements that react to mouse */
.hero-float {
    transition: transform 0.2s ease-out;
}

/* Header scroll effect */
header {
    transition: all 0.3s ease-in-out;
}
header.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Interactive phone screen styles */
.phone-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px;
    background-color: var(--tw-bg-bg-body);
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 0;
    transform: translateX(100%); /* Changed from 20px to 100% */
    pointer-events: none;
}
.phone-view.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.phone-tab {
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.phone-tab:hover {
    transform: scale(1.03);
    background-color: rgba(255, 255, 255, 1);
}
.phone-tab.active-tab {
    box-shadow: 0 0 0 2px var(--tw-color-primary);
}

/* --- Gallery Grid Styles --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 250px;
    grid-auto-flow: dense;
    gap: 1rem;
}

/* Classes to create a dynamic masonry effect */
.tall {
    grid-row: span 2;
}

.wide {
    grid-column: span 2;
}

.gallery-item {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1),
        opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.gallery-item.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.gallery-item img {
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.gallery-item .overlay {
    transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

/* --- Fullscreen Lightbox Styles --- */
#lightbox {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    transition: transform 0.3s ease-in-out;
    transform: scale(0.95);
    max-width: 90vw;
    max-height: 85vh;
}

#lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-btn {
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#close-btn {
    color: #d1d5db;
    transition: color 0.2s ease, transform 0.2s ease;
}

#close-btn:hover {
    color: white;
    transform: scale(1.2) rotate(90deg);
}
