/* Penzion Hermína - Calendar Styles */
body {
    background: linear-gradient(135deg, #c5a065 0%, #8a6d36 100%);
    min-height: 100vh;
    position: relative;
}

.container:not(.nav-content) {
    max-width: 1200px;
    margin: 150px auto 15px auto;
    padding: 0 20px;
}

.calendar-header {
    text-align: center;
    margin-bottom: 50px;
    color: white;
    position: relative;
}

.calendar-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.calendar-header p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.95;
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.lang-btn {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    padding: 6px 12px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: white;
    color: #667eea;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.event-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.event-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.event-content {
    padding: 12px 15px;
}

.event-date {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.event-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
    line-height: 1.2;
}

.event-description {
    font-size: 0.8rem;
    color: #4a5568;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.event-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #4a5568;
}

.event-detail-item svg {
    width: 14px;
    height: 14px;
    color: #667eea;
    flex-shrink: 0;
}


/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 650px;
    max-height: none;
    /* Let the Modal wrapper handle scrolling */
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 35px;
    margin-top: auto;
    margin-bottom: auto;
}

/* Detail Modal Optimized */
.detail-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.detail-info {
    padding: 40px;
}

.detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 15px;
}

#modal-title,
#form-title,
#promo-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* Admin Styling */
.admin-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
    background: white;
    border: 1px solid #ccc;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-btn:hover {
    background: #f7fafc;
    transform: translateY(-2px);
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-secondary {
    background: #edf2f7;
    color: #4a5568;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Admin Specific */
.admin-panel {
    margin-top: 10px;
    text-align: left;
}

.admin-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.login-form {
    max-width: 400px;
    margin: 20px auto;
    text-align: left;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.form-group label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    padding: 10px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #667eea;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.event-list {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #edf2f7;
    border-radius: 12px;
}

.event-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #edf2f7;
    transition: background 0.2s;
}

.event-list-item:last-child {
    border-bottom: none;
}

.event-list-item:hover {
    background: #f8fafc;
}

.event-list-item strong {
    color: #2d3748;
    font-size: 0.95rem;
}

.event-list-item small {
    color: #718096;
}

.image-preview {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
    border-radius: 10px;
    margin-top: 10px;
    display: none;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.image-preview.active {
    display: block;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-top: 0;
}

.modal-header h2 {
    margin: 0;
    line-height: 1;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #a0aec0;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #4a5568;
}

/* Responsive */
@media (max-width: 1200px) {
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        margin: 20px auto;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .detail-image {
        height: 250px;
    }

    .detail-info {
        padding: 20px;
    }

    .detail-title {
        font-size: 1.5rem;
    }

    .language-switcher {
        position: static;
        justify-content: center;
        margin-bottom: 20px;
    }
}

/* Admin Dashboard Redesign */
.event-list-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.event-list-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    border-color: #cbd5e0;
}

.event-list-info strong {
    font-size: 1.1rem;
    color: #2d3748;
    display: block;
    margin-bottom: 4px;
}

.event-list-info small {
    color: #718096;
    font-size: 0.9rem;
}

.event-list-info {
    flex-grow: 1;
    min-width: 0;
    /* Critical for flex text truncation */
    margin-right: 15px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.admin-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit {
    background: #edf2f7;
    color: #4a5568;
}

.btn-edit:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-delete {
    background: #fff5f5;
    color: #c53030;
}

.btn-delete:hover {
    background: #feb2b2;
    color: #9b2c2c;
}

.btn-promo {
    background: #ebf8ff;
    color: #3182ce;
}

.btn-promo:hover {
    background: #bee3f8;
    color: #2b6cb0;
}

.admin-header-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

/* Icons */
.icon-svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-error {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
}

.toast-success {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
}

.toast-info {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.toast-warning {
    background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.loading-spinner p {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-left-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Confirm Dialog */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.confirm-modal.active {
    opacity: 1;
    pointer-events: all;
}

.confirm-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirm-modal.active .confirm-content {
    transform: scale(1);
}

.confirm-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1a1a1a;
    font-size: 1.5rem;
}

.confirm-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
}

.btn-cancel,
.btn-confirm {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.btn-cancel:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.btn-confirm {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: white;
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.4);
}

/* Form Validation Errors */
.form-error {
    background: #ffebee;
    border-left: 4px solid #d32f2f;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.form-error ul {
    margin: 0;
    padding-left: 20px;
    color: #c62828;
}

.form-error li {
    margin: 5px 0;
}

.form-group.error input,
.form-group.error textarea {
    border-color: #d32f2f;
    background: #ffebee;
}

.form-group.error label {
    color: #d32f2f;
}


.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-wine);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-wine-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--color-wine-rgb), 0.3);
}

.btn-outline {
    border: 2px solid var(--color-wine);
    color: var(--color-wine);
}

.btn-outline:hover {
    background-color: var(--color-wine);
    color: white;
}

/* Enforce Primary Button Style to match site standard */
/* Overrides any potential gradients or mismatched colors */
.btn-primary {
    background: var(--color-wine) !important;
    color: white !important;
    border: none !important;
    background-image: none !important;
}

.btn-primary:hover {
    background: var(--color-wine-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--color-wine-rgb), 0.3);
}

