/* ========================================
   MODERN ENHANCEMENTS FOR CHALOZY
   Modern UI/UX improvements with animations
   ======================================== */

/* ============ MODERN COLOR PALETTE ============ */
:root {
    /* Primary Brand Colors - Red Dual Tone */
    --primary-gradient: linear-gradient(135deg, #E81937 0%, #8B0000 100%);
    --primary-color: #E81937;
    --primary-dark: #8B0000;
    --primary-light: #ff2d4d;
    
    /* Accent Colors - Blue Dual Tone */
    --accent-color: #004C80;
    --accent-gradient: linear-gradient(135deg, #004C80 0%, #001f3f 100%);
    
    /* Success & Action Colors */
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    
    /* Neutral Colors */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 15px rgba(232, 25, 55, 0.2);
    
    /* Transitions - Made Faster */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ============ MODERN TYPOGRAPHY ============ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

/* ============ SMOOTH SCROLL BEHAVIOR ============ */
html {
    scroll-behavior: smooth;
}

/* ============ MODERN NAVBAR ============ */
.navbar-light {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.navbar-brand h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* Keep original logo colors - CHALO is dark, ZY is red */
.navbar-brand h1 .text-dark {
    color: #004C80 !important;
}

.navbar-brand h1 .text-primary {
    color: #E81937 !important;
}

/* Add shake animation to ZY on page load */
@keyframes shakeZY {
    0%, 100% { transform: translateX(0) rotate(0deg) scale(1); }
    10% { transform: translateX(-8px) rotate(-8deg) scale(1.1); }
    20% { transform: translateX(8px) rotate(8deg) scale(1.1); }
    30% { transform: translateX(-6px) rotate(-6deg) scale(1.05); }
    40% { transform: translateX(6px) rotate(6deg) scale(1.05); }
    50% { transform: translateX(-4px) rotate(-4deg) scale(1.02); }
    60% { transform: translateX(4px) rotate(4deg) scale(1.02); }
    70% { transform: translateX(-2px) rotate(-2deg) scale(1.01); }
    80% { transform: translateX(2px) rotate(2deg) scale(1.01); }
    90% { transform: translateX(-1px) rotate(-1deg) scale(1); }
}

/* Style for ZY shake wrapper */
.zy-shake {
    display: inline-block;
    transform-origin: center;
}

.zy-shake span {
    display: inline-block;
}

.navbar-light .navbar-nav .nav-link {
    position: relative;
    font-weight: 500;
    transition: all var(--transition-base);
    color: var(--text-dark) !important;
}

.navbar-light .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
    transition: transform var(--transition-base);
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* ============ MODERN BUTTONS ============ */
.btn {
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 50px;
    transition: all var(--transition-base);
    border: none;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white !important;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 16px;
}

/* ============ MODERN CAROUSEL ============ */
.carousel-caption {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    animation: fadeInUp 1s ease;
}

.carousel-caption h1 {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease 0.3s both;
}

.carousel-caption h4 {
    animation: fadeInUp 1s ease 0.2s both;
    letter-spacing: 3px;
    font-weight: 600;
}

.carousel-item img {
    transition: transform 8s ease;
}

.carousel-item.active img {
    transform: scale(1.1);
}

/* ============ SCROLL ANIMATIONS ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations to elements */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.2s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
}

/* ============ MODERN CARDS & SECTIONS ============ */
.about-text {
    background: white !important;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-slow);
    border: 1px solid var(--border-color);
}

.about-text:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl), 0 0 40px rgba(102, 126, 234, 0.2);
}

/* ============ FEATURE CARDS ============ */
.d-flex.mb-4 {
    padding: 25px;
    border-radius: 15px;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.d-flex.mb-4:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.d-flex.mb-4 .bg-primary {
    background: var(--primary-gradient) !important;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.d-flex.mb-4:hover .bg-primary {
    transform: rotate(5deg) scale(1.05);
    box-shadow: var(--shadow-glow);
}

/* ============ DESTINATION CARDS ============ */
.destination-item {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-slow);
    border: 2px solid transparent;
}

.destination-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.destination-item img {
    transition: transform 0.6s ease;
}

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

.destination-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    /* backdrop-filter: blur(3px); */
}

.destination-item:hover .destination-overlay {
    /* background: linear-gradient(to top, rgba(246, 156, 170, 0.75) 0%, rgba(247, 222, 222, 0.6) 100%); */
    border-width: 5px;
    border-radius: 0;
    border-color: rgba(255, 255, 255, 0.9);
}

.badge.bg-light-2 {
    background: white !important;
    color: var(--primary-color) !important;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.destination-item:hover .badge.bg-light-2 {
    transform: scale(1.1);
    background: var(--primary-gradient) !important;
    color: white !important;
}

/* ============ SERVICE CARDS ============ */
.service-item {
    border-radius: 20px;
    background: white;
    border: 2px solid var(--border-color);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.service-item:hover::before {
    transform: scaleX(1);
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-item i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.service-item:hover i {
    transform: scale(1.1) rotate(360deg);
    box-shadow: var(--shadow-glow);
}

/* ============ REGISTRATION SECTION ============ */
.bg-registration {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
}

.bg-registration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 76, 128, 0.92) 0%, rgba(0, 31, 63, 0.92) 100%);
}

.bg-registration > * {
    position: relative;
    z-index: 1;
}

/* Fix text colors in registration section */
.bg-registration h1,
.bg-registration h6,
.bg-registration p,
.bg-registration li {
    color: #ffffff !important;
}

.bg-registration .text-primary {
    color: #E81937 !important;
}

/* Make button stand out */
/* .bg-registration .btn-primary {
    background: linear-gradient(135deg, #E81937 0%, #E81000 100%) !important;
    color: #004C80 !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.4);
}

.bg-registration .btn-primary:hover {
    background: linear-gradient(135deg, #E81000 0%, #E81937 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.4);
} */

/* ============ TESTIMONIALS ============ */
.testimonial-text {
    border-radius: 20px;
    border: 2px solid var(--border-color);
    transition: all var(--transition-slow);
    background: white;
}

.testimonial-text:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.testimonial-carousel .owl-item.center .testimonial-text {
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.testimonial-carousel .owl-dot.active {
    background: var(--primary-gradient) !important;
}

/* ============ FOOTER ============ */
.bg-dark {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%) !important;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all var(--transition-base);
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* ============ BACK TO TOP BUTTON ============ */
.back-to-top {
    background: var(--primary-gradient) !important;
    border: none;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    animation: pulse 2s infinite;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow-lg);
    }
    50% {
        box-shadow: var(--shadow-xl), var(--shadow-glow);
    }
}

/* ============ PRELOADER ENHANCEMENT ============ */
#preloader {
    background: linear-gradient(135deg, #004C80 0%, #001f3f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide old loader dots */
.loader .dot {
    display: none;
}

/* Create Chalozy logo loader */
.loader {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 4rem;
    font-weight: 800;
}

.loader::before {
    content: 'CHALO';
    color: #ffffff;
    margin-right: 5px;
}

.loader::after {
    content: 'ZY';
    color: #E81937;
    display: inline-block;
    animation: loaderZYDance 1.2s ease-in-out infinite;
}

/* Dancing ZY animation for loader */
@keyframes loaderZYDance {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1); 
    }
    10% { 
        transform: translateY(-15px) rotate(-10deg) scale(1.15); 
    }
    20% { 
        transform: translateY(0) rotate(10deg) scale(1); 
    }
    30% { 
        transform: translateY(-10px) rotate(-8deg) scale(1.1); 
    }
    40% { 
        transform: translateY(0) rotate(8deg) scale(1); 
    }
    50% { 
        transform: translateY(-5px) rotate(-5deg) scale(1.05); 
    }
    60% { 
        transform: translateY(0) rotate(5deg) scale(1); 
    }
    70% { 
        transform: translateY(-3px) rotate(-3deg) scale(1.02); 
    }
    80% { 
        transform: translateY(0) rotate(3deg) scale(1); 
    }
    90% { 
        transform: translateY(-2px) rotate(-2deg) scale(1.01); 
    }
}

/* Add pulsing glow effect */
.loader::after {
    text-shadow: 
        0 0 10px rgba(232, 25, 55, 0.5),
        0 0 20px rgba(232, 25, 55, 0.3),
        0 0 30px rgba(232, 25, 55, 0.2);
}

/* ============ SECTION HEADINGS ============ */
.text-center h1 {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.text-center h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* ============ HOVER EFFECTS FOR IMAGES ============ */
img {
    transition: all var(--transition-slow);
}

.img-fluid:hover {
    transform: scale(1.02);
}

/* ============ RESPONSIVE ENHANCEMENTS ============ */
@media (max-width: 768px) {
    .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 13px;
    }
    
    .destination-item {
        margin-bottom: 20px;
    }
    
    /* Fix mobile navbar text cutoff */
    .navbar-light .navbar-nav .nav-link {
        padding: 10px 15px;
        overflow: visible;
        white-space: nowrap;
    }
    
    .navbar-light .navbar-nav .nav-link::after {
        bottom: 5px;
    }
    
    /* Ensure mobile menu has proper spacing */
    .navbar-collapse {
        overflow-y: auto;
        max-height: 80vh;
    }
    
    /* Fix navbar stuck issue on mobile */
    .navbar {
        position: relative !important;
    }
    
    .nav-bar {
        position: relative !important;
        z-index: 999 !important;
    }
    
    /* Ensure navbar toggler works properly */
    .navbar-toggler {
        z-index: 1001;
        position: relative;
    }
    
    /* Fix collapsed menu positioning */
    .navbar-collapse.collapsing,
    .navbar-collapse.show {
        position: relative;
        z-index: 1000;
    }   
}

/* ============ MODERN PRICE BADGE ============ */
span.animated-badge {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: clamp(1.1rem, 3vw, 1.5rem) !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    padding: clamp(10px, 2vw, 14px) clamp(20px, 4vw, 30px) !important;
    background: linear-gradient(135deg, #1E90FF 0%, #262728 50%, #1E90FF 100%) !important;
    background-size: 200% 200% !important;
    border-radius: 12px !important;
    box-shadow: 
        0 4px 20px rgba(30, 144, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    overflow: hidden;
    animation: glassFlare 4s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    min-width: fit-content !important;
}

/* Glass flare effect - continuous shimmer */
span.animated-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 70%
    );
    animation: glassShine 3s linear infinite;
    pointer-events: none;
}

/* Subtle pulse glow */
span.animated-badge::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1E90FF, #262728);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

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

@keyframes glassShine {
    0% {
        transform: translate(-100%, -100%) rotate(45deg);
    }
    100% {
        transform: translate(100%, 100%) rotate(45deg);
    }
}

span.animated-badge:hover {
    transform: translateY(-4px) scale(1.03) !important;
    box-shadow: 
        0 8px 30px rgba(30, 144, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

span.animated-badge:hover::after {
    opacity: 0.6;
    animation: pulseGlow 1.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Tablet adjustments */
@media (max-width: 991px) {
    span.animated-badge {
        font-size: clamp(1rem, 3.5vw, 1.3rem) !important;
        padding: clamp(9px, 2vw, 12px) clamp(18px, 4vw, 24px) !important;
    }
}

/* Mobile adjustments */
@media (max-width: 576px) {
    span.animated-badge {
        font-size: clamp(0.95rem, 4vw, 1.15rem) !important;
        padding: clamp(8px, 2vw, 10px) clamp(16px, 4vw, 20px) !important;
        border-radius: 10px !important;
    }
    
    span.animated-badge::after {
        border-radius: 10px;
    }
}

/* ============ GLASS MORPHISM EFFECTS ============ */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
}


/* ============ GRADIENT TEXT ============ */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============ LOADING STATES ============ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

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

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ============ FOCUS STATES ============ */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid var(--primary-color);
}

/* ============ PARALLAX EFFECT ============ */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
