:root {
    --primary-color: #c99836ff;
    /*D47A1E*/
    --primary-dark: #edb541;
    --secondary-color: #FDF6E3;
    /* Light cream background */
    --text-dark: #033899;
    --text-muted: #666666;
    --white: #ffffff;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --hover-transition: all 0.3s ease;

    /* Bootstrap Primary Override */
    --bs-primary: #c99836;
    --bs-primary-rgb: 201, 152, 54;
}

html {
    scrollbar-gutter: stable;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
    max-width: 100vw;
}

/* Fix pro odskakování modalu - Bootstrap přidává padding-right, který s scrollbar-gutter: stable způsobuje posun */
body.modal-open {
    padding-right: 0 !important;
}

/* Responzivní šířka modalů */
@media (min-width: 992px) {
    .custom-modal-80 {
        max-width: 80% !important;
    }

    .custom-modal-60 {
        max-width: 60% !important;
    }
}

@media (max-width: 991.98px) {

    .custom-modal-80,
    .custom-modal-60 {
        max-width: 95% !important;
        /* Necháme malý okraj pro "vzdušnost" */
        margin: 10px auto;
    }

    #headerMapa,
    #headerStrategie,
    #headerBrany {
        min-height: 150px;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* Utilities */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.text-primary-dark {
    color: var(--primary-dark) !important;
}

.text-dark {
    color: var(--text-dark) !important;
}

.color-dark {
    color: var(--text-dark) !important;
}

.bg-primary-dark {
    background-color: var(--primary-dark) !important;
}

.bg-light-custom {
    background-color: var(--secondary-color) !important;
}


.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--hover-transition);
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 152, 54, 0.3);
}



.section-padding {
    padding: 80px 0;
}

/* Animations */
.hover-lift {
    transition: var(--hover-transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

/* Navbar */
.navbar {
    padding-top: 20px;
    padding-bottom: 20px;
    background-color: var(--white);
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: var(--hover-transition);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-brand img {
    height: 40px;
    /* Adjust based on logo needs */
}

/* Hero Section */
.hero-section {
    padding: 100px 0;
}

.hero-heading {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 30px;
    line-height: 1.2;
}

.hero-heading span {
    font-weight: 600;
}

/* Cards */
.custom-card {
    background: var(--white);
    border: none;
    border-radius: 20px;
    padding: 30px;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--hover-transition);
    display: flex;
    flex-direction: column;
}

.custom-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background-color: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 24px;
    flex-shrink: 0;
}

.social-icon-outline {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
    transition: var(--hover-transition);
    text-decoration: none;
}

.social-icon-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 152, 54, 0.2);
}

/* Mandala Effect */
.mandala-effect {
    -webkit-mask-image: radial-gradient(circle, #00000000 90%);
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 0) 90%);
    opacity: 0.9;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    animation: spin 120s linear infinite;
    /* Optional: slow spin for "energy" effect */
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-centered {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Logo Styles */
.logo-icon {
    height: 48px;
    width: auto;
}

.logo-text {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 24px;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin-left: 10px;
    line-height: 1;
}

@media (max-width: 575.98px) {
    .logo-text {
        font-size: 18px;
        letter-spacing: 1px;
    }
}

/* --- Zdroje Page Styles --- */
/* Obsolete helper for zdroje icons removed, now using .icon-box */

.resource-card {
    background: #fff;
    border-radius: 15px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-color: #FFE69C;
}

.energy-type-card {
    border-color: #f0f0f0;
}

.energy-type-img-col {
    width: 140px;
    background-color: #f8f8f8;
    flex-shrink: 0;
}

.energy-type-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 575.98px) {
    .energy-type-card {
        flex-direction: column;
    }

    .energy-type-img-col {
        width: 100%;
        aspect-ratio: 1 / 1;
    }
}

.gate-number-label {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #e5b34e;
    /* Gold/Yellow from image */
    line-height: 1;
    flex-shrink: 0;
}

#gateSearch:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(201, 152, 54, 0.1);
    outline: 0;
}

/* Mandala Wrapper */
.mandala-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    /* Adjust as needed */
    aspect-ratio: 1;
    margin: 0 auto;
    display: flex;
    /* Ensure centering context */
    align-items: center;
    justify-content: center;
}

/* Static Background Image */
.mandala-static {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    /* Circular fade out */
    -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 70%);
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 70%);
}

/* Rotating Foreground Image */
.mandala-rotating {
    position: absolute;
    top: 50%;
    left: 50%;
    /* transform handled by animation */
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure it doesn't get cropped if aspect ratios differ */
    z-index: 2;
    opacity: 1;
    -webkit-mask-image: radial-gradient(circle, black 45%, transparent 100%);
    mask-image: radial-gradient(circle, black 45%, transparent 100%);
    animation: spin-centered 120s linear infinite;
}

/* Custom Icons */
.bi-hexa {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask-image: url('../img/hexagram.svg');
    mask-image: url('../img/hexagram.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.bi-people-arrows {
    display: inline-block;
    width: 1.375em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask-image: url('../img/people-arrows.svg');
    mask-image: url('../img/people-arrows.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.bi-atom {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask-image: url('../img/atom.svg');
    mask-image: url('../img/atom.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.bi-dna {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask-image: url('../img/dna.svg');
    mask-image: url('../img/dna.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.bi-astrology {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask-image: url('../img/astrology.svg');
    mask-image: url('../img/astrology.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.bi-luna {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: top;
    background-color: currentColor;
    -webkit-mask-image: url('../img/luna.svg');
    mask-image: url('../img/luna.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: top center;
    mask-position: top center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* --- Buttons --- */
.btn-outline-secondary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transition: var(--hover-transition);
}

.btn-outline-secondary:hover {
    background-color: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 61, 153, 0.2);
}

.btn-outline-secondary:active,
.btn-outline-secondary:focus,
.btn-outline-secondary.active {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: var(--white) !important;
}

/* Specific filter button styling */
.filter-btn {
    border-color: var(--primary-dark) !important;
    color: var(--primary-dark) !important;
    background-color: transparent;
}

.filter-btn:hover {
    background-color: var(--secondary-color) !important;
    color: var(--primary-dark) !important;
}

.filter-btn.active {
    background-color: var(--primary-dark) !important;
    color: var(--white) !important;
    box-shadow: 0 4px 10px rgba(237, 181, 65, 0.3);
}

/* Mobile Hero Mandala Background & Parallax */
@media (max-width: 991.98px) {
    .mobile-bg-mandala {
        position: relative;
        overflow: hidden;
        background-color: var(--white);
    }

    .mobile-bg-mandala::before {
        content: "";
        position: absolute;
        top: -15%;
        /* Increased buffer */
        left: 0;
        width: 100%;
        height: 130%;
        /* Increased buffer */
        background-image: url('../img/Mandala.jpg');
        background-position: center top;
        background-size: cover;
        background-repeat: no-repeat;
        opacity: 0.15;
        z-index: 0;
        pointer-events: none;
        will-change: transform;
        transform: translateY(var(--scroll-offset, 0px));
    }

    .mobile-bg-mandala.mobile-bg-monika::before {
        background-image: url('../img/monika_ublova_main.jpg');
        background-position: center center;
    }

    .mobile-bg-solid {
        position: relative;
        background-color: var(--white) !important;
        z-index: 5;
    }

    .mobile-bg-mandala>.container,
    .mobile-bg-solid>.container {
        position: relative;
        z-index: 2;
    }
}

/* Flatpickr Primary Color Override & Hover Fix */
/* Ultimate specificity to beat the material_orange theme */
html body .flatpickr-calendar.material_orange .flatpickr-day.selected,
html body .flatpickr-calendar.material_orange .flatpickr-day.startRange,
html body .flatpickr-calendar.material_orange .flatpickr-day.endRange,
html body .flatpickr-calendar.material_orange .flatpickr-day.selected:hover,
html body .flatpickr-calendar.material_orange .flatpickr-day.startRange:hover,
html body .flatpickr-calendar.material_orange .flatpickr-day.endRange:hover,
html body .flatpickr-calendar.material_orange .flatpickr-day.selected:focus,
html body .flatpickr-calendar.material_orange .flatpickr-day.startRange:focus,
html body .flatpickr-calendar.material_orange .flatpickr-day.endRange:focus,
html body .flatpickr-calendar.material_orange .flatpickr-day.today.selected {
    background: #c99836 !important;
    border-color: #c99836 !important;
    color: #fff !important;
}

html body .flatpickr-calendar.material_orange .flatpickr-months .flatpickr-month,
html body .flatpickr-calendar.material_orange .flatpickr-weekdays,
html body .flatpickr-calendar.material_orange .flatpickr-current-month .flatpickr-monthDropdown-months,
html body .flatpickr-calendar.material_orange .flatpickr-month {
    background: #c99836 !important;
    color: #fff !important;
}

html body .flatpickr-calendar.material_orange .flatpickr-innerContainer {
    border-top: none !important;
}

html body .flatpickr-calendar.material_orange span.flatpickr-weekday {
    background: #c99836 !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

html body .flatpickr-calendar.material_orange .flatpickr-day.today {
    border-color: #c99836 !important;
}

html body .flatpickr-calendar.material_orange .flatpickr-day.today:hover {
    background: #c99836 !important;
    color: #fff !important;
}

/* Fix for form jumping when picker is open */
html body .custom-card.picker-open {
    transform: translateY(-10px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #c99836 !important;
}