/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.modal-content::-webkit-scrollbar {
    display: none;
}

/* [FIX] - STICKY KŘÍŽEK S VĚTŠÍ DOTYKOVOU PLOCHOU */
.modal-close {
    position: sticky;
    /* Zůstane přilepený nahoře i při scrollování */
    top: 10px;
    float: right;
    /* Udrží ho vpravo */
    z-index: 1000;
    /* Musí být nad textem */

    /* Zvětšení dotykové plochy pro palec (min 44px) */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Vizuální styl pro čitelnost na textu */
    background-color: rgba(255, 255, 255, 0.95);
    /* Téměř neprůhledné */
    backdrop-filter: blur(4px);
    /* Efekt matného skla */
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* Jemný stín pro oddělení */

    /* Typografie */
    color: #333;
    font-size: 28px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    transform: scale(1.1);
    background-color: #fff;
}

.modal-close:hover {
    color: #333;
}

.modal-header-content {
    text-align: center;
    margin-bottom: 35px;
    padding-top: 10px;
}

.modal-header-content h2 {
    color: var(--primary-green-dark);
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin: 0;
    text-align: center;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--secondary-gray);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
}

.input-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px;
    width: 100%;
}

.input-wrapper label {
    display: block;
    width: 100%;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    width: 100% !important;
}

#form-message {
    min-height: 45px;
    height: 45px;
    resize: none;
}

.form-success {
    text-align: center;
    padding: 40px 20px;
}

.form-success h3 {
    color: var(--primary-green);
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.form-success p {
    color: var(--text-gray);
    margin-bottom: 24px;
}

.service-price-info {
    margin-top: 5px;
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 500;
}

#current-service-price {
    color: var(--primary-green-dark);
    font-weight: 700;
}

/* About Section Layout */
.about-content {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr;
    gap: 40px;
    align-items: flex-start;
}

.about-image-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.portrait-container {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    background: var(--secondary-gray);
    transition: var(--transition-medium);
}

.small-portrait {
    max-width: 160px;
    /* Smaller as requested */
}

.about-portrait {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.reviews-cta-btn {
    background: white;
    border: 1px solid var(--secondary-gray-dark);
    color: var(--primary-green-dark);
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: var(--transition-medium);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    width: 100%;
    max-width: 160px;
}

.reviews-cta-btn:hover {
    border-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.rating-number {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-dark);
}

.reviews-cta-btn .stars {
    color: #fbbc04;
    font-size: 0.9rem;
}

/* Calendar & Selection Summary */
.selection-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fdf4;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--primary-green);
    margin-bottom: 2px;
}

.selection-summary span {
    font-size: 0.95rem;
    color: var(--primary-green-dark);
}

.selection-summary strong {
    font-weight: 700;
}



.change-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 700;
}

.change-btn:hover {
    color: var(--primary-green);
}

.calendar-ui {
    background: white;
    border: 1px solid var(--secondary-gray-dark);
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cal-title {
    font-weight: 800;
    color: var(--primary-green-dark);
    font-size: 1.1rem;
    text-transform: capitalize;
}

.cal-nav {
    background: var(--secondary-gray);
    border: 1px solid var(--secondary-gray-dark);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary-green-dark);
    transition: var(--transition-fast);
}

.cal-nav:hover {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary-green-light);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day {
    aspect-ratio: 1;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-fast);
    background: var(--secondary-gray);
}

.calendar-day:hover:not(.empty):not(.disabled) {
    background: var(--primary-green-light);
    color: white;
    transform: scale(1.05);
}

.calendar-day.selected {
    background: var(--primary-green) !important;
    color: white !important;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(45, 94, 63, 0.3);
}

.calendar-day.disabled {
    color: #cbd5e0;
    cursor: not-allowed;
    background: transparent;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.time-slots-ui {
    margin-top: 16px;
    padding: 16px;
    background: #fdfcf8;
    border-radius: 12px;
    border: 1px solid var(--accent-beige);
}

.slots-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-green-dark);
    margin-bottom: 12px;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.time-slot {
    padding: 10px;
    text-align: center;
    background: white;
    border: 1px solid var(--secondary-gray);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.time-slot:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    background: #f0fdf4;
}

@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        order: -1;
        margin-bottom: 20px;
    }

    .credentials {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* ========== SUCCESS OVERLAY ========== */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 94, 63, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    opacity: 0;
    animation: fadeInOverlay 0.5s ease forwards;
}

.success-overlay-content {
    text-align: center;
    color: white;
}

.success-check {
    font-size: 6rem;
    margin-bottom: 30px;
    color: white;
}

.success-overlay-content h2 {
    color: white;
    font-size: 2.5rem;
    margin: 0;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.form-footer-info {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 15px;
    margin-bottom: 10px;
}

.submit-btn {
    background-color: #2d5e3f !important;
    /* Darker green for premium look */
    margin-top: 10px !important;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .modal-content {
        padding: 15px;
        width: 96%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .modal-header-content {
        margin-bottom: 20px;
    }

    .modal-header-content h2 {
        font-size: 1.4rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .calendar-ui {
        padding: 15px;
    }

    .calendar-grid {
        gap: 3px;
    }

    .calendar-day {
        min-height: 34px;
        font-size: 0.85rem;
    }

    .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
        gap: 5px;
    }

    .time-slot {
        padding: 8px;
        font-size: 0.85rem;
    }
}