/**
 * Green Lodge Moorea - Custom Styles
 * Luxury travel booking website for French Polynesia
 */

/* CSS Variables for consistent theming */
:root {
    --lagoon: #0E3A4B;
    --sand: #F2E8DA;
    --gold: #C8A95B;
    --lush: #3B5D3A;
    --white: #FFFFFF;
    --gray-600: #4B5563;
    --gray-900: #111827;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--lagoon) 0%, var(--lush) 100%);
    --gradient-gold: linear-gradient(135deg, var(--gold) 0%, #D4AF37 100%);
    --gradient-overlay: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);

    /* Shadows */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Reset and base styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--white);
}

/* Typography enhancements */
.font-serif {
    font-family: 'Playfair Display', Georgia, serif;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
}

/* Custom animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.6s ease-out;
}

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Button styles */
.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
}

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

.btn-secondary {
    background: transparent;
    color: var(--lagoon);
    border: 2px solid var(--lagoon);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--lagoon);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-gold {
    background: var(--gradient-gold);
    color: var(--lagoon);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    filter: brightness(1.1);
}

/* Card styles */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
}

.card-luxury {
    background: var(--white);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.card-luxury::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
}

/* Image overlay effects */
.image-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.image-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-overlay);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.image-overlay:hover::after {
    opacity: 1;
}

.image-overlay img {
    transition: transform var(--transition-slow);
}

.image-overlay:hover img {
    transform: scale(1.05);
}

/* Hero section enhancements */
.hero-video-container {
    position: relative;
    overflow: hidden;
}

.hero-video-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
}

/* Navigation enhancements */
.nav-link {
    position: relative;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--lagoon);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
}

/* Form enhancements */
.form-input {
    background: var(--white);
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all var(--transition-fast);
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--lagoon);
    box-shadow: 0 0 0 3px rgba(14, 58, 75, 0.1);
}

.form-input.error {
    border-color: #EF4444;
    background-color: #FEF2F2;
}

.form-input.success {
    border-color: #10B981;
    background-color: #F0FDF4;
}

/* Loading states */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #E5E7EB;
    border-top: 2px solid var(--lagoon);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Scroll indicators */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(14, 58, 75, 0.1);
    z-index: 9999;
}

.scroll-progress {
    height: 100%;
    background: var(--gradient-gold);
    transition: width 0.3s ease;
}

/* Responsive images */
.responsive-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

/* Price display */
.price-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
}

.price-currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold);
}

.price-period {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.price-secondary {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 4px;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-error {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Tooltip styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    border: 6px solid transparent;
    border-top-color: var(--gray-900);
    z-index: 1000;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a {
        text-decoration: underline;
    }

    .card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    .dark-mode-auto {
        --white: #1F2937;
        --gray-900: #F9FAFB;
        --gray-600: #D1D5DB;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-secondary,
    .btn-gold {
        border: 2px solid currentColor;
    }

    .card {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-behavior-smooth {
        scroll-behavior: auto;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--lagoon);
    border-radius: 4px;
}

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

/* Selection styling */
::selection {
    background: var(--gold);
    color: var(--lagoon);
}

::-moz-selection {
    background: var(--gold);
    color: var(--lagoon);
}

/* Responsive utilities */
@media (max-width: 640px) {
    .hero-text {
        font-size: 2.5rem !important;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card-luxury {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .hero-text {
        font-size: 3rem !important;
    }
}

/* Performance optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

.no-scroll {
    overflow: hidden;
}

/* Utility classes */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-text {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

/* Component-specific styles */
.testimonial-card {
    background: var(--white);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-soft);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 16px;
    left: 24px;
    font-size: 4rem;
    color: var(--gold);
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 16px;
}

.timeline-item {
    position: relative;
    padding-left: 32px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 20px;
    width: 2px;
    height: calc(100% - 12px);
    background: var(--sand);
}

.timeline-item:last-child::after {
    display: none;
}