/* ===========================
   GLOBALNE STYLE DLA KONTENTU
=========================== */
.content-page {
    padding: 1.5rem;
    background: rgba(224, 229, 236, 0); /* Półprzezroczyste tło, aby widzieć obraz pod spodem */
    backdrop-filter: blur(10px); /* Efekt rozmycia szkła (Acrylic) */
    border-radius: 12px;
    border: 1px solid rgba(15, 0, 80, 0.644);
   
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1rem;
    transition: margin 0.3s ease, padding 0.3s ease;
}

/* Zapobieganie zoomowi na mobile dla wszystkich pól */
.w11-form input, .w11-form textarea, .w11-form select {
    font-size: 16px !important;
}

.content-page h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #04000c; /* Zachowujemy ciemny kolor tekstu */
    letter-spacing: -0.02em;
    background-color: #f8f8e793; /* Delikatne tło "kawa z mlekiem" */
    padding: 0.4rem 1rem;
    border-radius: var(--w11-radius);
    display: inline-block; /* Aby tło otaczało tekst */
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.content-page .subtitle {
    font-size: 0.95rem;
    color: #000000;
    margin-top: -1rem;
    background-color: #f8f8e793; /* Delikatne tło "kawa z mlekiem" */
    padding: 0.3rem 0.8rem;
    border-radius: var(--w11-radius);
    display: inline-block; /* Aby tło otaczało tekst */
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ===========================
   SEKCJE TEKSTOWE
=========================== */
.section-text {
    background: #e0e5ec;
    padding: 1rem 1.25rem;
    border-radius: var(--w11-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.08);
}

.section-text h3 {
    font-size: 1.2rem;
    color: var(--w11-text);
    margin-bottom: 0.5rem;
}

.section-text p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #000000;
}

/* ===========================
   FORMULARZE (w11-form)
=========================== */
.w11-form {
    background: #e0e5ec;
    padding: 1.5rem;
    border-radius: var(--w11-radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.w11-form h2 {
    font-size: 1.5rem;
    color: var(--w11-text);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem; /* Przeniesione z JS */
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--w11-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
    font-size: 1rem; /* Zapobiega automatycznemu zoomowaniu na urządzeniach mobilnych */
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--w11-radius);
    background: #ffffff;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--w11-accent);
    box-shadow: 0 0 0 3px rgba(68, 138, 255, 0.2);
}

.w11-form button[type="submit"] {
    padding: 0.7rem 1.5rem;
    background: linear-gradient(145deg, #448aff, #3b76d9);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.w11-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(68, 138, 255, 0.3);
}

.w11-form button[type="submit"]:active {
    transform: translateY(0px);
    opacity: 0.9;
}

/* ===========================
   TABELE (w11-table)
=========================== */
.section-table-wrapper {
    background: #e0e5ec;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.08);
    overflow-x: auto; /* Pozwala na przewijanie tabeli w poziomie na małych ekranach */
    -webkit-overflow-scrolling: touch; /* Płynne przewijanie na iOS */
}

.section-table-wrapper h3 {
    font-size: 1.2rem;
    color: var(--w11-text);
    margin-bottom: 1rem;
}

.w11-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    min-width: 600px; /* Zapobiega ściskaniu kolumn, wymuszając przewijanie poziome dla czytelności */
}

.w11-table th,
.w11-table td {
    text-align: left;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.w11-table td {
    color: #000000;
}

.w11-table th {
    background: rgba(0, 0, 0, 0.02);
    font-weight: 600;
    color: var(--w11-text);
}

.w11-table tr:hover {
    background: var(--w11-hover);
}

/* ===========================
   GRID (section-grid)
=========================== */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.grid-card {
    background: #e0e5ec;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.grid-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.grid-card h4 {
    font-size: 1.1rem;
    color: var(--w11-text);
    margin-bottom: 0.5rem;
}

.grid-card p {
    font-size: 0.85rem;
    color: #000000;
}

/* ===========================
   AKCJE (section-actions)
=========================== */
.section-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.w11-button {
    padding: 0.6rem 1.2rem;
    border-radius: var(--w11-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.w11-button.primary {
    background: var(--w11-accent);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 120, 215, 0.2);
}

.w11-button.primary:hover {
    background: #005bb5;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 120, 215, 0.3);
}

.w11-button.secondary {
    background: transparent;
    color: var(--w11-accent);
    border: 1px solid var(--w11-accent);
}

.w11-button.secondary:hover {
    background: var(--w11-active);
    color: var(--w11-accent);
}

@media (max-width: 600px) {
    .content-page {
        margin: 0.5rem;
        padding: 1rem;
    }

    .content-page h1 {
        font-size: 1.5rem;
    }

    .section-actions {
        flex-direction: column; /* Układanie przycisków pionowo na małych ekranach */
    }
}

/* ===========================
   GALERIA (section-gallery)
=========================== */
.section-gallery {
    background: #e0e5ec;
    padding: 1.5rem;
    border-radius: var(--w11-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.08);
}

.section-gallery h3 {
    font-size: 1.2rem;
    color: var(--w11-text);
    margin-bottom: 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}

.gallery-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    background: #e0e5ec;
}

.gallery-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.gallery-lightbox.hidden {
    display: none;
}

.gallery-lightbox .gallery-full {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* ===========================
   KALENDARZ
=========================== */
.calendar-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.calendar-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    max-width: 420px;
    margin: 0 auto;
}

.calendar-header {
    text-align: center;
    margin-bottom: 1rem;
}

.calendar-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--w11-text);
    margin: 0 0 1rem 0;
}

.calendar {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

.calendar thead th {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.calendar tbody td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 0.95rem;
    color: #000000;
    vertical-align: middle;
    height: 3rem;
    transition: all 0.2s ease;
}

.calendar td.calendar-day {
    cursor: pointer;
    font-weight: 500;
}

.calendar td.calendar-day:hover {
    background: #448aff;
    color: #ffffff;
    font-weight: 700;
    transform: scale(1.08);
    border-radius: 8px;
    z-index: 1;
    position: relative;
}

.calendar td.calendar-today {
    background: var(--w11-accent);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(68, 138, 255, 0.35);
    border-radius: 8px;
}

.calendar td.calendar-today:hover {
    background: #3b76d9;
    color: #ffffff;
    font-weight: 700;
    transform: scale(1.08);
}

.calendar-empty {
    pointer-events: none;
    background: transparent;
}

.calendar-year:hover,
.calendar-month:hover,
.calendar-week:hover {
    background: #448aff;
    color: #ffffff;
    cursor: pointer;
    transform: scale(1.05);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.calendar-current.calendar-year-selected,
.calendar-current.calendar-month-selected,
.calendar-current.calendar-week-selected {
    background: var(--w11-accent);
    color: #ffffff;
    font-weight: 700;
    border-radius: 8px;
}

.calendar-year-select,
.calendar-month-select,
.calendar-week-select,
.calendar-day-select {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 200px;
    margin-bottom: 0.5rem;
}

.calendar-year-select:hover,
.calendar-month-select:hover,
.calendar-week-select:hover,
.calendar-day-select:hover {
    border-color: var(--w11-accent);
    box-shadow: 0 0 0 3px rgba(68, 138, 255, 0.2);
}