/* ==========================================================================
   Halloweenské Halali - Moderní Dobřejovice
   Styling inspired by the official poster (data/file_000000002a1c8246a886bfd49b818722.png)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Montserrat:wght@400;600;800;900&family=Creepster&display=swap');

:root {
    --bg-blue-top: #62c3de;
    --bg-blue-mid: #7cd5ea;
    --bg-blue-bottom: #9de5f5;
    --halloween-orange: #f46a00;
    --halloween-orange-dark: #d95300;
    --halloween-orange-light: #ff851b;
    --dark-navy: #181d3b;
    --dark-text: #2c3144;
    --card-bg: rgba(255, 255, 255, 0.94);
    --card-border: rgba(255, 255, 255, 0.8);
    --shadow-soft: 0 10px 25px rgba(24, 29, 59, 0.12);
    --shadow-hover: 0 15px 35px rgba(24, 29, 59, 0.18);
    --radius-lg: 20px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Fredoka', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(175deg, var(--bg-blue-top) 0%, var(--bg-blue-mid) 40%, var(--bg-blue-bottom) 100%);
    background-attachment: fixed;
    color: var(--dark-text);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Background Spiderweb and Decorative Elements */
.bg-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.web-top-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 260px;
    height: 260px;
    opacity: 0.35;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none" stroke="white" stroke-width="0.8"><path d="M0,0 L100,0 M0,0 L92,38 M0,0 L70,70 M0,0 L38,92 M0,0 L0,100 M20,0 Q20,20 0,20 M40,0 Q40,40 0,40 M60,0 Q60,60 0,60 M80,0 Q80,80 0,80 M100,0 Q100,100 0,100"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
}

.web-top-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 240px;
    height: 240px;
    opacity: 0.3;
    transform: scaleX(-1);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none" stroke="white" stroke-width="0.8"><path d="M0,0 L100,0 M0,0 L92,38 M0,0 L70,70 M0,0 L38,92 M0,0 L0,100 M20,0 Q20,20 0,20 M40,0 Q40,40 0,40 M60,0 Q60,60 0,60 M80,0 Q80,80 0,80 M100,0 Q100,100 0,100"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
}

.bat {
    position: absolute;
    font-size: 2.2rem;
    opacity: 0.75;
    animation: floatBat 6s ease-in-out infinite alternate;
}

.bat-1 { top: 12%; left: 8%; animation-duration: 5s; }
.bat-2 { top: 18%; right: 10%; animation-duration: 7s; animation-delay: 1s; }
.bat-3 { top: 45%; left: 4%; font-size: 1.8rem; animation-duration: 6.5s; animation-delay: 2s; }
.bat-4 { top: 65%; right: 6%; font-size: 2rem; animation-duration: 5.5s; }

.spider {
    position: absolute;
    font-size: 1.6rem;
    opacity: 0.7;
    animation: swingSpider 4s ease-in-out infinite alternate;
}

.spider-1 { top: 8%; right: 28%; }
.spider-2 { top: 28%; left: 14%; animation-delay: 1.5s; }

@keyframes floatBat {
    0% { transform: translateY(0) rotate(-4deg); }
    100% { transform: translateY(-18px) rotate(6deg); }
}

@keyframes swingSpider {
    0% { transform: translateY(0) rotate(-6deg); }
    100% { transform: translateY(12px) rotate(6deg); }
}

/* Page Layout */
.page-wrapper {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* Header */
.site-header {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    flex-wrap: wrap;
}

.header-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-logo {
    height: 52px;
    width: 148px;
    object-fit: contain;
    border-radius: 6px;
}

/* Header Notice Banner (Change of Start Announcement) */
.header-notice-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #f97316;
    border-radius: var(--radius-md);
    padding: 10px 16px;
    box-shadow: 0 3px 12px rgba(249, 115, 22, 0.16);
    flex: 1;
    min-width: 260px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-notice-banner:hover {
    box-shadow: 0 5px 16px rgba(249, 115, 22, 0.25);
    transform: translateY(-1px);
}

.notice-icon {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.notice-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notice-title {
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.6px;
    color: #c2410c;
    text-transform: uppercase;
}

.notice-text {
    font-size: 0.96rem;
    font-weight: 600;
    color: #431407;
    line-height: 1.35;
}

.notice-text strong {
    color: #9a3412;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: #fb923c;
    text-underline-offset: 2px;
}

.header-tagline {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark-navy);
}

.admin-header-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--halloween-orange-dark);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    background: rgba(244, 106, 0, 0.1);
    transition: all 0.2s ease;
}

.admin-header-link:hover {
    background: var(--halloween-orange);
    color: #ffffff;
}

/* Hero Section */
.hero-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--card-border);
    backdrop-filter: blur(8px);
    text-align: center;
    margin-bottom: 24px;
}

.hero-title {
    font-family: 'Montserrat', 'Fredoka', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--dark-navy);
    text-transform: none;
    margin-bottom: 12px;
    text-shadow: 2px 3px 0px rgba(255, 255, 255, 0.9), 3px 5px 12px rgba(24, 29, 59, 0.15);
    line-height: 1.15;
}

.orange-banner {
    display: inline-block;
    background: linear-gradient(135deg, var(--halloween-orange-light), var(--halloween-orange));
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 6px 24px;
    border-radius: 30px;
    margin: 8px auto 16px;
    box-shadow: 0 4px 12px rgba(244, 106, 0, 0.35);
    transform: rotate(-1deg);
    letter-spacing: 0.5px;
}

.event-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 16px 0 12px;
}

.event-badge {
    background: rgba(24, 29, 59, 0.06);
    color: var(--dark-navy);
    font-size: 1.15rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.event-masks {
    color: var(--halloween-orange-dark);
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 8px;
}

/* Content Section (from docx) */
.content-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--card-border);
    backdrop-filter: blur(8px);
    margin-bottom: 24px;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark-navy);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lead-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-navy);
    margin-bottom: 16px;
    line-height: 1.5;
}

.instructions-list {
    list-style: none;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.instructions-list li {
    background: #ffffff;
    border: 1px solid rgba(24, 29, 59, 0.08);
    border-left: 5px solid var(--halloween-orange);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark-navy);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: transform 0.2s ease;
}

.instructions-list li:hover {
    transform: translateX(4px);
}

.step-link-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.step-num {
    background: var(--halloween-orange);
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(255, 133, 27, 0.12), rgba(244, 106, 0, 0.08));
    border: 2px dashed var(--halloween-orange-light);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 20px 0;
    font-weight: 600;
    color: var(--dark-navy);
}

.highlight-box p {
    margin-bottom: 8px;
}
.highlight-box p:last-child {
    margin-bottom: 0;
}

/* Route & GPX Section */
.route-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 700px) {
    .route-section {
        grid-template-columns: 1fr;
    }
}

.route-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--card-border);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.route-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 12px;
}

.qr-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    transition: transform 0.2s ease;
}

.qr-link:hover .qr-image-wrapper,
.qr-link:focus .qr-image-wrapper {
    border-color: var(--halloween-orange);
    box-shadow: 0 8px 22px rgba(244, 106, 0, 0.28);
    transform: translateY(-2px);
}

.qr-link:active .qr-image-wrapper {
    transform: translateY(0) scale(0.98);
}

.qr-image-wrapper {
    background: #ffffff;
    padding: 12px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    border: 2px solid #e2e8f0;
    margin: 8px auto 16px;
    max-width: 190px;
    width: 100%;
    transition: all 0.2s ease;
    cursor: pointer;
}

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

.qr-tap-hint {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--halloween-orange-dark);
    margin-top: 8px;
    text-align: center;
    line-height: 1.2;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 260px;
}

.btn-orange {
    background: linear-gradient(135deg, var(--halloween-orange), var(--halloween-orange-dark));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(244, 106, 0, 0.35);
}

.btn-orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 106, 0, 0.45);
    background: linear-gradient(135deg, var(--halloween-orange-light), var(--halloween-orange));
}

.btn-navy {
    background: linear-gradient(135deg, var(--dark-navy), #2d345a);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(24, 29, 59, 0.25);
}

.btn-navy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 29, 59, 0.35);
}

/* Registration Form Card */
.form-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-hover);
    border: 3px solid var(--halloween-orange);
    position: relative;
    margin-bottom: 24px;
}

.form-card::before {
    content: "🎃";
    position: absolute;
    top: -24px;
    left: 32px;
    font-size: 2.4rem;
    background: #ffffff;
    padding: 0 8px;
    border-radius: 50%;
}

.form-card::after {
    content: "👻";
    position: absolute;
    top: -24px;
    right: 32px;
    font-size: 2.4rem;
    background: #ffffff;
    padding: 0 8px;
    border-radius: 50%;
}

.form-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark-navy);
    text-align: center;
    margin-bottom: 8px;
}

.form-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 1.1rem;
    border: 2px solid #dde2ec;
    border-radius: var(--radius-md);
    background: #f8fafc;
    color: var(--dark-text);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--halloween-orange);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(244, 106, 0, 0.15);
}

.btn-submit {
    width: 100%;
    max-width: 100%;
    font-size: 1.25rem;
    padding: 16px;
    margin-top: 10px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--halloween-orange), var(--halloween-orange-dark));
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(244, 106, 0, 0.4);
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 106, 0, 0.5);
}

.btn-submit:active {
    transform: translateY(1px);
}

/* Alert Messages */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 24px;
    color: var(--dark-navy);
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-social {
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--dark-navy);
}

.footer-social a {
    color: var(--dark-navy);
    text-decoration: underline;
}

.footer-admin-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--dark-navy);
    opacity: 0.75;
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-admin-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Responsive tweaks & Mobile usability improvements */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 14px 12px 36px;
    }

    .site-header {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
    }

    .header-notice-banner {
        width: 100%;
        min-width: 0;
    }

    .hero-card {
        padding: 24px 18px;
    }

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

    .orange-banner {
        font-size: clamp(1.05rem, 4vw, 1.3rem);
        padding: 6px 16px;
        white-space: normal;
    }

    .content-card {
        padding: 24px 18px;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .form-card {
        padding: 26px 16px;
    }

    .form-card::before,
    .form-card::after {
        font-size: 1.8rem;
        top: -18px;
    }

    .form-card::before { left: 16px; }
    .form-card::after { right: 16px; }

    .instructions-list li {
        font-size: 0.98rem;
        padding: 10px 14px;
    }

    .btn {
        max-width: 100%;
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .site-header {
        flex-direction: column;
        gap: 12px;
        padding: 12px 14px;
        text-align: center;
    }

    .header-logo-container {
        justify-content: center;
    }

    .header-notice-banner {
        padding: 10px 12px;
        gap: 10px;
        text-align: left;
    }

    .notice-icon {
        font-size: 1.5rem;
    }

    .notice-text {
        font-size: 0.9rem;
    }

    .header-logo {
        height: 46px;
    }

    .event-details {
        flex-direction: column;
        gap: 8px;
    }

    .event-badge {
        font-size: 0.95rem;
        padding: 6px 12px;
        justify-content: center;
    }

    .form-input {
        font-size: 16px; /* Prevents auto-zoom on iOS Safari */
        padding: 12px 14px;
        min-height: 48px;
    }

    .btn-submit {
        font-size: 1.15rem;
        padding: 14px 12px;
        min-height: 52px;
    }

    .bat, .spider {
        opacity: 0.35;
    }
}
