:root {
    --primary: #81bc60;
    --secondary: #bfccba;
    --dark: #131a11;
    --light: #f4ebd0;
    --text-dark: #2a3327;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: 'Times New Roman', Times, serif;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--light);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    color: var(--text-dark);
}

body.no-scroll {
    overflow: hidden;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 0;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--light);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 200px;
}

.loader-ring, .loader-ring-inner {
    display: none;
}

.loader-logo {
    width: 150px;
    height: 150px;
    border: 4px double var(--dark);
    padding: 15px;
    border-radius: 0;
    object-fit: cover;
    z-index: 2;
    animation: pulse-logo 2s ease-in-out infinite;
    filter: grayscale(100%) contrast(1.2) sepia(0.3);
}

.loader-wrapper::after {
    content: 'Trwa składanie numeru...';
    position: absolute;
    bottom: -60px;
    width: 250px;
    text-align: center;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse-logo 2s ease-in-out infinite;
}

@keyframes pulse-logo {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes spin-ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-ring-reverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

.nav-brand {
    font-weight: bold;
    font-family: 'Times New Roman', Times, serif;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background: var(--dark);
    z-index: 1000;
    box-sizing: border-box;
    border-bottom: 4px double var(--primary);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    color: var(--light);
    cursor: pointer;
    z-index: 1000;
    margin-left: auto;
    margin-right: 15px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--light);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-logo {
    width: 50px;
    height: 50px;
    border-radius: 0;
    object-fit: cover;
    border: 2px solid var(--primary);
    transition: transform 0.3s ease;
    filter: sepia(0.3) contrast(1.1);
}

.nav-brand:hover .nav-logo {
    transform: rotate(5deg) scale(1.1);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: bold;
    font-family: 'Times New Roman', Times, serif;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: var(--light);
    color: var(--dark);
    border: 1px solid var(--dark);
}

.hero {
    background: linear-gradient(rgba(19, 26, 17, 0.9), rgba(19, 26, 17, 0.95)), url('../img/banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--light);
    padding: 160px 20px 80px 20px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-bottom: 6px double var(--dark);
}

.caster-placeholder {
    background: transparent;
    border: 2px solid var(--primary);
    padding: 40px;
    width: 100%;
    max-width: 600px;
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-family: 'Times New Roman', Times, serif;
    text-transform: uppercase;
}

main {
    padding: 50px 20px;
    max-width: 1200px;
    margin: auto;
}

.weather-section {
    background: transparent;
    border: 4px double var(--dark);
    padding: 40px;
    color: var(--dark);
    text-align: center;
    margin-bottom: 60px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.weather-section::before {
    content: 'PROGNOZA POGODY';
    display: block;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 2px solid var(--dark);
    margin-bottom: 30px;
    padding-bottom: 10px;
    color: var(--dark);
}

.weather-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    color: var(--dark) !important;
    text-shadow: none !important;
}

.weather-icon.fa-sun,
.weather-icon.fa-cloud-sun,
.weather-icon.fa-cloud,
.weather-icon.fa-cloud-rain,
.weather-icon.fa-snowflake,
.weather-icon.fa-bolt {
    color: var(--dark) !important;
    text-shadow: none !important;
}

.nav-weather-icon.fa-sun { color: #f1c40f; }
.nav-weather-icon.fa-cloud-sun { color: #e67e22; }
.nav-weather-icon.fa-cloud { color: #bdc3c7; }
.nav-weather-icon.fa-cloud-rain { color: #3498db; }
.nav-weather-icon.fa-snowflake { color: #74b9ff; }
.nav-weather-icon.fa-bolt { color: #9b59b6; }

.weather-temp {
    font-size: 3.5rem;
    font-weight: bold;
    margin: 10px 0;
    font-family: 'Times New Roman', Times, serif;
    color: var(--dark);
}

.weather-desc {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.weather-powered {
    font-size: 0.9rem;
    color: var(--dark);
    font-style: italic;
    font-family: 'Times New Roman', Times, serif;
    border-top: 1px solid var(--dark);
    padding-top: 10px;
    display: inline-block;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.cat-btn {
    background: transparent;
    color: var(--dark);
    border: 1px solid var(--dark);
    padding: 10px 20px;
    border-radius: 0;
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--dark);
    color: var(--light);
    border-color: var(--dark);
    transform: none;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
    font-family: 'Times New Roman', Times, serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 4px double var(--dark);
}

.section-title::after {
    display: none;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.article-card {
    background: transparent;
    border: 1px solid var(--dark);
    border-radius: 0;
    box-shadow: none;
    transition: all 0.4s ease;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 6px 6px 0px var(--dark);
}

.article-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--secondary);
    filter: sepia(0.3) contrast(1.1);
    border-bottom: 1px solid var(--dark);
}

.article-content {
    padding: 25px;
    flex-grow: 1;
}

.article-tag {
    background: transparent;
    color: var(--dark);
    border: 1px solid var(--dark);
    padding: 4px 8px;
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: inline-block;
}

.article-card h3 {
    margin: 0 0 15px 0;
    color: var(--dark);
    font-size: 1.4rem;
    line-height: 1.3;
    font-weight: bold;
}

.article-card p {
    color: var(--dark);
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
}

.multimedia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.media-box {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    height: 250px;
    background: var(--dark);
    border: 1px solid var(--dark);
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.media-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.4s ease, transform 0.4s ease;
    filter: sepia(0.3) contrast(1.1);
}

.media-box:hover img {
    opacity: 0.3;
    transform: scale(1.05);
}

.media-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--light);
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    font-family: 'Times New Roman', Times, serif;
}

.media-content i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.media-box:hover .media-content i {
    transform: scale(1.1);
}

.media-content h3 {
    margin: 0;
    font-size: 1.3rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.partners {
    text-align: center;
    padding: 40px 20px;
    background: transparent;
    border: 2px solid var(--dark);
    border-radius: 0;
    box-shadow: 8px 8px 0px var(--dark);
    margin-bottom: 80px;
}

.partners h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 30px;
    font-family: 'Times New Roman', Times, serif;
    text-transform: uppercase;
    border-bottom: 2px solid var(--dark);
    display: inline-block;
    padding-bottom: 10px;
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    align-items: center;
}

.partner-logo {
    width: 120px;
    height: 120px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--dark);
    overflow: hidden;
    padding: 5px;
}

.partner-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%) contrast(1.2);
    transition: filter 0.3s ease;
}

.partner-logo:hover img {
    filter: sepia(0.3) contrast(1.1);
}

.partner-logo:hover {
    transform: translateY(-5px);
    box-shadow: 4px 4px 0px var(--dark);
}

.tech-partner {
    background: transparent;
    border-radius: 0;
    padding: 50px;
    display: flex;
    align-items: center;
    border: 2px solid var(--dark);
    box-shadow: 8px 8px 0px var(--dark);
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.tech-partner-logo {
    max-width: 280px;
    max-height: 160px;
    width: 100%;
    object-fit: contain;
    margin-left: 50px;
    position: relative;
    z-index: 2;
    filter: sepia(0.3) contrast(1.1);
}

.tech-partner:hover {
    transform: translateY(-5px);
}

.tech-partner-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.tech-partner-icon {
    font-size: 8rem;
    color: var(--dark);
    opacity: 0.05;
    position: absolute;
    right: 40px;
    bottom: -20px;
    transform: rotate(-10deg);
    z-index: 1;
    pointer-events: none;
}

.tech-partner-content h3 {
    font-size: 2.2rem;
    color: var(--dark);
    margin: 0 0 15px 0;
    font-family: 'Times New Roman', Times, serif;
    text-transform: uppercase;
}

.tech-partner-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--dark);
    margin-bottom: 35px;
    max-width: 800px;
    text-align: justify;
}

.tech-partner-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--dark);
    padding: 15px 35px;
    border-radius: 0;
    border: 1px solid var(--dark);
    text-decoration: none;
    font-weight: bold;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.05rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.tech-partner-btn:hover {
    background: var(--dark);
    color: var(--light);
}

footer {
    background-color: var(--dark);
    color: var(--secondary);
    text-align: center;
    padding: 40px;
    margin-top: 50px;
    border-top: 6px double var(--primary);
    font-family: 'Times New Roman', Times, serif;
}

.footer-socials {
    margin-bottom: 20px;
}

.footer-socials a {
    color: var(--light);
    background: transparent;
    border: 1px solid var(--light);
    width: 50px;
    height: 50px;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    color: var(--dark);
    background: var(--light);
}

.copyright {
    margin: 20px 0;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--secondary);
}

.copyright a,
.footer-socials a {
    text-decoration: none !important;
    font-weight: bold;
    transition: color 0.3s, background 0.3s;
}

.copyright a {
    color: var(--light);
}

.copyright a:hover {
    color: var(--primary);
}

.copyright i {
    text-decoration: none !important;
}

.author-highlight {
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 1px;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.admin-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.6;
    transition: opacity 0.3s;
    margin-top: 20px;
    display: inline-block;
    border-bottom: 1px solid transparent;
}

.admin-link:hover {
    opacity: 1;
    border-bottom: 1px solid var(--primary);
}

.subpage-hero-title {
    font-size: 3.5rem;
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 40px !important;
    margin-bottom: 40px !important;
    position: relative;
    z-index: 2;
    color: var(--light);
    border-bottom: 4px double var(--light);
    display: inline-block;
    padding-bottom: 15px;
    text-shadow: 2px 2px 0px var(--dark);
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    main {
        padding: 20px 15px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .hero {
        padding: 100px 15px 30px 15px !important;
    }

    .hero>div {
        padding: 15px !important;
    }

    .weather-section {
        padding: 20px;
        margin-bottom: 50px;
        box-shadow: none;
    }

    .weather-temp {
        font-size: 2.5rem;
    }

    .category-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .cat-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .articles-grid,
    .multimedia-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 50px;
    }

    .tech-partner {
        padding: 30px 20px;
        margin-bottom: 50px;
        flex-direction: column;
        text-align: center;
        box-shadow: 4px 4px 0px var(--dark);
    }

    .tech-partner-logo {
        margin-left: 0;
        margin-top: 30px;
        max-width: 180px;
    }

    .tech-partner-icon {
        font-size: 8rem;
        opacity: 0.03;
        right: 50%;
        transform: translateX(50%);
    }

    .partners {
        padding: 20px;
        margin-bottom: 50px;
        box-shadow: 4px 4px 0px var(--dark);
    }

    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    footer {
        padding: 30px 15px;
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-socials {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .partners-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .navbar {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding-top: 220px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 140px !important;
        padding-bottom: 40px !important;
    }

    .navbar {
        padding: 15px;
    }

    .tech-partner {
        padding: 30px;
    }

    .tech-partner-logo {
        margin-left: 0;
        margin-top: 40px;
        max-width: 200px;
    }

    .subpage-hero-title {
        font-size: 2rem;
    }

}

@media (max-width: 992px) {
    .navbar {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px !important;
    }
    
    .hamburger {
        display: block !important;
        margin: 0 !important;
        z-index: 1000;
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 998;
        margin: 0;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        transform: scale(0.95);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }

    .nav-links a {
        margin: 15px 0;
        font-size: 2rem;
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border: none;
    }

    .nav-links a i {
        color: var(--primary);
        margin-right: 12px;
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.active a:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active a:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active a:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active a:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active a:nth-child(5) { transition-delay: 0.5s; }

    .nav-weather {
        display: none !important;
    }
}