/* OSPanel Classic Theme - Motyw dla OSP */
:root {
    --osp-red: #c62828;
    --osp-red-dark: #8e0000;
    --osp-red-light: #ff5f52;
    --osp-black: #1a1a1a;
    --osp-gray: #333;
    --osp-gray-light: #f5f5f5;
    --osp-white: #ffffff;
    --osp-yellow: #ffc107;
    --osp-shadow: 0 2px 8px rgba(0,0,0,0.15);
    --osp-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--osp-gray);
    background: var(--osp-gray-light);
}

a {
    color: var(--osp-red);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--osp-red-dark);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === HEADER === */
.osp-header {
    background: linear-gradient(135deg, var(--osp-red) 0%, var(--osp-red-dark) 100%);
    color: var(--osp-white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--osp-shadow);
}

.osp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.osp-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.osp-logo img {
    height: 50px;
    width: auto;
}

.osp-logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.osp-logo h1 a {
    color: var(--osp-white);
}

/* === NAVIGATION === */
.osp-nav {
    display: flex;
    align-items: center;
}

.osp-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--osp-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

.osp-nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.osp-nav-menu a {
    display: block;
    padding: 10px 18px;
    color: var(--osp-white);
    font-weight: 500;
    border-radius: var(--osp-radius);
    transition: background 0.2s;
}

.osp-nav-menu a:hover,
.osp-nav-menu a.active {
    background: rgba(255,255,255,0.2);
}

/* Mobile nav */
@media (max-width: 768px) {
    .osp-nav-toggle {
        display: block;
    }

    .osp-nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--osp-red-dark);
        flex-direction: column;
        padding: 10px;
    }

    .osp-nav-menu.open {
        display: flex;
    }

    .osp-nav-menu a {
        padding: 15px 20px;
    }
}

/* === HERO SECTION === */
.osp-hero {
    background: linear-gradient(135deg, var(--osp-black) 0%, var(--osp-gray) 100%);
    color: var(--osp-white);
    padding: 80px 20px;
    text-align: center;
}

.osp-hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.osp-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .osp-hero {
        padding: 50px 20px;
    }
    .osp-hero h2 {
        font-size: 1.8rem;
    }
}

/* === MAIN CONTENT === */
.osp-main {
    padding: 40px 0;
    min-height: 60vh;
}

.osp-section {
    margin-bottom: 40px;
}

.osp-section-title {
    font-size: 1.8rem;
    color: var(--osp-black);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--osp-red);
    display: inline-block;
}

/* === NEWS GRID === */
.osp-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.osp-news-card {
    background: var(--osp-white);
    border-radius: var(--osp-radius);
    overflow: hidden;
    box-shadow: var(--osp-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.osp-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.osp-news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--osp-gray-light);
}

.osp-news-card-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--osp-red);
}

.osp-news-card-body {
    padding: 20px;
}

.osp-news-card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.osp-news-card-meta .category {
    background: var(--osp-red);
    color: var(--osp-white);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.osp-news-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--osp-black);
}

.osp-news-card h3 a {
    color: inherit;
}

.osp-news-card h3 a:hover {
    color: var(--osp-red);
}

.osp-news-card p {
    color: #555;
    font-size: 0.95rem;
}

.osp-btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--osp-red);
    color: var(--osp-white);
    border-radius: var(--osp-radius);
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.osp-btn:hover {
    background: var(--osp-red-dark);
    color: var(--osp-white);
}

.osp-btn-outline {
    background: transparent;
    border: 2px solid var(--osp-red);
    color: var(--osp-red);
}

.osp-btn-outline:hover {
    background: var(--osp-red);
    color: var(--osp-white);
}

/* === ARTICLE / PAGE === */
.osp-article {
    background: var(--osp-white);
    border-radius: var(--osp-radius);
    padding: 40px;
    box-shadow: var(--osp-shadow);
}

.osp-article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.osp-article-header h1 {
    font-size: 2rem;
    color: var(--osp-black);
    margin-bottom: 15px;
}

.osp-article-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.osp-article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--osp-radius);
    margin-bottom: 30px;
}

.osp-article-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.osp-article-content h2,
.osp-article-content h3,
.osp-article-content h4 {
    margin: 25px 0 15px;
    color: var(--osp-black);
}

.osp-article-content p {
    margin-bottom: 15px;
}

.osp-article-content ul,
.osp-article-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.osp-article-content img {
    border-radius: var(--osp-radius);
    margin: 20px 0;
}

.osp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--osp-red);
    font-weight: 500;
}

@media (max-width: 768px) {
    .osp-article {
        padding: 20px;
    }
    .osp-article-header h1 {
        font-size: 1.5rem;
    }
}

/* === CONTACT PAGE === */
.osp-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .osp-contact-grid {
        grid-template-columns: 1fr;
    }
}

.osp-contact-info {
    background: var(--osp-white);
    padding: 30px;
    border-radius: var(--osp-radius);
    box-shadow: var(--osp-shadow);
}

.osp-contact-info h2 {
    color: var(--osp-black);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.osp-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.osp-contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.osp-contact-icon {
    width: 45px;
    height: 45px;
    background: var(--osp-red);
    color: var(--osp-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.osp-contact-text strong {
    display: block;
    color: var(--osp-black);
    margin-bottom: 5px;
}

.osp-contact-text span,
.osp-contact-text a {
    color: #555;
}

.osp-social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.osp-social-link {
    width: 45px;
    height: 45px;
    background: var(--osp-gray-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--osp-gray);
    transition: all 0.2s;
}

.osp-social-link:hover {
    background: var(--osp-red);
    color: var(--osp-white);
}

.osp-map {
    background: var(--osp-white);
    border-radius: var(--osp-radius);
    overflow: hidden;
    box-shadow: var(--osp-shadow);
    height: 400px;
}

.osp-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* === FOOTER === */
.osp-footer {
    background: var(--osp-black);
    color: var(--osp-white);
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.osp-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.osp-footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--osp-yellow);
}

.osp-footer-section p,
.osp-footer-section a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.8;
}

.osp-footer-section a:hover {
    color: var(--osp-white);
}

.osp-footer-section ul {
    list-style: none;
}

.osp-footer-section ul li {
    margin-bottom: 10px;
}

.osp-footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.osp-footer-bottom a {
    color: var(--osp-yellow);
}

/* === LOADING === */
.osp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

.osp-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #eee;
    border-top-color: var(--osp-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === ERROR === */
.osp-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--osp-red);
}

.osp-error h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* === 404 === */
.osp-404 {
    text-align: center;
    padding: 100px 20px;
}

.osp-404 h1 {
    font-size: 6rem;
    color: var(--osp-red);
    margin-bottom: 20px;
}

.osp-404 p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

/* === EMERGENCY BANNER === */
.osp-emergency {
    background: var(--osp-yellow);
    color: var(--osp-black);
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
}

.osp-emergency a {
    color: var(--osp-red-dark);
    text-decoration: underline;
}

/* === GALLERY === */
.osp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.osp-gallery-album {
    display: block;
    background: var(--osp-white);
    border-radius: var(--osp-radius);
    overflow: hidden;
    box-shadow: var(--osp-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.osp-gallery-album:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.osp-gallery-album-cover {
    position: relative;
    height: 200px;
    background: var(--osp-gray-light);
}

.osp-gallery-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.osp-gallery-album-cover .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: var(--osp-red);
}

.osp-gallery-album-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: var(--osp-white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.osp-gallery-album-info {
    padding: 20px;
}

.osp-gallery-album-info h3 {
    font-size: 1.1rem;
    color: var(--osp-black);
    margin-bottom: 5px;
}

.osp-gallery-album-info .date {
    color: #666;
    font-size: 0.85rem;
}

.osp-section-desc {
    color: #666;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.osp-section-meta {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.osp-gallery-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.osp-gallery-image {
    position: relative;
    border-radius: var(--osp-radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: var(--osp-gray-light);
}

.osp-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.osp-gallery-image:hover img {
    transform: scale(1.05);
}

.osp-gallery-image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--osp-white);
    padding: 30px 15px 10px;
    font-size: 0.9rem;
}

/* Lightbox */
.osp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.osp-lightbox img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

.osp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--osp-white);
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
}

.osp-lightbox-prev,
.osp-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--osp-white);
    font-size: 2rem;
    padding: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.osp-lightbox-prev { left: 20px; }
.osp-lightbox-next { right: 20px; }

.osp-lightbox-prev:hover,
.osp-lightbox-next:hover {
    background: rgba(255,255,255,0.2);
}

.osp-lightbox-caption {
    color: var(--osp-white);
    margin-top: 20px;
    font-size: 1rem;
    text-align: center;
    max-width: 80%;
}

/* === BOARD / ZARZAD === */
.osp-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.osp-board-member {
    background: var(--osp-white);
    border-radius: var(--osp-radius);
    overflow: hidden;
    box-shadow: var(--osp-shadow);
    text-align: center;
    padding: 30px 25px;
}

.osp-board-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    background: var(--osp-gray-light);
}

.osp-board-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.osp-board-photo .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: var(--osp-red);
}

.osp-board-info h3 {
    font-size: 1.3rem;
    color: var(--osp-black);
    margin-bottom: 5px;
}

.osp-board-info .position {
    color: var(--osp-red);
    font-weight: 600;
    margin-bottom: 15px;
}

.osp-board-info .desc {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.osp-board-info .contact {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.osp-board-info .contact a {
    color: var(--osp-red);
}

/* === ARTICLE GALLERY === */
.osp-article-gallery {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.osp-article-gallery-title {
    font-size: 1.3rem;
    color: var(--osp-black);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.osp-article-gallery-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--osp-red);
    border-radius: 2px;
}

/* === UTILITIES === */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
