/*
 * Modern Design System
 * Mobile-first, clean, and minimal
 */

/* ========================================
   CSS Variables - Design Tokens
   ======================================== */
:root {
    /* Colors – updated to match design */
    --color-primary: #983433;
    /* red text */
    --color-primary-dark: #70251f;
    --color-primary-light: #f3b2aa;

    --color-accent-green: #223d3c;
    /* dark green blocks */

    --color-text-primary: #222222;
    --color-text-secondary: #717171;
    --color-text-tertiary: #B0B0B0;

    --color-background: #f8f3f2;
    /* cream background */
    --color-background-secondary: #F7F7F7;
    --color-background-tertiary: #EBEBEB;

    --color-border: #DDDDDD;
    --color-border-light: #EBEBEB;

    --color-success: #00A699;
    --color-error: #C13515;
    --color-warning: #FFB400;

    /* Spacing scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 40px;
    --space-8: 48px;
    --space-9: 64px;
    --space-10: 80px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 8px 28px rgba(0, 0, 0, 0.18);

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* ========================================
   Base Styles
   ======================================== */
body {
    font-family: var(--font-family);
    color: var(--color-text-primary);
    line-height: var(--line-height-normal);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
}

/* Smooth page transitions */
main {
    animation: fadeIn 0.5s ease-in;
}

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

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

/* ========================================
   Navbar
   ======================================== */
.navbar {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid var(--color-border-light);
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
    background: #ffffff !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-xl);
    color: var(--color-text-primary);
    transition: color 0.2s ease;
}

.navbar-brand:hover {
    color: var(--color-primary);
}

.nav-link {
    font-weight: var(--font-weight-medium);
    padding: var(--space-2) var(--space-4) !important;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--color-primary);
}

.nav-link.active {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

.motto {
    font-style: italic;
    font-size: var(--font-size-xl);
    color: var(--color-primary);
    margin: var(--space-5) 0;
    padding: var(--space-2) 0;
    font-weight: var(--font-weight-medium);
    position: relative;
}

.motto::before {
    content: '“';
    font-size: var(--font-size-3xl);
    color: var(--color-primary-light);
    opacity: 0.3;
    margin-right: 6px;
}

.motto::after {
    content: '”';
    font-size: var(--font-size-3xl);
    color: var(--color-primary-light);
    opacity: 0.3;
    margin-left: 6px;
}


@media (max-width: 768px) {
    .nav-link.active::after {
        display: none;
    }
}

/* Minimalist variant (if you need it later) */
.navbar.minimalist-nav {
    box-shadow: none;
    border-bottom: none;
    background: transparent !important;
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-5);
    border: none;
    transition: all 0.2s ease;
    font-size: var(--font-size-base);
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--font-size-lg);
    border-radius: var(--radius-lg);
}

.btn-primary {
    border: 2px solid var(--color-primary);
    background: var(--color-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background: white;
}

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

/* ========================================
   Cards
   ======================================== */
.card {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    background: white;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-6px);
    border-color: var(--color-primary-light);
}

.card-body {
    padding: var(--space-5);
}

.card-title {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
}

.card-text {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

/* ========================================
   Video Card Styles
   ======================================== */
.video-card {
    margin-bottom: var(--space-6);
    height: 100%;
    background: white;
    position: relative;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(152, 52, 51, 0.08) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.video-card .card-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.video-card .card-text {
    flex-grow: 1;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.video-container:hover {
    transform: scale(1.02);
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--color-background-secondary);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
}

.video-container:hover .play-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.play-overlay i {
    font-size: 3.5rem;
    color: white;
    opacity: 0.9;
    transition: transform 0.2s;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.video-container:hover .play-overlay i {
    transform: scale(1.1);
}

.video-info {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    margin-top: var(--space-2);
}

/* ========================================
   Video Player Page
   ======================================== */
.video-player-container {
    position: relative;
    width: 100%;
    background: #000;
    margin-bottom: var(--space-6);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-player {
    width: 100%;
    max-height: 70vh;
    display: block;
}

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

.loading-spinner,
.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.loading-spinner,
.error-overlay {
    display: none;
}

.error-overlay {
    flex-direction: column;
    gap: var(--space-3);
}

.error-overlay i {
    font-size: 2rem;
}

.error-message {
    text-align: center;
    padding: var(--space-6);
    color: var(--color-error);
}

/* ========================================
   Hero Section – matches Figma layout
   ======================================== */

.hero-section {
    margin-top: var(--space-10);
    background: var(--color-background);
}

/* heading + intro */
.hero-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.hero-heading {
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 4rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-10);
}

.hero-intro {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
    max-width: 520px;
    margin: 0 auto var(--space-6);
}

.hero-quote {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    margin: 0;
    margin-bottom: var(--space-10);
}

.hero-main {
    padding-top: 80px;
    margin-top: var(--space-10);
    margin-bottom: var(--space-8);
    justify-content: flex-end;
    align-items: center;
    display: flex;
    gap: 150px;
}

/* Left (image) column */
.hero-photo-col {
    display: flex;
    padding-right: 0;
    margin-left: 150px;
}

/* Right (nav) column */
.hero-nav-col {
    display: flex;
    justify-content: flex-start;
}

/* Image */
.hero-photo-wrapper {
    background: #e6e0dd;
    display: inline-block;
    margin: 0;
}

.hero-photo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.hero-nav-card {
    background: var(--color-accent-green);
    color: #fff;
    padding: var(--space-10) var(--space-6);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-left: var(--space-10);
    padding-right: var(--space-10);
    min-width: 750px;
    min-height: 850px;
}

.hero-nav-link {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 1.25rem;
    text-decoration: none;
    color: #ffffff;
    display: block;
    width: 100%;
    text-align: center;
    padding: 0px 0;
    font-weight: var(--font-weight-sbold);
}

.hero-nav-link:hover {
    opacity: 0.7;
}

.hero-nav-item {
    width: 100%;
    padding: 20px 0;
    /* match spacing from screenshot */
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-nav-item:last-child {
    border-bottom: none;
}


.hero-nav-link::after {
    display: none !important;
}


.hero-bio {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    line-height: 1.5;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-4);
    padding-bottom: 80px;
    padding-top: 80px;
}


.hero-contact {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.8rem;
    margin-top: var(--space-6);
}

.hero-contact a {
    color: var(--color-primary);
    text-decoration: none;
}

.hero-contact a:hover {
    text-decoration: underline;
}

/* ========================================
   About Page
   ======================================== */
.about-section {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.about-section p {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-5);
    color: var(--color-text-secondary);
}

.about-section .years {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
}

/* ========================================
   Map/Card Page
   ======================================== */
.map-wrapper {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin: var(--space-8) auto;
}

.map-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.location-box {
    background: var(--color-text-primary);
    color: white;
    padding: var(--space-6);
    text-align: center;
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

/* ========================================
   QR Code Styles
   ======================================== */
#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-5);
    background: white;
    padding: var(--space-4);
    border-radius: var(--radius-md);
}

#qrcode img {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn-group {
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
    display: flex;
}

#showQRCode {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

#showQRCode i {
    font-size: 1.2em;
}

/* ========================================
   Modal Customization
   ======================================== */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--color-border-light);
    padding: var(--space-5);
}

.modal-body {
    padding: var(--space-6);
}

.modal-title {
    font-weight: var(--font-weight-semibold);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--color-text-primary);
    color: white;
    padding: var(--space-5) 0;
    margin-top: var(--space-10);
}

.footer a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer a:hover {
    opacity: 0.8;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    margin-bottom: var(--space-6);
}

.pagination .page-link {
    color: var(--color-primary);
    cursor: pointer;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    margin: 0 var(--space-1);
    padding: var(--space-2) var(--space-4);
    font-weight: var(--font-weight-medium);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--color-background-secondary);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(to right, var(--color-primary), var(--color-primary-dark));
    border-color: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.pagination .page-item.disabled .page-link {
    color: var(--color-text-tertiary);
    pointer-events: none;
    background-color: var(--color-background-secondary);
}

.route-image {
    width: 350px;
    max-width: 80%;
    border-radius: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* ========================================
   Spar Nord / Support Section
   ======================================== */
.support-section {
    background: var(--color-accent-green);
    padding: var(--space-8) 0 var(--space-9);
    color: #ffffff;
}

.support-inner {
    max-width: 720px;
    margin: 0 auto;
}

.support-line {
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 2rem;
    color: var(--color-primary);
    line-height: 0.75;
    font-weight: var(--font-weight-bold);
}

.support-line-last {
    text-transform: uppercase;
    font-size: 2rem;
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-6);
    line-height: 1.5;
}

.support-video-wrapper {
    max-width: 480px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #000;
}

.support-video {
    display: block;
    width: 100%;
}

/* ========================================
   Route map & location list
   ======================================== */
#route-map {
    width: 100%;
    height: 70vh;
    min-height: 420px;
}

.location-list {
    max-height: 70vh;
    overflow-y: auto;
}

.location-item.active {
    background-color: #e7f1ff;
    font-weight: 500;
}

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

/* Mobiles */
@media (max-width: 1180px) {
    .hero-section {
        margin-top: var(--space-6);
        padding-top: var(--space-4);
        padding-bottom: var(--space-7);
    }

    .hero-container {
        padding: 0 var(--space-4);
    }

    .hero-header {
        margin-bottom: var(--space-6);
    }

    .hero-heading {
        font-size: 2.2rem;
        letter-spacing: 0.06em;
        margin-bottom: var(--space-6);
    }

    .hero-intro {
        font-size: 0.9rem;
        letter-spacing: 0.12em;
        margin-bottom: var(--space-4);
    }

    .hero-quote {
        font-size: 1.1rem;
        margin-bottom: var(--space-6);
    }

    /* Stack image + nav vertically */
    .hero-main {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-6);
        margin-top: var(--space-6);
        margin-bottom: var(--space-6);
        padding-top: var(--space-4);
    }

    .hero-photo-col {
        margin-left: 0;
        justify-content: center;
    }

    .hero-photo-wrapper {
        max-width: 320px;
        margin: 0 auto;
    }

    /* Green card fills width, smaller padding, no huge min sizes */
    .hero-nav-card {
        min-width: 0;
        min-height: 0;
        width: 100%;
        padding: var(--space-6) var(--space-4);
        align-items: stretch;
    }

    .hero-nav-item {
        padding: 16px 0;
    }

    .hero-nav-link {
        font-size: 1rem;
        letter-spacing: 0.14em;
    }

    .hero-bio {
        max-width: 100%;
        padding-top: var(--space-5);
        padding-bottom: var(--space-6);
        font-size: 0.9rem;
        letter-spacing: 0.04em;
    }

    .support-section {
        padding: var(--space-6) 0 var(--space-7);
    }

    .support-line,
    .support-line-last {
        font-size: 1.2rem;
    }

    .support-video-wrapper {
        max-width: 100%;
        margin-top: var(--space-4);
    }

    /* Map page mobile tweaks */
    .location-box {
        font-size: var(--font-size-sm);
        padding: var(--space-4);
    }

    #route-map {
        height: 55vh;
        min-height: 320px;
    }

    .btn-lg {
        padding: var(--space-3) var(--space-5);
        font-size: var(--font-size-base);
    }
}

/* Shared desktop/tablet tweaks */
@media (min-width: 768px) {
    .video-card {
        height: calc(100% - var(--space-6));
    }

    .modal-dialog {
        max-width: 500px;
    }
}