/* --- ZÁKLADNÍ NASTAVENÍ --- */
* {
    box-sizing: border-box;
}

:root {
    --primary-red: #e12b2b;
    --dark-red: #b01f1f;
    --text-color: #ffffff;
    --bg-color: #e12b2b;
    --card-bg: #f5f5f5;
    --text-dark: #333;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

stripe-pricing-table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

h1,
h2,
h3,
h4 {
    font-family: 'Merriweather', serif;
}

.container {
    max-width: 1140px;
    /* ZMĚNA: Bylo 960px, teď dáváme více prostoru */
    margin: 0 auto;
    padding: 20px;
}

/* --- HEADERY --- */
header {
    text-align: left;
    padding: 10px 0;
}

.logo-placeholder {
    font-size: 2.5rem;
    font-weight: 900;
    background: transparent;
    color: var(--primary-red);
    padding: 15px 30px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
    /* Reduced top margin handled by header padding reduction previously, but user wants less gap now. */
    font-size: 1.25rem;
    font-weight: 300;
}

.intro h1 {
    font-size: 3rem;
    /* Assuming default was around 2rem, 150% is 3rem */
    margin-top: 0;
}

/* --- STRIPE --- */
/* Původní kontejner pro embed - pro jistotu necháváme styly, kdyby se vrátil */
.donation-stripe {
    background: white;
    color: var(--text-dark);
    padding: 40px;
    border-radius: 4px;
    text-align: center;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* --- KALENDÁŘ (Flip Cards) --- */
.calendar-section {
    margin: 80px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.advent-card {
    height: 280px;
    perspective: 1000px;
    cursor: pointer;
}

.advent-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.advent-card.flipped .advent-card-inner {
    transform: rotateY(180deg);
}

.advent-front,
.advent-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 25px;
    box-sizing: border-box;
}

.advent-front {
    background-color: #fff;
    color: #333;
}

.advent-back {
    background-color: #1a1a1a;
    color: white;
    transform: rotateY(180deg);
    border: 2px solid white;
}

.search-bar-mock {
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    padding: 10px 20px;
    width: 90%;
    color: #5f6368;
    font-size: 0.9rem;
    background: white;
    margin-bottom: 15px;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.1);
    text-align: left;
}

.ai-loading-text {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 10px;
}

.ai-response {
    font-size: 0.85rem;
    color: #555;
    font-style: italic;
    background: #f1f1f1;
    padding: 10px;
    border-radius: 8px;
}

.advent-back h4 {
    color: var(--primary-red);
    margin-bottom: 10px;
}

.fake-link {
    color: var(--primary-red);
    font-weight: bold;
    margin-top: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
}

.fake-link:hover {
    text-decoration: underline;
}

/* --- MAPA --- */
.map-section {
    margin: 80px 0;
    position: relative;
}

.map-container {
    position: relative;
    width: 100%;
    padding-bottom: 60%;
    background-color: #a01c1c;
    background-image: url('https://vanoce.investigace.cz/cesko2.png');
    background-size: 101.5%;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 10px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
}

.map-fallback-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.2;
    pointer-events: none;
    font-weight: bold;
}

/* Styl lampy */
.lamp-marker {
    position: absolute;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    margin-top: -20px;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 0 8px rgba(255, 230, 0, 0.7));
}

.lamp-marker:hover {
    transform: scale(1.3);
    filter: drop-shadow(0 0 15px rgba(255, 230, 0, 1));
    z-index: 20;
}

.lamp-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.lamp-marker:hover .lamp-tooltip {
    opacity: 1;
}

/* --- MODAL (OKNO ČLÁNKU) --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 1100px;
    height: 90%;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f8f8;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

.modal-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.external-link-btn {
    font-size: 0.85rem;
    color: var(--primary-red);
    text-decoration: none;
    border: 1px solid var(--primary-red);
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.external-link-btn:hover {
    background: var(--primary-red);
    color: white;
}

.close-modal {
    background: #333;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
}

.close-modal:hover {
    background: black;
}

.article-body-container {
    flex-grow: 1;
    width: 100%;
    background: #fff;
    border-radius: 0 0 8px 8px;
    padding: 40px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    text-align: left;
}

.article-body-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
    display: block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.article-body-container h3,
.article-body-container h4 {
    color: var(--primary-red);
    margin-top: 30px;
    margin-bottom: 15px;
    font-family: 'Merriweather', serif;
}

.article-body-container p {
    margin-bottom: 15px;
}

/* --- PATIČKA --- */
.footer-text {
    text-align: center;
    margin: 60px 0;
}

footer {
    background-color: #8a1919;
    padding: 30px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* --- INTRO GRID LAYOUT --- */
.intro {
    max-width: 1100px;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
    text-align: left;
}

.intro-text {
    font-size: 1.25rem;
    font-weight: 300;
}

.intro-embed {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- RESPONSIVITA --- */

/* Tablet a menší desktopy (max 768px) */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .intro-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .intro-text {
        order: 1;
    }

    .intro-embed {
        order: 2;
    }

    .modal-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        height: auto;
        padding: 15px;
    }

    .modal-header h3 {
        max-width: 100%;
        white-space: normal;
        margin-bottom: 5px;
    }

    .modal-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Mobilní telefony (max 600px) */
@media (max-width: 600px) {
    .stripe-card {
        flex-direction: column;
    }

    .stripe-card-image,
    .stripe-card-content {
        width: 100%;
    }

    .stripe-card-image {
        height: 150px;
    }

    .article-body-container {
        padding: 20px;
    }



    h1 {
        font-size: 1.8rem;
    }

    header {
        text-align: center;
    }

    .container {
        text-align: center;
    }

    /* Override the large desktop size for intro heading */
    .intro h1 {
        font-size: 2rem;
        margin-top: 10px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .logo-placeholder {
        padding: 5px 10px;
        display: block;
        margin: 0 auto;
        width: fit-content;
    }

    .logo-placeholder img {
        height: 40px !important;
    }
}

/* Prevent horizontal scroll causing alignment issues */
html,
body {
    overflow-x: hidden;
    width: 100%;
}