/* ─── Animations ──────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

.animate-fadeIn { animation: fadeIn 0.6s ease-out forwards; }
.animate-fadeInUp { animation: fadeInUp 0.6s ease-out forwards; }

/* ─── Scroll Animate ─────────────────────────────── */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Header ─────────────────────────────────────── */
#main-header {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#main-header.transparent {
    background: transparent;
}
#main-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* Nav link colors based on header state */
#main-header.transparent .nav-link { color: rgba(255, 255, 255, 0.85); }
#main-header.transparent .nav-link:hover,
#main-header.transparent .nav-link.active { color: #fff; background: rgba(255, 255, 255, 0.1); }
#main-header.transparent .header-text-color { color: #fff; }
#main-header.transparent .header-subtext-color { color: rgba(255, 255, 255, 0.7); }

#main-header.scrolled .nav-link { color: #374151; }
#main-header.scrolled .nav-link:hover,
#main-header.scrolled .nav-link.active { color: #d4872f; background: #fdf8f0; }
#main-header.scrolled .header-text-color { color: #1f2937; }
#main-header.scrolled .header-subtext-color { color: #6b7280; }

/* Non-home pages: always scrolled style */
body:not(.home-page) #main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}
body:not(.home-page) #main-header .nav-link { color: #374151; }
body:not(.home-page) #main-header .nav-link:hover,
body:not(.home-page) #main-header .nav-link.active { color: #d4872f; background: #fdf8f0; }
body:not(.home-page) #main-header .header-text-color { color: #1f2937; }
body:not(.home-page) #main-header .header-subtext-color { color: #6b7280; }

/* ─── Hero Slider ────────────────────────────────── */
#hero-slider { position: relative; }

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}
.slide.active { opacity: 1; z-index: 2; }

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 100%);
}

.slide-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 0 8%;
    max-width: 800px;
}

.slide.active .animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}
.slide:not(.active) .animate-fadeInUp {
    opacity: 0;
    animation: none;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}
.slider-btn:hover { background: rgba(255,255,255,0.3); }
.slider-prev { left: 24px; }
.slider-next { right: 24px; }

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}
.slider-dot.active {
    background: #d4872f;
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.2);
}

/* ─── Line Clamp ─────────────────────────────────── */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ─── Page Header ────────────────────────────────── */
.page-header {
    padding-top: 120px;
    padding-bottom: 60px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ─── Gallery Lightbox ────────────────────────────── */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
}
.gallery-lightbox.active { display: flex; }

/* ─── Smooth scroll ──────────────────────────────── */
html { scroll-behavior: smooth; }

/* ─── Form focus ─────────────────────────────────── */
input:focus, select:focus, textarea:focus {
    outline: none;
}
