/* Style dla NaszaSiersza.online - przyjazne dzieciom */

/* Reset i podstawy */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FF9800;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --error-color: #f44336;
    --success-color: #4CAF50;
    --font-family: 'Comic Sans MS', 'Trebuchet MS', Arial, sans-serif;
    --font-size-base: 16px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Dev body - unika konfliktów z Bootstrapem i edytorami */
.dev-body {
    font-family: var(--font-family) !important;
    font-size: var(--font-size-base) !important;
    line-height: 1.6 !important;
    color: var(--text-color) !important;
    background-color: var(--bg-color) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Style specyficzne dla stron edycji i podglądu artykułu */
.article-page {
    max-width: 100%;
    margin: 0 auto;
}

.main-content-dev {
    min-height: calc(100vh - 200px);
    text-align: center;
    padding: 20px;
}

.article-page .site-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    border-bottom: 0px !important;
    text-decoration: none;
}

.article-page h1,
.article-page h2,
.article-page h3 {
    border-bottom: 0px !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Dev container - unika konfliktów z Bootstrapem */
.dev-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Pełna szerokość dla panelu admina */
.admin-panel > .container {
    max-width: 100%;
    padding: 0 2rem;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: background 0.3s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
}

.nav-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Main content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Mapa */
.map-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 100px);
    min-height: 500px;
    display: flex;
}

.map {
    flex: 1;
    height: 100%;
    min-height: 400px;
    z-index: 1;
    position: relative;
}

/* Panel boczny */
.places-panel {
    width: 300px;
    background: var(--card-bg);
    border-right: 2px solid var(--border-color);
    overflow-y: auto;
    padding: 1rem;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.panel-toggle {
    display: none;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    margin: 0;
}

.panel-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.places-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.place-item {
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.place-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.place-item h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.place-short-desc {
    color: #666;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-image img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.modal-description {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-family: var(--font-family);
    font-weight: bold;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

a.btn.btn-primary {
    color: #fff;
    text-decoration: none;
}

.btn-primary:hover {
    background: #45a049;
    transform: scale(1.05);
}

.btn-secondary {
    background: #757575;
    color: white;
}

a.btn.btn-secondary {
    color: #fff;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* Formularze */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* Auth pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
}

.auth-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-box h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-link a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #ffebee;
    color: var(--error-color);
    border: 2px solid var(--error-color);
}

.alert-success {
    background: #e8f5e9;
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.alert-info {
    background: #e3f2fd;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

/* Article page */
.article-page {
    max-width: 100%;
    margin: 0 auto;
}

.article-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.article-main-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.article-body h2 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body h3 {
    color: var(--accent-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

.article-body a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.article-gallery {
    margin-top: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

.article-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.article-author {
    color: #666;
    margin-bottom: 1rem;
}

.article-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Blog page */
.blog-page .page-title {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-content {
    padding: 1.5rem;
}

.article-content h2 {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.article-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Teacher panel */
.teacher-panel {
    max-width: 1200px;
    margin: 0 auto;
}

.panel-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.panel-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.place-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Admin panel */
.admin-panel .container {
    max-width: 100% !important;
    padding: 0 2rem;
}

.admin-panel .admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.admin-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 100%;
}

.admin-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.request-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.request-info h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.request-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Admin tables */
.admin-table-container {
    overflow-x: auto;
    margin-top: 1rem;
    width: 100%;
}

.admin-table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    table-layout: auto;
}

.admin-table thead {
    background: var(--primary-color);
    color: white;
}

.admin-table th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: bold;
    white-space: nowrap;
}

.admin-table th:first-child {
    padding-left: 1rem;
}

.admin-table th:last-child {
    padding-right: 1rem;
}

.admin-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    word-wrap: break-word;
    vertical-align: top;
}

.admin-table td:first-child {
    padding-left: 1rem;
}

.admin-table td:last-child {
    padding-right: 1rem;
}

.admin-table tbody tr:hover {
    background: var(--bg-color);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Szerokości kolumn dla lepszego rozłożenia */
.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
    width: 5%;
    min-width: 50px;
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
    width: 15%;
    min-width: 150px;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
    width: 20%;
    min-width: 200px;
}

.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
    width: 15%;
    min-width: 150px;
}

.admin-table th:nth-child(5),
.admin-table td:nth-child(5) {
    width: 10%;
    min-width: 100px;
}

.admin-table th:nth-child(6),
.admin-table td:nth-child(6) {
    width: 8%;
    min-width: 80px;
}

.admin-table th:nth-child(7),
.admin-table td:nth-child(7) {
    width: 8%;
    min-width: 80px;
}

.admin-table th:nth-child(8),
.admin-table td:nth-child(8) {
    width: 12%;
    min-width: 120px;
}

.admin-table th:nth-child(9),
.admin-table td:nth-child(9) {
    width: 15%;
    min-width: 200px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-right: 0.5rem;
}

.badge-admin {
    background: #ff9800;
    color: white;
}

.badge-active {
    background: var(--success-color);
    color: white;
}

.badge-inactive {
    background: #757575;
    color: white;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .panel-toggle {
        display: block;
    }
    
    .map-container {
        flex-direction: column;
        height: calc(100vh - 150px);
        min-height: 500px;
    }
    
    .places-panel {
        width: 100%;
        max-height: 50vh;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        display: none;
        flex-shrink: 0;
        background: var(--card-bg);
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }
    
    .places-panel.active {
        display: block;
    }
    
    .map {
        height: 100%;
        min-height: 400px;
        flex: 1;
    }
    
    .places-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .request-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-panel .container {
        padding: 0 1rem;
    }
    
    .admin-section {
        padding: 1rem;
    }
    
    .admin-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-table {
        font-size: 0.9rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    .admin-table th:first-child,
    .admin-table td:first-child {
        padding-left: 0.75rem;
    }
    
    .admin-table th:last-child,
    .admin-table td:last-child {
        padding-right: 0.75rem;
    }
}

/* Popup Leaflet */
.popup-content {
    text-align: center;
}

.popup-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.popup-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

/* SummerNote customization */
.note-editor {
    border: 2px solid var(--border-color);
    border-radius: 10px;
}

/* Loading states */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
}

/* Social share buttons */
.social-share {
    margin: 1.5rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.social-share h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-social {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    color: white !important;
    transition: transform 0.3s, opacity 0.3s;
}

.btn-social:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.btn-facebook {
    background: #3b5998;
}

.btn-twitter {
    background: #1da1f2;
}

.btn-linkedin {
    background: #0077b5;
}

.btn-copy {
    background: #757575;
    border: none;
    cursor: pointer;
}

/* Gallery in edit */
.existing-gallery {
    margin-bottom: 1.5rem;
}

.gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem;
    background: var(--bg-color);
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.gallery-item .btn {
    margin-top: 0.5rem;
    width: 100%;
}

/* YouTube video w artykułach */
.youtube-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 1.5rem 0;
    border-radius: 10px;
}

.youtube-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Notifications */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.no-articles {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.2rem;
}

