/* ============================================
   CUSTOM STYLES & ANIMATIONS
   ============================================ */

/* Custom Royal Blue Color - Primary Accent */
:root {
    --royal-blue: #4169E1;
    --royal-blue-dark: #2B4FCC;
}

/* TailwindCSS Custom Color Configuration */
.tailwind-config {
    --royal-blue: #4169E1;
}

/* Apply royal blue color classes */
.text-royal-blue {
    color: var(--royal-blue);
}

.bg-royal-blue {
    background-color: var(--royal-blue);
}

.bg-royal-blue-dark {
    background-color: var(--royal-blue-dark);
}

.hover\:bg-royal-blue-dark:hover {
    background-color: var(--royal-blue-dark);
}

.ring-royal-blue {
    --tw-ring-color: var(--royal-blue);
}

.focus\:ring-royal-blue:focus {
    --tw-ring-color: var(--royal-blue);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
body {
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */
.nav-link {
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--royal-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Sticky header enhancement */
header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ============================================
   HERO SECTION ANIMATIONS
   ============================================ */
.fade-in {
    animation: fadeIn 1.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Video container styling */
.video-container {
    position: relative;
}

.video-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, var(--royal-blue), #6B8EFF);
    border-radius: 15px;
    z-index: -1;
    opacity: 0.1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.1;
    }
    50% {
        opacity: 0.2;
    }
}

/* ============================================
   GALLERY SECTION ANIMATIONS
   ============================================ */
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Tile Layout Heights */
.gallery-item-large {
    height: 400px;
}

.gallery-item-small {
    height: 250px;
}

/* On mobile, all items same height */
@media (max-width: 640px) {
    .gallery-item-large,
    .gallery-item-small {
        height: 280px;
    }
}

/* Image hover effects */
.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                filter 0.5s ease;
    will-change: transform;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover img {
    transform: scale(1.1) rotate(1deg);
    filter: brightness(0.85) contrast(1.1);
}

/* Overlay with gradient */
.gallery-overlay {
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease;
}

.gallery-item:hover .gallery-overlay {
    backdrop-filter: blur(3px);
}

/* Info text animation - slides up from bottom */
.gallery-info {
    z-index: 10;
}

/* Add subtle shine effect on hover */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.6s ease;
    z-index: 5;
}

.gallery-item:hover::before {
    left: 100%;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .gallery-item-large {
        height: 350px;
    }
    
    .gallery-item-small {
        height: 220px;
    }
}

/* ============================================
   FORM STYLES & VALIDATION
   ============================================ */
input:invalid:not(:focus):not(:placeholder-shown),
textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:focus):not(:placeholder-shown),
textarea:valid:not(:focus):not(:placeholder-shown) {
    border-color: #10b981;
}

/* Error message styling */
.error-message {
    display: block;
    margin-top: 4px;
}

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button[type="submit"]:hover::before {
    width: 300px;
    height: 300px;
}

button[type="submit"] span {
    position: relative;
    z-index: 1;
}

/* ============================================
   SOCIAL ICON ANIMATIONS
   ============================================ */
.social-icon,
.social-icon-footer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    transition: all 0.3s ease;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
/* Fade-in on scroll for sections */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   MODAL ANIMATIONS
   ============================================ */
#booking-modal {
    display: none;
}

#booking-modal.show {
    display: flex;
}

#booking-modal.show > div {
    animation: modalFadeIn 0.3s ease-out forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   RESPONSIVE DESIGN ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    /* Mobile-specific styles */
    .gallery-item {
        margin-bottom: 1rem;
    }
    
    #mobile-menu {
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */
/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--royal-blue);
    outline-offset: 2px;
}

/* Skip to main content link (hidden by default) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--royal-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Logo styling */
.logo img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

/* ============================================
   HOME SECTION ENHANCEMENTS
   ============================================ */

/* Home section background overlay for better text readability */
#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2), transparent);
    z-index: 1;
}

#home > div {
    position: relative;
    z-index: 2;
}

/* Hero text animations */
.hero-text {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.3s forwards;
}

.hero-word {
    display: inline-block;
    opacity: 0;
    transform: translateX(-100px);
}

.hero-word-1 {
    animation: slideInLeft 1s ease-out 0.5s forwards;
}

.hero-word-2 {
    animation: slideInLeft 1s ease-out 0.8s forwards;
}

.hero-word-3 {
    animation: slideInLeft 1s ease-out 1.1s forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Text shadow for better visibility */
.hero-title,
.hero-subtitle {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5),
                 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Fade in up animation */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient text animation */
@keyframes animate-gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: animate-gradient 3s ease infinite;
}

/* Stat items hover effect */
.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

/* Video container enhancements */
.video-container {
    position: relative;
}

.video-container::after {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: linear-gradient(135deg, var(--royal-blue), #6B8EFF);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.1;
    filter: blur(20px);
    transition: opacity 0.3s ease;
}

.video-container:hover::after {
    opacity: 0.2;
}

#cover-image{
    background-image: url(assets/images/case-front.png);
}

/* ============================================
   COUNTDOWN TIMER STYLES
   ============================================ */
#countdown {
    position: relative;
}

.countdown-item {
    position: relative;
    overflow: hidden;
}

.countdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
    z-index: 1;
}

.countdown-item:hover::before {
    left: 100%;
}

/* Counter number animation */
.countdown-number {
    display: inline-block;
    position: relative;
    transition: transform 0.3s ease;
    will-change: contents;
    color: #4169E1;
}

/* Pulse animation for countdown numbers on hover */
.countdown-item:hover .countdown-number {
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
}

/* Subtle glow effect on countdown cards */
.countdown-item > div {
    position: relative;
    overflow: hidden;
}

.countdown-item > div::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.countdown-item:hover > div::after {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .stat-item {
        padding: 0.5rem;
    }
    
    .countdown-item {
        padding: 0.5rem;
    }
    
    .countdown-item > div {
        padding: 1rem !important;
    }
    
    .countdown-number {
        font-size: 2rem !important;
    }
}

/* ============================================
   CAROUSEL STYLES
   ============================================ */
.carousel-container {
    position: relative;
    width: 100%;
    height: 600px;
}

@media (min-width: 768px) {
    .carousel-container {
        height: 800px;
    }
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    flex-shrink: 0;
}

.carousel-btn {
    cursor: pointer;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-indicators {
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-indicator {
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.carousel-indicator.active {
    width: 12px;
    height: 12px;
}

.carousel-indicator:not(.active) {
    width: 8px;
    height: 8px;
}

/* Responsive carousel adjustments */
@media (max-width: 768px) {
    .carousel-btn {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .carousel-btn i {
        font-size: 1rem;
    }
    
    .carousel-indicators {
        bottom: 1rem;
    }
}