/*
 * Serengeti Safaris v2 - Homepage Styles
 * Premium luxury safari website styles
 * Complements Tailwind CSS with custom animations and effects
 */

/* ============================================
   CSS CUSTOM PROPERTIES
============================================ */
:root {
    --gold-gradient: linear-gradient(135deg, #1E4620, #2d6b33);
    --gold-gradient-hover: linear-gradient(135deg, #153217, #1E4620);
    --dark-overlay: linear-gradient(135deg, rgba(17,24,39,0.92), rgba(17,24,39,0.7));
    --hero-overlay: linear-gradient(to right, rgba(17,24,39,0.85) 0%, rgba(17,24,39,0.5) 50%, rgba(17,24,39,0.2) 100%);
    --glass-bg: rgba(255,255,255,0.08);
    --glass-border: rgba(255,255,255,0.12);
}

/* ============================================
   SMOOTH SCROLLING & BASE
============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   HERO SECTION
============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hero-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 1.5s ease-in-out, transform 8s ease-out;
    transform: scale(1);
}

.hero-bg-slide.active {
    opacity: 1;
    transform: scale(1.05);
}

.hero-bg-slide:not(.active) {
    opacity: 0;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(17,24,39,0.88) 0%, rgba(17,24,39,0.6) 50%, rgba(17,24,39,0.3) 100%);
    z-index: 1;
}

.hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17,24,39,0.6) 0%, transparent 30%);
}

/* ============================================
   HERO GLASSMORPHISM SEARCH CARD (Legacy - kept for reference)
============================================ */
.hero-glass-card {
    background: rgba(17, 24, 39, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.02));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ============================================
   HERO COMPACT FLOATING CARD (New)
============================================ */
.hero-compact-card {
    background: rgba(17, 24, 39, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 163, 115, 0.2);
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    max-height: 220px;
    overflow: visible;
}

.hero-compact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.25rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(212,163,115,0.25), rgba(255,255,255,0.05), rgba(212,163,115,0.15));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ============================================
   HERO COMPACT FORM INPUTS
============================================ */
.hero-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 163, 115, 0.2);
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    height: 2.5rem;
    line-height: 1;
}

.hero-select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(212, 163, 115, 0.5);
    box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.1);
}

.hero-select option {
    background: #1a1a2e;
    color: #ffffff;
    padding: 8px;
    font-size: 0.8125rem;
}

.hero-select::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* Honeypot hidden field */
.hero-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Submit Button */
.hero-submit-btn {
    background: linear-gradient(135deg, #D4A373, #c49262);
    color: #111827;
    height: 2.5rem;
    border: none;
    cursor: pointer;
}

.hero-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #c49262, #b8814f);
    box-shadow: 0 4px 15px rgba(212, 163, 115, 0.3);
    transform: translateY(-1px);
}

.hero-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   GLASSMORPHISM SEARCH CARD (Quick Search below hero)
============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.dark .glass-card {
    background: rgba(29, 29, 29, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   PACKAGE CARDS
============================================ */
.package-card {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.package-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
}

.package-card .card-image {
    overflow: hidden;
}

.package-card:hover .card-image img {
    transform: scale(1.1);
}

.package-card .card-image img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.package-card .quick-actions {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.package-card:hover .quick-actions {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   DESTINATION CARDS
============================================ */
.destination-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
}

.destination-card .dest-image {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.destination-card:hover .dest-image {
    transform: scale(1.08);
}

.destination-card .dest-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    transition: background 0.4s ease;
}

.destination-card:hover .dest-overlay {
    background: linear-gradient(to top, rgba(30,70,32,0.8) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.destination-card .dest-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    z-index: 2;
    transition: transform 0.4s ease;
}

.destination-card:hover .dest-content {
    transform: translateY(-8px);
}

.destination-card .dest-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease 0.1s;
}

.destination-card:hover .dest-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   TRUST / WHY CHOOSE US CARDS
============================================ */
.trust-card {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.trust-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.trust-card:hover::before {
    transform: scaleX(1);
}

.trust-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

.trust-icon {
    transition: all 0.4s ease;
}

.trust-card:hover .trust-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* ============================================
   BLOG CARDS
============================================ */
.blog-card {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.2);
}

.blog-card .blog-image {
    overflow: hidden;
}

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

.blog-card .blog-image img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   CUSTOM SAFARI BUILDER SECTION
============================================ */
.builder-section {
    position: relative;
    overflow: hidden;
}

.builder-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(30,70,32,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.builder-step {
    transition: all 0.4s ease;
}

.builder-step:hover {
    transform: translateX(8px);
}

.builder-step .step-number {
    transition: all 0.4s ease;
}

.builder-step:hover .step-number {
    background: linear-gradient(135deg, #1E4620, #2d6b33);
    color: white;
    transform: scale(1.1);
}

/* ============================================
   COUNTER ANIMATION
============================================ */
.counter-item {
    text-align: center;
}

.counter-value {
    font-family: 'Gentium Basic', Georgia, serif;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   TESTIMONIAL CARDS
============================================ */
.testimonial-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

/* ============================================
   CTA SECTION
============================================ */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--dark-overlay);
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.shimmer-text {
    background: linear-gradient(90deg, #1E4620 0%, #2d6b33 25%, #D4A373 50%, #2d6b33 75%, #1E4620 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* ============================================
   SCROLL ANIMATIONS (GSAP Fallback)
============================================ */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="fade-right"] {
    transform: translateX(-40px);
}

[data-animate="fade-right"].animated {
    transform: translateX(0);
}

[data-animate="fade-left"] {
    transform: translateX(40px);
}

[data-animate="fade-left"].animated {
    transform: translateX(0);
}

[data-animate="fade-up-scale"] {
    transform: translateY(40px) scale(0.95);
}

[data-animate="fade-up-scale"].animated {
    transform: translateY(0) scale(1);
}

/* ============================================
   FORM STYLES
============================================ */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input:focus {
    border-color: #1E4620;
    box-shadow: 0 0 0 4px rgba(30, 70, 32, 0.1);
}

/* ============================================
   CUSTOM SCROLLBAR
============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1E4620, #153217);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2d6b33, #1E4620);
}

/* ============================================
   LOADING SPINNER
============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(30, 70, 32, 0.2);
    border-top-color: #1E4620;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   LAZY LOAD IMAGES
============================================ */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([src=""]) {
    opacity: 1;
}

/* ============================================
   ALPINE.JS CLOAK
============================================ */
[x-cloak] {
    display: none !important;
}

/* ============================================
   LINE CLAMP UTILITIES
============================================ */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
============================================ */
@media (max-width: 1024px) {
    .hero-section {
        min-height: auto;
        padding-bottom: 0;
    }

    .hero-compact-card {
        max-height: none;
        max-width: 36rem;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 100svh;
    }

    .glass-card {
        backdrop-filter: blur(10px);
    }

    .hero-compact-card {
        max-width: 100%;
        padding: 1rem;
    }

    .hero-compact-card .grid {
        gap: 0.5rem;
    }
}

@media (max-width: 640px) {
    .hero-section .grid {
        gap: 0;
    }

    .hero-compact-card {
        max-height: none;
    }
}

/* ============================================
   PRINT STYLES
============================================ */
@media print {
    header, footer, .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}
