/* =========================================
   Tennis Winter Unified - Modern Styles
   ========================================= */

/* CSS Variables - Design Tokens */
:root {
    /* Primary Colors */
    --tw-primary: #667eea;
    --tw-primary-dark: #5a67d8;
    --tw-secondary: #764ba2;
    --tw-accent: #f6ad55;
    --tw-accent-gold: #ffd700;
    --tw-brand-orange: #FF6B00;
    /* New design primary color */

    /* Background Colors */
    --tw-bg-dark: #0f172a;
    --tw-bg-card: rgba(30, 41, 59, 0.85);
    --tw-bg-glass: rgba(255, 255, 255, 0.1);

    /* Text Colors */
    --tw-text-primary: #ffffff;
    --tw-text-secondary: rgba(255, 255, 255, 0.7);
    --tw-text-muted: rgba(255, 255, 255, 0.5);

    /* Gradients */
    --tw-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --tw-gradient-accent: linear-gradient(135deg, #f6ad55 0%, #f687b3 100%);
    --tw-gradient-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --tw-gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Shadows */
    --tw-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --tw-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --tw-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
    --tw-shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);

    /* Borders */
    --tw-border-glass: 1px solid rgba(255, 255, 255, 0.18);
    --tw-border-radius: 16px;
    --tw-border-radius-lg: 24px;

    /* Transitions */
    --tw-transition-fast: 0.2s ease;
    --tw-transition-normal: 0.3s ease;
    --tw-transition-slow: 0.5s ease;

    /* Spacing */
    --tw-space-xs: 0.5rem;
    --tw-space-sm: 1rem;
    --tw-space-md: 1.5rem;
    --tw-space-lg: 2rem;
    --tw-space-xl: 3rem;
}

/* Base Styles */
.tw-unified {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--tw-gradient-dark);
    color: var(--tw-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================
   Center Selector Section
   ========================================= */

.tw-center-selector {
    min-height: 100vh;
    padding: var(--tw-space-xl) var(--tw-space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--tw-gradient-dark);
    position: relative;
}

.tw-center-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.tw-selector-title {
    text-align: center;
    margin-bottom: var(--tw-space-xl);
    position: relative;
    z-index: 1;
}

.tw-selector-title h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    background: var(--tw-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--tw-space-sm);
}

.tw-selector-title p {
    font-size: 1.2rem;
    color: var(--tw-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.tw-center-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--tw-space-lg);
    max-width: 1200px;
    width: 100%;
    padding: 0 var(--tw-space-md);
    position: relative;
    z-index: 1;
}

/* =========================================
   Center Cards with Glassmorphism
   ========================================= */

.tw-center-card {
    background: var(--tw-bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--tw-border-glass);
    border-radius: var(--tw-border-radius-lg);
    padding: var(--tw-space-lg);
    cursor: pointer;
    transition: all var(--tw-transition-normal);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tw-center-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tw-gradient-card);
    opacity: 0;
    transition: opacity var(--tw-transition-normal);
    border-radius: var(--tw-border-radius-lg);
}

.tw-center-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--tw-shadow-glow);
    border-color: rgba(102, 126, 234, 0.5);
}

.tw-center-card:hover::before {
    opacity: 1;
}

.tw-center-card:active {
    transform: translateY(-5px) scale(0.98);
}

.tw-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--tw-gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--tw-space-md);
    font-size: 2rem;
    box-shadow: var(--tw-shadow-md);
    transition: transform var(--tw-transition-normal);
}

.tw-center-card:hover .tw-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.tw-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--tw-space-xs);
    color: var(--tw-text-primary);
    position: relative;
    z-index: 1;
}

.tw-card-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--tw-text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--tw-space-sm);
    position: relative;
    z-index: 1;
}

.tw-card-type {
    display: inline-block;
    background: var(--tw-gradient-accent);
    color: #1a1a2e;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin: 0 auto;
    display: block;
    width: fit-content;
    position: relative;
    z-index: 1;
}

.tw-card-arrow {
    position: absolute;
    right: var(--tw-space-md);
    bottom: var(--tw-space-md);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tw-transition-normal);
    opacity: 0;
    transform: translateX(-10px);
}

.tw-center-card:hover .tw-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* =========================================
   Form Section
   ========================================= */

.tw-form-section {
    min-height: auto;
    padding: var(--tw-space-md) var(--tw-space-md);
    background: var(--tw-bg-dark);
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tw-form-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.tw-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--tw-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--tw-border-glass);
    border-radius: var(--tw-border-radius-lg);
    padding: var(--tw-space-lg) var(--tw-space-md);
    box-shadow: var(--tw-shadow-lg);
}

.tw-form-header {
    text-align: center;
    margin-bottom: var(--tw-space-lg);
    padding-bottom: var(--tw-space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tw-back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: var(--tw-border-glass);
    color: var(--tw-text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--tw-transition-fast);
    margin-bottom: var(--tw-space-md);
}

.tw-back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--tw-text-primary);
}

.tw-form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    background: var(--tw-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   Modern Form Inputs
   ========================================= */

.tw-form-group {
    margin-bottom: var(--tw-space-md);
}

.tw-form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--tw-text-secondary);
    margin-bottom: 0.5rem;
}

.tw-form-input,
.tw-form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--tw-border-radius);
    color: var(--tw-text-primary);
    font-size: 1rem;
    transition: all var(--tw-transition-fast);
}

.tw-form-input:focus,
.tw-form-select:focus {
    outline: none;
    border-color: var(--tw-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.tw-form-input::placeholder {
    color: var(--tw-text-muted);
}

/* =========================================
   Submit Button
   ========================================= */

.tw-submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--tw-gradient-primary);
    border: none;
    border-radius: var(--tw-border-radius);
    color: var(--tw-text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--tw-transition-normal);
    position: relative;
    overflow: hidden;
}

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

.tw-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

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

.tw-submit-btn:active {
    transform: translateY(0);
}

/* =========================================
   Animations
   ========================================= */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

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

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

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.tw-animate-in {
    animation: slideInUp 0.6s ease forwards;
}

.tw-center-card:nth-child(1) {
    animation-delay: 0.1s;
}

.tw-center-card:nth-child(2) {
    animation-delay: 0.2s;
}

.tw-center-card:nth-child(3) {
    animation-delay: 0.3s;
}

.tw-center-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* =========================================
   Responsive Design
   ========================================= */

@media (max-width: 768px) {
    .tw-center-grid {
        grid-template-columns: 1fr;
        gap: var(--tw-space-md);
    }

    .tw-center-card {
        padding: var(--tw-space-md);
    }

    .tw-form-container {
        padding: var(--tw-space-md);
        margin: 0 var(--tw-space-sm);
    }

    .tw-selector-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .tw-center-selector {
        padding: var(--tw-space-lg) var(--tw-space-sm);
    }

    .tw-card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .tw-card-title {
        font-size: 1.25rem;
    }
}

/* =========================================
   Section Transitions
   ========================================= */

.tw-section-hidden {
    opacity: 0;
    visibility: hidden;
    display: none !important;
    /* Force removal from flow */
    position: absolute !important;
    top: -9999px !important;
    pointer-events: none;
    transition: all var(--tw-transition-slow);
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.tw-section-visible {
    opacity: 1;
    visibility: visible;
    position: relative;
    pointer-events: auto;
    transition: all var(--tw-transition-slow);
}

/* Loading State */
.tw-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.tw-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--tw-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   Calendar Section
   ========================================= */

.tw-calendar-section {
    min-height: auto;
    padding: var(--tw-space-md) var(--tw-space-md);
    background: var(--tw-bg-dark);
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tw-calendar-section.active {
    display: block;
}

.tw-calendar-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--tw-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--tw-border-glass);
    border-radius: var(--tw-border-radius-lg);
    padding: var(--tw-space-lg) var(--tw-space-md);
    box-shadow: var(--tw-shadow-lg);
}

.tw-calendar-header {
    text-align: center;
    margin-bottom: var(--tw-space-md);
    padding-bottom: var(--tw-space-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tw-calendar-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--tw-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: var(--tw-space-sm);
}

.tw-calendar-intro {
    margin-bottom: var(--tw-space-md);
}

.tw-calendar-actions {
    margin-top: var(--tw-space-xl);
    display: flex;
    justify-content: center;
}

/* Continue Button */
.tw-continue-btn {
    padding: 1rem 2.5rem;
    background: var(--tw-gradient-primary);
    border: none;
    border-radius: var(--tw-border-radius);
    color: var(--tw-text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--tw-transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.tw-continue-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.tw-continue-btn:active:not(:disabled) {
    transform: translateY(0);
}

.tw-continue-btn.tw-btn-disabled,
.tw-continue-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--tw-text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

/* Selected Preferences Summary */
.tw-selected-summary {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--tw-border-radius);
    padding: var(--tw-space-md);
    margin-bottom: var(--tw-space-lg);
}

.tw-selected-summary h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--tw-text-primary);
    margin-bottom: var(--tw-space-sm);
}

.tw-preference-item {
    display: flex;
    align-items: center;
    gap: var(--tw-space-sm);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tw-preference-item:last-child {
    border-bottom: none;
}

.tw-preference-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--tw-gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.tw-preference-text {
    color: var(--tw-text-secondary);
    font-size: 0.95rem;
}

/* Responsive Calendar */
@media (max-width: 768px) {
    .tw-calendar-container {
        padding: var(--tw-space-md);
        margin: 0 var(--tw-space-sm);
    }

    .tw-continue-btn {
        width: auto;
        min-width: 200px;
        max-width: 100%;
        border-radius: 50px;
        /* Pill shape */
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        justify-content: center;
    }

    .tw-calendar-header h2 {
        font-size: 1.5rem;
    }
}

/* =========================================
   Reservation Timer Styles
   ========================================= */

.tw-reservation-timer {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--tw-border-radius);
    padding: var(--tw-space-sm) var(--tw-space-md);
    margin: var(--tw-space-md) 0;
    backdrop-filter: blur(10px);
    animation: timerPulse 2s ease-in-out infinite;
}

.tw-reservation-timer.tw-timer-warning {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.3) 0%, rgba(237, 137, 54, 0.3) 100%);
    border-color: rgba(245, 101, 101, 0.5);
    animation: timerWarningPulse 0.5s ease-in-out infinite;
}

.tw-timer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--tw-space-xs);
    color: var(--tw-text-primary);
    font-size: 1rem;
}

.tw-timer-content i {
    color: var(--tw-accent);
    font-size: 1.2rem;
}

.tw-timer-content strong {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    background: var(--tw-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tw-timer-warning .tw-timer-content strong {
    background: linear-gradient(135deg, #f56565 0%, #ed8936 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tw-timer-alert {
    display: inline-block;
    background: linear-gradient(135deg, #f56565 0%, #ed8936 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: var(--tw-space-xs);
    animation: alertBounce 0.5s ease-in-out infinite;
}

@keyframes timerPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.2);
    }

    50% {
        box-shadow: 0 0 20px 5px rgba(102, 126, 234, 0.1);
    }
}

@keyframes timerWarningPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 101, 101, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 25px 5px rgba(245, 101, 101, 0.2);
        transform: scale(1.01);
    }
}

@keyframes alertBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

/* =========================================
   New Map & Location List Designs
   ========================================= */

.tw-map-section {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    background: var(--tw-bg-dark);
    /* Or darker if needed */
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    /* Space for navbar if sticky */
}

/* Ensure map section has proper height when visible */
.tw-map-section.tw-section-visible {
    height: auto;
    min-height: 100vh;
}

@media (min-width: 1024px) {
    .tw-map-section {
        grid-template-columns: 7fr 5fr;
        grid-template-rows: auto 1fr;
        /* Header + Content */
        align-items: flex-start;
        padding: 0;
        height: 100vh;
    }
}

/* Header for the section */
.tw-section-main-header {
    padding: 2rem 2rem 0;
    text-align: center;
    width: 100%;
    z-index: 15;
    position: relative;
    background: transparent;
    /* Allows map to show behind if needed, but here it's on top of section bg */
}

@media (min-width: 1024px) {
    .tw-section-main-header {
        grid-column: 1 / -1;
        /* Span across map and sidebar */
        grid-row: 1;
        padding-top: 5rem;
        /* Space from top */
        padding-bottom: 1rem;
    }
}

/* Map Container */
.tw-map-container {
    position: relative;
    width: 100%;
    /* Let height be determined by children or explicit if needed */
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    z-index: 10;
    padding: 2rem;
    /* Add padding to prevent pins from being cut off on edges */
}

@media (min-width: 1024px) {
    .tw-map-container {
        height: 100%;
        position: sticky;
        top: 0;
        padding: 0;
        grid-row: 2;
        /* Ensure it starts below header */
        grid-column: 1;
    }
}

/*
   Reference Frame: This is the KEY to locking pins to the map image.
   It creates a coordinate system that perfectly matches the image's aspect ratio.
   Assuming the map image is square-ish. Adjust aspect-ratio if needed.
*/
.tw-map-reference-frame {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 1 / 1;
    /* Locks the box to a square */
    margin: auto;
}

.tw-drenthe-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/mapa-nuevo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
    animation: floatMap 8s ease-in-out infinite;
    z-index: 1;
}

@keyframes floatMap {
    0% {
        transform: translateY(0) rotate(0deg);
        filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
    }
    30% {
        transform: translateY(-10px) rotate(0.4deg);
    }
    50% {
        transform: translateY(-6px) rotate(-0.3deg);
        filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.4));
    }
    70% {
        transform: translateY(-12px) rotate(0.2deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
        filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
    }
}

.tw-map-bg-blur {
    display: none;
    /* Removed for image map */
}

.tw-map-svg {
    display: none;
    /* Removed for image map */
}

/* Map Pins */
.tw-map-pin {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 20;
    transform: translate(-50%, -50%);
}

/* Pin 1 — Emmen: ritmo lento y amplio, "respiración profunda" */
.tw-map-pin[data-pickup-center="bargeres-combined"] {
    animation: floatPin1 5s ease-in-out infinite;
}

/* Pin 2 — Odoorn: ritmo medio con balanceo lateral */
.tw-map-pin[data-pickup-center="odoorn"] {
    animation: floatPin2 4s ease-in-out infinite 0.6s;
}

/* Pin 3 — Borger: ritmo rápido y juguetón, rebote sutil */
.tw-map-pin[data-pickup-center="borger"] {
    animation: floatPin3 3.5s ease-in-out infinite 1.2s;
}

@keyframes floatPin1 {
    0% {
        transform: translate(-50%, -50%) translateY(0) scale(1);
    }
    25% {
        transform: translate(-50%, -50%) translateY(-8px) scale(1.02);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-14px) scale(1);
    }
    75% {
        transform: translate(-50%, -50%) translateY(-6px) scale(0.98);
    }
    100% {
        transform: translate(-50%, -50%) translateY(0) scale(1);
    }
}

@keyframes floatPin2 {
    0% {
        transform: translate(-50%, -50%) translateY(0) translateX(0) rotate(0deg);
    }
    33% {
        transform: translate(-50%, -50%) translateY(-10px) translateX(3px) rotate(2deg);
    }
    66% {
        transform: translate(-50%, -50%) translateY(-4px) translateX(-3px) rotate(-2deg);
    }
    100% {
        transform: translate(-50%, -50%) translateY(0) translateX(0) rotate(0deg);
    }
}

@keyframes floatPin3 {
    0% {
        transform: translate(-50%, -50%) translateY(0) scale(1);
    }
    20% {
        transform: translate(-50%, -50%) translateY(-12px) scale(1.05);
    }
    35% {
        transform: translate(-50%, -50%) translateY(-4px) scale(0.97);
    }
    55% {
        transform: translate(-50%, -50%) translateY(-9px) scale(1.03);
    }
    70% {
        transform: translate(-50%, -50%) translateY(-2px) scale(0.98);
    }
    100% {
        transform: translate(-50%, -50%) translateY(0) scale(1);
    }
}

.tw-pin-dot {
    width: 40px;
    height: 50px;
    background-image: url('/images/map-pin.png?v=2');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-color: transparent !important;
    /* Remove old color */
    border-radius: 0;
    /* Remove circle */
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
    /* Add shadow to image */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 5px;
    /* Lift it slightly above the pulse */
}

.tw-map-pin:hover .tw-pin-dot {
    transform: translateY(-8px) scale(1.1);
}

.tw-pin-pulse {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scale(1);
    width: 30px;
    height: 15px;
    border-radius: 50%;
    background-color: rgba(255, 107, 0, 0.6);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

/* Cada pulso con ritmo diferente */
.tw-map-pin[data-pickup-center="bargeres-combined"] .tw-pin-pulse {
    animation: pulseRing1 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.tw-map-pin[data-pickup-center="odoorn"] .tw-pin-pulse {
    animation: pulseRing2 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite 0.8s;
}

.tw-map-pin[data-pickup-center="borger"] .tw-pin-pulse {
    animation: pulseRing3 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite 1.5s;
}

@keyframes pulseRing1 {
    0% {
        transform: translate(-50%, -50%) scale(0.33);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

@keyframes pulseRing2 {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.6;
    }
    60% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0.2;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

@keyframes pulseRing3 {
    0% {
        transform: translate(-50%, -50%) scale(0.33);
        opacity: 0.9;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.2);
        opacity: 0;
    }
}

/* Drenthe Title Overlay */
.tw-map-title-overlay {
    position: absolute;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
    pointer-events: none;
    animation: floatTitle 10s ease-in-out infinite;
}

@keyframes floatTitle {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.9;
    }
    40% {
        transform: translateX(-50%) translateY(-5px);
        opacity: 1;
    }
    70% {
        transform: translateX(-50%) translateY(-2px);
        opacity: 0.85;
    }
}

.tw-map-title-overlay h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    font-family: 'Anton', sans-serif;
}

.tw-map-title-overlay span {
    display: block;
    font-size: 0.9rem;
    color: var(--tw-brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 0.5rem;
    font-weight: 700;
    animation: glowOrange 4s ease-in-out infinite;
}

@keyframes glowOrange {
    0%, 100% {
        text-shadow: 0 0 5px rgba(255, 107, 0, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 107, 0, 0.6), 0 0 30px rgba(255, 107, 0, 0.2);
    }
}

/* Unified Pin Style */
/* Unified Pin Style Override */
/* Remove color overrides since we use an image now */
.tw-map-pin .tw-pin-dot {
    background-color: transparent !important;
    box-shadow: none !important;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
}

.tw-map-pin[data-pickup-center="bargeres"] .tw-pin-dot,
.tw-map-pin[data-pickup-center="bargeres-kids"] .tw-pin-dot {
    /* Ensure image is used */
    background-color: transparent !important;
}

.tw-pin-tooltip {
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.tw-pin-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(30, 41, 59, 0.95) transparent transparent transparent;
}

.tw-map-pin:hover .tw-pin-tooltip,
.tw-map-pin.tooltip-active .tw-pin-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tw-tooltip-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tw-tooltip-subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--tw-brand-orange);
}

/* Locations List */
/* Locations List */
.tw-locations-sidebar {
    padding: 2rem;
    height: 100%;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.5);
    /* subtle bg */
}

@media (min-width: 1024px) {
    .tw-locations-sidebar {
        grid-row: 2;
        /* Content row */
        grid-column: 2;
    }
}

.tw-sidebar-header {
    margin-bottom: 2.5rem;
}

.tw-sidebar-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.tw-sidebar-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

.tw-location-card-new {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    position: relative;
    overflow: hidden;
}

.tw-location-card-new:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-4px);
    border-color: rgba(255, 107, 0, 0.4);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.tw-location-header-new {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.tw-location-name-group {
    display: flex;
    flex-direction: column;
}

.tw-location-city {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.tw-location-club {
    font-size: 0.875rem;
    color: var(--tw-brand-orange);
    font-weight: 500;
}

.tw-location-icon-new {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 107, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tw-brand-orange);
    transition: all 0.3s ease;
}

.tw-location-card-new:hover .tw-location-icon-new {
    background: var(--tw-brand-orange);
    color: white;
}

.tw-location-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 1.5;
}

.tw-location-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tw-location-address {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tw-location-action {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease;
}

.tw-location-card-new:hover .tw-location-action {
    color: var(--tw-brand-orange);
}

.tw-type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.tw-type-adults {
    background: rgba(102, 126, 234, 0.2);
    color: #a3bffa;
}

.tw-type-kids {
    background: rgba(246, 173, 85, 0.2);
    color: #fbd38d;
}

/* Timer Responsive */
@media (max-width: 768px) {
    .tw-reservation-timer {
        padding: var(--tw-space-sm);
        margin: var(--tw-space-sm) 0;
    }

    .tw-timer-content {
        font-size: 0.9rem;
    }

    .tw-timer-content strong {
        font-size: 1.1rem;
    }
}

/* =========================================
   Mobile Map Improvements
   ========================================= */

@media (max-width: 1023px) {

    /* Improve map section on mobile/tablet */
    .tw-map-section {
        padding-top: 50px;
    }

    .tw-section-main-header {
        padding: 1rem 0.75rem 0.25rem;
    }

    .tw-sidebar-title {
        font-size: 1.5rem;
    }

    .tw-sidebar-subtitle {
        font-size: 0.85rem;
    }

    /* Make map container larger on mobile */
    .tw-map-container {
        min-height: 75vh;
        padding: 0.5rem 0.25rem;
    }

    /* Increase map size on mobile while maintaining aspect ratio */
    .tw-map-reference-frame {
        max-width: 100%;
        aspect-ratio: 1 / 1;
    }

    /* Adjust pin sizes for mobile — keep individual animations */
    .tw-map-pin:nth-of-type(1),
    .tw-map-pin:nth-of-type(2),
    .tw-map-pin:nth-of-type(3) {
        --pin-scale: 0.9;
    }

    .tw-pin-dot {
        width: 35px;
        height: 44px;
    }

    .tw-pin-pulse {
        width: 25px;
        height: 12px;
    }

    /* Adjust title overlay for mobile */
    .tw-map-title-overlay {
        bottom: 25px;
    }

    .tw-map-title-overlay h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .tw-map-title-overlay span {
        font-size: 0.75rem;
    }

    /* Adjust sidebar for mobile */
    .tw-locations-sidebar {
        padding: 1.5rem 1rem;
    }

    .tw-location-card-new {
        padding: 1.25rem;
        margin-bottom: 0.875rem;
    }
}

@media (max-width: 767px) {

    /* Additional mobile optimizations */
    .tw-map-section {
        padding-top: 40px;
    }

    .tw-section-main-header {
        padding: 0.75rem 0.5rem 0.25rem;
    }

    .tw-sidebar-title {
        font-size: 1.4rem;
    }

    .tw-map-container {
        min-height: 70vh;
        padding: 0.25rem;
    }

    /* Keep map large on small mobile */
    .tw-map-reference-frame {
        max-width: 95vw;
        margin: 0 auto;
    }

    /* Smaller pins on very small screens — keep individual animations */
    .tw-map-pin:nth-of-type(1),
    .tw-map-pin:nth-of-type(2),
    .tw-map-pin:nth-of-type(3) {
        --pin-scale: 0.8;
    }

    .tw-pin-dot {
        width: 30px;
        height: 38px;
    }

    .tw-pin-pulse {
        width: 20px;
        height: 10px;
    }

    /* Adjust tooltips for mobile - make them smaller */
    .tw-pin-tooltip {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .tw-tooltip-title {
        font-size: 0.75rem;
    }

    .tw-tooltip-subtitle {
        font-size: 0.7rem;
    }

    /* Location cards on mobile */
    .tw-location-card-new {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .tw-location-city {
        font-size: 1rem;
    }

    .tw-location-club {
        font-size: 0.8rem;
    }

    .tw-location-desc {
        font-size: 0.8rem;
    }

    .tw-location-icon-new {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }
}

/* =========================================
   Video Showcase (Hoe werkt het)
   ========================================= */

.tw-video-showcase {
    margin-bottom: 1.5rem;
}

.tw-video-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 700px;
    margin: 0 auto;
}

.tw-video-wrapper:hover {
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
}

.tw-showcase-video {
    width: 100%;
    display: block;
    border-radius: 16px;
}

/* Controles sobre el video */
.tw-video-controls {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.25);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.tw-video-wrapper.is-playing .tw-video-controls {
    opacity: 0;
}

.tw-video-wrapper.is-playing:hover .tw-video-controls {
    opacity: 1;
}

/* Botón Play central */
.tw-video-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tw-video-play-btn:hover {
    background: rgba(102, 126, 234, 0.6);
    border-color: white;
    transform: scale(1.1);
}

/* Botón Expandir — esquina inferior derecha */
.tw-video-expand-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tw-video-expand-btn:hover {
    background: rgba(102, 126, 234, 0.6);
    color: white;
    border-color: rgba(255, 255, 255, 0.6);
}

/* Estado expandido — overlay a pantalla completa */
.tw-video-showcase.is-expanded {
    position: fixed;
    inset: 0;
    z-index: 9999;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    animation: videoFadeIn 0.3s ease;
}

.tw-video-showcase.is-expanded .tw-video-wrapper {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.tw-video-showcase.is-expanded .tw-showcase-video {
    max-height: 90vh;
    object-fit: contain;
}

.tw-video-showcase.is-expanded .tw-video-expand-btn i::before {
    content: "\F62a";
}

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

@media (max-width: 767px) {
    .tw-video-wrapper {
        border-radius: 12px;
        max-width: 100%;
    }

    .tw-showcase-video {
        border-radius: 12px;
    }

    .tw-video-play-btn {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }

    .tw-video-expand-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}