/**
 * FuchsTravels Reusable Components
 * Nordic Blue Theme - Flat Design System
 *
 * This file contains common UI patterns extracted from templates
 * to reduce duplication and maintain consistency.
 */

/* ============================================
   DESIGN TOKENS & CSS VARIABLES
   ============================================ */

/* ============================================
   HERO SECTIONS
   ============================================ */

.hero-section {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0F172A;
}

.hero-overlay,
.hero-gradient-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    color: white;
    padding: 2rem;
    max-width: 64rem;
    text-align: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.9;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #FFFFFF;
    text-shadow: 2px 4px 12px rgba(0, 0, 0, 0.8);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #E2E8F0;
}

/* Ken Burns Animation - Subtle by default */
:root {
    --ken-burns-scale: 1.03;
    --ken-burns-duration: 25s;
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(var(--ken-burns-scale));
    }
}

.ken-burns-effect {
    animation: kenBurns var(--ken-burns-duration) ease-in-out infinite alternate;
    transform-origin: center center;
    will-change: transform;
}

/* Disable Ken Burns on portrait images in landscape containers */
@media (min-width: 768px) {
    .ken-burns-effect[data-portrait="true"],
    .ken-burns-effect.portrait-image {
        animation: none;
        transform: scale(1);
    }
}


/* btn-primary and btn-secondary are defined in platform-theme.css */
/* btn-aerial-primary is defined in platform-theme.css */
/* btn-aerial-outline is defined in platform-theme.css */

.btn-ghost {
    background: transparent;
    color: #6B7280;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-ghost:hover {
    background: #F3F4F6;
    color: #111827;
}

/* btn-aerial-outline is defined in platform-theme.css */

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}


/* ============================================
   TOUR CARDS
   ============================================ */

.tour-card-premium {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tour-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.tour-card-image-wrapper {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.tour-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.tour-card-premium:hover .tour-card-image {
    transform: scale(1.1);
}

.tour-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--aerial-blue);
    color: white;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(212, 146, 42, 0.4);
}

.tour-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tour-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.tour-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.tour-card-description {
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tour-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
    margin-top: auto;
}

.tour-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.tour-card-price-label {
    font-size: 0.75rem;
    color: #6B7280;
}


/* ============================================
   FEATURE CARDS
   ============================================ */

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(229, 231, 235, 0.5);
    overflow: hidden;
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: rgba(0, 0, 0, 0.02);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
    border-color: var(--aerial-blue-lighter);
}

.feature-card__icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 28px;
    background: var(--color-secondary);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 16px -6px rgba(0, 0, 0, 0.15);
}

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

.feature-card__icon svg {
    width: 42px;
    height: 42px;
    color: white;
}

.feature-card__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 14px;
}

.feature-card__description {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #6B7280;
    line-height: 1.65;
}


/* ============================================
   SECTION HEADERS
   ============================================ */

/* section-title and section-subtitle are defined in platform-theme.css */


/* ============================================
   CARDS
   ============================================ */

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card-elevated {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-interactive {
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-interactive:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25);
}

.card-gradient-border {
    position: relative;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--color-secondary);
}


/* ============================================
   BADGES
   Canonical badge styles - use these for all badge components.
   Variants: badge-primary, badge-success, badge-warning, badge-error
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-primary {
    background: var(--aerial-teal-surface);
    color: var(--aerial-teal-dark);
}

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

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

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

.badge-neutral {
    background: #F3F4F6;
    color: #374151;
}


/* ============================================
   INSTRUCTOR/TEAM CARDS
   ============================================ */

.instructor-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

.instructor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-secondary);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.instructor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    border-color: var(--aerial-blue-lighter);
}

.instructor-card__avatar {
    width: 140px;
    height: 140px;
    margin: 0 auto 24px;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.05);
}

.instructor-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.instructor-card:hover .instructor-card__avatar img {
    transform: scale(1.1);
}

.instructor-card__name {
    font-family: var(--font-heading);
    font-size: 1.625rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.instructor-card__role {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--color-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.instructor-card__bio {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #6B7280;
    line-height: 1.65;
    margin-bottom: 24px;
}

.instructor-card__stats {
    display: flex;
    justify-content: center;
    gap: 36px;
    padding-top: 24px;
    border-top: 2px solid rgba(229, 231, 235, 0.8);
}

.instructor-card__stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.instructor-card__stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.instructor-card__stat-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}


/* ============================================
   FILTERS
   ============================================ */

.filter-sidebar {
    background: white;
}

.filter-group {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.filter-title {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #374151;
    margin-bottom: 1rem;
}


/* ============================================
   STATS
   ============================================ */

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-secondary);
    line-height: 1;
    margin-bottom: 0.5rem;
}


/* ============================================
   SPACING UTILITIES
   ============================================ */

.section-breathing {
    padding-top: var(--space-24, 6rem);
    padding-bottom: var(--space-24, 6rem);
}

.section-breathing-sm {
    padding-top: var(--space-16, 4rem);
    padding-bottom: var(--space-16, 4rem);
}

.content-breathing {
    padding: var(--space-12, 3rem);
}


/* ============================================
   STICKY SUB-NAVIGATION
   For filter bars, tabs, etc. that stick below the main navbar
   Navbar is h-20 (80px) with fixed positioning
   ============================================ */

.sticky-below-nav {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    z-index: 40;
}

/* On mobile, navbar is 64px */
@media (max-width: 768px) {
    .sticky-below-nav {
        top: 64px;
    }
}

/* Variant for light gray background (filter bars) */
.sticky-below-nav-light {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    z-index: 40;
    background-color: #F9FAFB;
}

@media (max-width: 768px) {
    .sticky-below-nav-light {
        top: 64px;
    }
}

/* Variant for white background (tabs) */
.sticky-below-nav-white {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    z-index: 40;
    background-color: #FFFFFF;
}

@media (max-width: 768px) {
    .sticky-below-nav-white {
        top: 64px;
    }
}


/* ============================================
   ACCESSIBILITY - FOCUS STATES
   Standardized :focus-visible for keyboard navigation
   ============================================ */

:root {
    --focus-ring-color: var(--color-primary, var(--aerial-blue));
    --focus-ring-offset: 2px;
    --focus-ring-width: 2px;
}

/* Visible focus for interactive elements */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

/* Button focus with subtle glow */
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
}

/* Form input focus */
.form-input:focus-visible,
.form-select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--color-secondary, var(--aerial-blue-light));
    box-shadow: 0 0 0 3px rgba(58, 158, 143, 0.12);
}

/* Card link focus */
.card:focus-visible,
.tour-card:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}


/* ============================================
   ACCESSIBILITY - COLOR CONTRAST FIXES
   WCAG AA compliant text colors (4.5:1 ratio)
   ============================================ */

/* Placeholder text - meets 4.5:1 on white */
::placeholder {
    color: #6B7280;
}

/* Muted/secondary text - meets 4.5:1 */
.text-muted {
    color: var(--color-neutral-600, #4B5563);
}


/* ============================================
   ACCESSIBILITY - SCREEN READER UTILITIES
   ============================================ */

/* Visually hidden but accessible to screen readers */
.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;
}

/* Show on focus (for skip links) */
.sr-only-focusable:focus,
.sr-only-focusable:active {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}


/* ============================================
   TOUCH TARGET UTILITIES
   Minimum 44x44px touch targets for accessibility
   ============================================ */

.touch-target {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    /* Mobile typography floor - never below 16px base */
    body {
        font-size: 16px;
    }

    /* Small text floor - never below 14px */
    .text-sm,
    .form-help,
    .badge {
        font-size: 0.875rem;
    }

    /* Fix hero sections height on mobile - no padding needed since hero sits below nav */
    .hero-aerial,
    .hero-section,
    .hero-parallax {
        height: calc(100vh - 80px);
        height: calc(100dvh - 80px);
        min-height: 400px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 6vw, 3.5rem);
    }

    .section-title {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }

    .feature-card,
    .instructor-card {
        padding: 32px 24px;
    }

    .tour-card-image-wrapper {
        height: 200px;
    }

    /* Touch targets for interactive elements */
    .btn-sm {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    .form-input,
    .form-select {
        min-height: 48px;
    }
}
