/**
 * Collections Stylesheet - Isolated & Namespaced
 * ===============================================
 * This file contains ALL collection-specific styles.
 * Uses .collections-* namespace to prevent collisions with main site CSS.
 * Load AFTER style.css to ensure precedence.
 */

/* ==========================================================================
   CSS Variables (Collections-specific)
   ========================================================================== */
:root {
    --collections-max-width: 1400px;
    --collections-accent: #0066cc;
    --collections-accent-hover: #0052a3;
    --collections-text: #1a2a3a;
    --collections-text-light: #5a6a7a;
    --collections-bg: #f0f5f9;
    --collections-surface: #ffffff;
    --collections-border: #d0dde8;

    /* Pass Colors */
    --epic-color: #1e3a5f;
    --ikon-color: #f7931e;
    --indy-color: #2ecc71;
}

/* ==========================================================================
   Collections Index Page (.collections-index)
   ========================================================================== */
.collections-index {
    max-width: var(--collections-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.collections-hero {
    background: linear-gradient(135deg, #1a3a5c 0%, #2a5a8c 50%, #4a7ab0 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.collections-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.collections-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.collections-hero p {
    font-size: 1.35rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Collections Grid */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    padding: 2rem 0 4rem;
}

/* Collection Card - Index Page */
.collection-card {
    display: block;
    background: var(--collections-surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26, 42, 58, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    border: 1px solid transparent;
}

/* Accent bar that animates on hover */
.collection-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--collections-accent), #4a9eff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.collection-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 20px 40px rgba(26, 42, 58, 0.18),
        0 0 0 1px var(--collections-accent);
}

.collection-card:hover::after {
    transform: scaleX(1);
}

/* Focus states for accessibility */
.collection-card:focus {
    outline: none;
    box-shadow:
        0 20px 40px rgba(26, 42, 58, 0.18),
        0 0 0 3px var(--collections-accent),
        0 0 0 5px rgba(0, 102, 204, 0.2);
}

.collection-card:focus-visible {
    outline: none;
    box-shadow:
        0 20px 40px rgba(26, 42, 58, 0.18),
        0 0 0 3px var(--collections-accent),
        0 0 0 5px rgba(0, 102, 204, 0.2);
}

.collection-card-header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2a5a8c 100%);
    color: white;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Animated shine effect on header */
.collection-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    transition: transform 0.5s ease;
}

.collection-card:hover .collection-card-header::before {
    transform: translate(20px, -20px) scale(1.3);
}

.collection-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: white;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.collection-card:hover h3 {
    transform: translateX(4px);
}

.collection-card p {
    color: var(--collections-text-light);
    font-size: 1rem;
    line-height: 1.6;
    padding: 1.5rem 2rem;
    margin: 0;
}

.collection-card .count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--collections-accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 2rem 1.5rem;
    transition: all 0.3s ease;
}

.collection-card:hover .count {
    background: var(--collections-accent-hover);
    transform: scale(1.05);
}

.collection-card .count::before {
    content: '';
}

/* Pass-specific card theming */
.collection-card[href*="epic-pass"] .collection-card-header {
    background: linear-gradient(135deg, var(--epic-color) 0%, #2a4a7a 100%);
}

.collection-card[href*="ikon-pass"] .collection-card-header {
    background: linear-gradient(135deg, #c76b00 0%, var(--ikon-color) 100%);
}

.collection-card[href*="indy-pass"] .collection-card-header {
    background: linear-gradient(135deg, #1a9a50 0%, var(--indy-color) 100%);
}

.collection-card[href*="beginner"] .collection-card-header {
    background: linear-gradient(135deg, #0066cc 0%, #3399ff 100%);
}

.collection-card[href*="night-skiing"] .collection-card-header {
    background: linear-gradient(135deg, #2c1654 0%, #6b3fa0 100%);
}

/* ==========================================================================
   Individual Collection Page (.collection-page)
   ========================================================================== */
.collection-page {
    max-width: var(--collections-max-width);
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* Collection Page Hero */
.collection-page-hero {
    background: linear-gradient(135deg, #1a3a5c 0%, #2a5a8c 50%, #4a7ab0 100%);
    color: white;
    padding: 4rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.collection-page-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.collection-page-hero.epic-pass {
    background: linear-gradient(135deg, var(--epic-color) 0%, #2a4a7a 100%);
}

.collection-page-hero.ikon-pass {
    background: linear-gradient(135deg, #c76b00 0%, var(--ikon-color) 100%);
}

.collection-page-hero.indy-pass {
    background: linear-gradient(135deg, #1a9a50 0%, var(--indy-color) 100%);
}

/* Description and Count */
.collection-desc {
    font-size: 1.2rem;
    color: var(--collections-text-light);
    text-align: center;
    margin-bottom: 0.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.collection-count {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--collections-accent);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.collection-count::before {
    content: '';
}

/* Resort Grid on Collection Page */
.collection-page .resort-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0;
    max-width: none;
}

/* Resort Cards in Collections */
.collection-page .resort-card {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/10;
    box-shadow: 0 4px 16px rgba(26, 42, 58, 0.1);
    background: linear-gradient(135deg, #1a3a5c 0%, #2a5a8c 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.collection-page .resort-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 32px rgba(26, 42, 58, 0.2);
}

.collection-page .resort-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.collection-page .resort-card:hover img {
    transform: scale(1.08);
}

.collection-page .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    color: white;
}

.collection-page .card-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: white;
}

.collection-page .card-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* No-image placeholder styling */
.collection-page .resort-card:not(:has(img)) {
    display: flex;
    align-items: flex-end;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {

    .collections-hero h1,
    .collection-page-hero h1 {
        font-size: 2.25rem;
    }

    .collections-hero p {
        font-size: 1.1rem;
    }

    .collections-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .collection-page .resort-grid {
        grid-template-columns: 1fr;
    }

    .collection-card h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {

    .collections-hero,
    .collection-page-hero {
        padding: 3rem 1.5rem;
    }

    .collection-card-header {
        padding: 2rem 1.5rem;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.collection-card {
    animation: fadeInUp 0.5s ease forwards;
}

.collection-card:nth-child(2) {
    animation-delay: 0.1s;
}

.collection-card:nth-child(3) {
    animation-delay: 0.2s;
}

.collection-card:nth-child(4) {
    animation-delay: 0.3s;
}

.collection-card:nth-child(5) {
    animation-delay: 0.4s;
}

.collection-card:nth-child(6) {
    animation-delay: 0.5s;
}

.collection-card:nth-child(7) {
    animation-delay: 0.6s;
}

.collection-card:nth-child(8) {
    animation-delay: 0.7s;
}

.collection-card:nth-child(9) {
    animation-delay: 0.8s;
}

.collection-page .resort-card {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

/* Staggered animation for resort cards */
.collection-page .resort-card:nth-child(1) {
    animation-delay: 0.05s;
}

.collection-page .resort-card:nth-child(2) {
    animation-delay: 0.1s;
}

.collection-page .resort-card:nth-child(3) {
    animation-delay: 0.15s;
}

.collection-page .resort-card:nth-child(4) {
    animation-delay: 0.2s;
}

.collection-page .resort-card:nth-child(5) {
    animation-delay: 0.25s;
}

.collection-page .resort-card:nth-child(6) {
    animation-delay: 0.3s;
}

.collection-page .resort-card:nth-child(7) {
    animation-delay: 0.35s;
}

.collection-page .resort-card:nth-child(8) {
    animation-delay: 0.4s;
}

.collection-page .resort-card:nth-child(9) {
    animation-delay: 0.45s;
}

.collection-page .resort-card:nth-child(10) {
    animation-delay: 0.5s;
}

.collection-page .resort-card:nth-child(11) {
    animation-delay: 0.55s;
}

.collection-page .resort-card:nth-child(12) {
    animation-delay: 0.6s;
}

/* ==========================================================================
   Enhanced Resort Card Effects
   ========================================================================== */

/* Resort card accent overlay on hover */
.collection-page .resort-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(0, 102, 204, 0.1) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.collection-page .resort-card:hover::before {
    opacity: 1;
}

/* Focus states for resort cards */
.collection-page .resort-card:focus {
    outline: none;
    box-shadow:
        0 16px 32px rgba(26, 42, 58, 0.25),
        0 0 0 3px var(--collections-accent),
        0 0 0 5px rgba(0, 102, 204, 0.2);
}

.collection-page .resort-card:focus-visible {
    outline: none;
    box-shadow:
        0 16px 32px rgba(26, 42, 58, 0.25),
        0 0 0 3px var(--collections-accent),
        0 0 0 5px rgba(0, 102, 204, 0.2);
}

/* Card content slide-up effect on hover */
.collection-page .card-content {
    transition: transform 0.3s ease, padding 0.3s ease;
}

.collection-page .resort-card:hover .card-content {
    transform: translateY(-4px);
}

/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */
.collections-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 0.9rem;
    color: var(--collections-text-light);
    max-width: var(--collections-max-width);
    margin: 0 auto;
}

.collections-breadcrumb a {
    color: var(--collections-accent);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.collections-breadcrumb a:hover {
    color: var(--collections-accent-hover);
    text-decoration: underline;
}

.collections-breadcrumb span.separator {
    color: var(--collections-border);
    font-size: 0.8rem;
}

.collections-breadcrumb span.current {
    color: var(--collections-text);
    font-weight: 600;
}

/* ==========================================================================
   Back to Collections Link
   ========================================================================== */
.back-to-collections {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--collections-accent);
    font-weight: 600;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.back-to-collections:hover {
    background: rgba(0, 102, 204, 0.08);
    transform: translateX(-4px);
}

.back-to-collections::before {
    content: '←';
    transition: transform 0.3s ease;
}

.back-to-collections:hover::before {
    transform: translateX(-4px);
}

/* ==========================================================================
   Reduced Motion Support
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {

    .collection-card,
    .collection-page .resort-card,
    .collection-card::after,
    .collection-card-header::before,
    .collection-page .resort-card img {
        animation: none;
        transition: none;
    }

    .collection-card:hover,
    .collection-page .resort-card:hover {
        transform: none;
    }
}