:root {
    --primary-color: #274690;
    /* Kazanlak Blue */
    --secondary-color: #71BEE2;
    /* Light Blue */
    --accent-color: #e91e63;
    /* Keep Rose Pink as an accent for festival elements */
    --bg-color: #F1F9FC;
    /* Light Blueish Background from site */
    --card-bg: #ffffff;
    --text-color: #14161C;
    /* Dark Heading Silver/Black */
    --body-text: #68676D;
    /* Gray Body Text */
    --border-radius: 4px;
    /* Site uses 4px */
    --transition: all 0.2s ease-in-out;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--body-text);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

h1,
h2,
h3,
.logo-text {
    font-family: 'Play', sans-serif;
    color: var(--text-color);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header {
    text-align: left;
    margin-bottom: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 20px;
}

.header-logo {
    height: 60px;
    width: auto;
}

.header-text {
    display: flex;
    flex-direction: column;
}

.muni-name {
    font-family: 'Play', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    line-height: 1.2;
}

header h1 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin: 5px 0 0 0;
    text-transform: uppercase;
    font-weight: 400;
}

.choice-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

@media (max-width: 600px) {
    .choice-container {
        grid-template-columns: 1fr;
    }
}

.choice-card {
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.choice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.choice-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.choice-card .icon {
    font-size: 4rem;
    margin-bottom: 25px;
    display: block;
    line-height: 1;
}

.choice-card h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 700;
}

.choice-card p {
    margin-top: 15px;
    color: var(--body-text);
    font-size: 1rem;
    max-width: 200px;
}

.choice-card.status .icon {
    color: var(--accent-color);
}

.choice-card.register .icon {
    color: var(--primary-color);
}

.choice-card.status::before {
    background: var(--accent-color);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-section h2 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    border-left: 4px solid var(--secondary-color);
    padding-left: 15px;
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(39, 70, 144, 0.1);
}

.invalid {
    border-color: #e74c3c !important;
    background-color: #fff8f8 !important;
}

.invalid:focus {
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1) !important;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    header {
        flex-direction: column;
        text-align: center;
    }
}

/* Map Placeholder Styling */
#map-container {
    background: #f9f9f9;
    border: 2px dashed #ccc;
    height: auto;
    width: 100%;
    overflow-x: auto;
    /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    background: #f0f0f0;
    border-radius: 12px;
    padding: 0;
    position: relative;
    border: 2px solid #eee;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.spot-hover {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    z-index: 1000;
    display: none;
    pointer-events: none;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.category-map {
    min-width: 800px;
    /* Ensure map doesn't shrink below a usable size */
    width: 100%;
    height: auto;
    position: relative;
    display: block;
    transform: translateZ(0);
}

.map-bg {
    display: block;
    width: 100%;
    /* Responsive width */
    height: auto;
    /* Maintain aspect ratio */
    max-width: 100%;
    /* Prevent overflowing container */
}

.spot {
    width: 20px;
    height: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.65rem;
    transition: all 0.2s;
    user-select: none;
    transform: translate(-50%, -50%);
    border: 1px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.spot.available {
    background-color: #27ae60;
}

.spot.occupied {
    background-color: #e74c3c;
}

.spot.reserved {
    background-color: #f1c40f;
}


.spot:hover {
    transform: translate(-50%, -50%) scale(1.15);
    z-index: 100;
}

.spot.selected {
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 101;
}

.spot.disabled {
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(1);
}

.spot.occupied {
    opacity: 0.9;
}

.period-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
}

.period-btn {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.period-btn:hover:not(.disabled) {
    border-color: var(--primary-color);
    background: #fff;
}

.period-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #eee;
}

.period-btn .title {
    font-weight: bold;
    font-size: 1.1em;
}

.period-btn .dates {
    font-size: 0.9em;
    color: #666;
}

button,
button[type="submit"] {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 18px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--border-radius);
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover,
button[type="submit"]:hover {
    background: #1a3061;
    /* Darker blue */
    transform: none;
    box-shadow: 0 4px 12px rgba(39, 70, 144, 0.2);
}

.help-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.reglament-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.reglament-modal.active {
    display: flex;
}

/* Modal Styling */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    padding: 40px;
    border-radius: 12px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f0f0f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: #333;
    transition: var(--transition);
}

.modal-close:hover {
    background: #e0e0e0;
    color: var(--accent-color);
}

.reglament-modal-content h2 {
    color: var(--primary-color);
    margin-top: 25px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
}

.reglament-modal-content ul {
    padding-left: 20px;
    margin-bottom: 20px;
}


.reglament-modal-content li {
    margin-bottom: 10px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-Submitted {
    background: #e9ecef;
    color: #495057;
}

.status-Received {
    background: #cce5ff;
    color: #004085;
}

.status-Clarification {
    background: #fff3cd;
    color: #856404;
}

.status-PendingPayment {
    background: #d1ecf1;
    color: #0c5460;
}

.status-Approved {
    background: #d4edda;
    color: #155724;
}

.status-Rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-Waitlist {
    background: #fd7e14;
    color: #fff;
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn.primary {
    background: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background: #1a3061;
}

.card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

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

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

/* Local Validation Styles */
.invalid {
    border-color: #e74c3c !important;
    background-color: #fff8f8 !important;
}

.error-v {
    display: block;
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
}

input[type="checkbox"].invalid {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
}