/* Podstawowe resetowanie i globalne style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Nowa, stonowana paleta Material You */
    --md-green-50: #e8f5e9;
    --md-green-100: #d0e7d1;
    --md-green-300: #a4d4a6;
    --md-green-500: #66bb6a;
    --md-green-700: #388e3c;
    --md-green-900: #1b5e20;
    --md-gray-50: #fafafa;
    --md-gray-100: #f5f5f5;
    --md-gray-300: #e0e0e0;
    --md-gray-500: #9e9e9e;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #424242;
    background-color: var(--md-gray-50);
    position: relative; /* Umożliwia pozycjonowanie 'przyklejonego' przycisku */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    color: var(--md-green-700);
}

p {
    margin-bottom: 10px;
}

.intro-paragraph {
    font-size: 18px;
    color: #666;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* Stylizacja Nagłówka */
header {
    background-color: var(--md-gray-50);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--md-green-900);
    text-transform: none;
    letter-spacing: 0;
}

.logo a img {
    height: 40px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    color: var(--md-gray-500);
    font-weight: 500;
    font-size: 17px;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--md-green-700);
}

/* Dodajemy klasę dla aktywnego linku w menu */
.main-nav ul li a.active {
    color: var(--md-green-900);
    font-weight: 700;
}

/* Stylizacja Sekcji Nagłówkowej (Hero Section) */
.hero-section {
    background: url('hero-webryk.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 150px 20px;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 56px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hero-section p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hero-buttons .button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-transform: none;
    margin: 0 10px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.button.primary {
    background-color: var(--md-green-500);
    color: #fff;
    border: none;
}

.button.primary:hover {
    background-color: var(--md-green-700);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.button.secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.button.secondary:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Rozwijana zawartość dla wszystkich sekcji */
.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.7s ease-out;
    will-change: max-height;
}

.toggle-checkbox:checked ~ .expandable-content {
    max-height: 4500px; /* Wartość duża, aby pomieścić zawartość */
}

.expand-button {
    margin: 20px auto 40px auto;
    position: relative;
    padding-right: 45px;
    cursor: pointer;
    display: block;
    width: fit-content;
}

.expand-button::after {
    content: '\25BC';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: transform 0.3s ease;
}

.toggle-checkbox:checked + .expand-button::after {
    content: '\25B2';
    transform: translateY(-50%) rotate(0deg);
}

/* Stylizacja Sekcji "O Projekcie w Pigułce" */
.about-section {
    padding: 80px 0;
    background-color: var(--md-gray-50);
    text-align: center;
}

.about-section h2 {
    font-size: 38px;
    margin-bottom: 20px;
}

.pills-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.pill-item {
    flex: 1;
    max-width: 350px;
    background-color: var(--white-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pill-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.1);
}

.pill-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.pill-item h3 {
    font-size: 24px;
    color: var(--md-green-700);
    margin-bottom: 15px;
}

.pill-item p {
    font-size: 16px;
    color: #555;
}

/* Stylizacja Sekcji "Kim są Webryki?" */
.webryki-story-section {
    padding: 80px 0;
    background-color: var(--md-gray-100);
}

.webryki-story-section h2 {
    font-size: 38px;
    text-align: center;
    margin-bottom: 20px;
}

.story-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.story-text {
    flex: 2;
    min-width: 300px;
}

.story-text h3 {
    font-size: 28px;
    color: var(--md-green-900);
}

.story-text p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 15px;
}

.story-image {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.story-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.webryki-characteristics {
    text-align: center;
    margin-top: 40px;
}

.webryki-characteristics h3 {
    font-size: 28px;
    color: var(--md-green-900);
    margin-bottom: 30px;
}

.webryki-characteristics ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 0;
}

.webryki-characteristics li {
    background-color: var(--white-bg);
    border-radius: 20px;
    padding: 20px 30px;
    flex-basis: calc(33% - 40px);
    max-width: 350px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #555;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.webryki-characteristics li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.webryki-characteristics li img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

/* Stylizacja Sekcji "Co zyskamy dzięki Webrykom?" */
.benefits-section {
    padding: 80px 0;
    background-color: var(--white-bg);
    text-align: center;
}

.benefits-section h2 {
    font-size: 38px;
    margin-bottom: 20px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.benefit-item {
    background-color: var(--md-gray-50);
    border: none;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.benefit-item:hover {
    transform: translateY(-7px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.benefit-item img {
    width: 70px;
    height: 70px;
    margin-bottom: 25px;
}

.benefit-item h3 {
    font-size: 26px;
    color: var(--md-green-700);
    margin-bottom: 15px;
}

.benefit-item p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.map-preview {
    margin-top: 40px;
    padding: 30px;
    background-color: var(--md-gray-100);
    border-radius: 20px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.map-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.map-preview p {
    font-style: italic;
    font-size: 14px;
    color: #888;
    margin-top: 15px;
}

/* Stylizacja Sekcji "Kosztorys i Realizacja" (Wersja CSS-Only) */
.cost-section {
    padding: 80px 0;
    background-color: var(--md-gray-100);
    text-align: center;
}

.cost-section h2 {
    font-size: 38px;
    margin-bottom: 20px;
}

/* Styl dla ukrywanej sekcji kosztorysu (CSS-only) */
.cost-details-css-only {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.7s ease-out;
    will-change: max-height;
}

/* Kiedy checkbox jest ZAZNACZONY, rozwiń sekcję */
#toggleCostCheckbox:checked ~ .cost-details-css-only {
    max-height: 2500px;
}

.cost-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.cost-item {
    background-color: var(--white-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.cost-item h3 {
    font-size: 24px;
    color: var(--md-green-700);
    margin-bottom: 15px;
}

.cost-item h4 {
    font-size: 20px;
    color: var(--md-green-900);
    margin-top: 20px;
    margin-bottom: 10px;
}

.cost-item p, .cost-item ul {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.cost-item ul {
    margin-left: 20px;
    list-style: disc;
}

.total-cost-summary {
    background-color: var(--md-green-50);
    border-radius: 20px;
    padding: 30px;
    margin-top: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.total-cost-summary h3 {
    font-size: 30px;
    color: var(--md-green-900);
    margin-bottom: 20px;
}

.total-cost-summary p {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.highlight-cost {
    color: #FF5722;
    font-weight: 700;
}

.button.download-pdf {
    background-color: var(--md-green-700);
    color: #fff;
    margin-top: 40px;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    text-transform: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.button.download-pdf:hover {
    background-color: var(--md-green-900);
    transform: translateY(-2px);
}


/* Stylizacja Sekcji "Jak Głosować?" */
.vote-section {
    padding: 80px 0;
    background-color: var(--white-bg);
    text-align: center;
}

.vote-section h2 {
    font-size: 38px;
    margin-bottom: 20px;
}

.vote-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.step-item {
    background-color: var(--md-gray-50);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    text-align: left;
}

.step-number {
    font-size: 50px;
    font-weight: 700;
    color: var(--md-green-500);
    margin-bottom: 15px;
    text-align: center;
}

.step-item h3 {
    font-size: 26px;
    color: var(--md-green-700);
    margin-bottom: 15px;
}

.step-item p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

.step-item strong {
    color: #333;
}

.button.outline {
    background-color: transparent;
    color: var(--md-green-700);
    border: 2px solid var(--md-green-700);
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.button.outline:hover {
    background-color: var(--md-green-700);
    color: #fff;
}

.vote-important-info {
    background-color: var(--md-green-50);
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.vote-important-info h3 {
    font-size: 28px;
    color: var(--md-green-900);
    margin-bottom: 15px;
}

.vote-important-info p {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
}

.vote-important-info p strong {
    color: #FF5722;
}

.call-to-action-final {
    font-size: 20px;
    font-weight: 700;
    color: var(--md-green-700);
    margin-top: 20px;
}

/* Stylizacja Stopki */
footer {
    background-color: var(--md-green-700);
    color: #fff;
    padding: 40px 0;
    text-align: center;
    font-size: 15px;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

footer p {
    margin-bottom: 0;
}

.social-links {
    margin-top: 10px;
}

.social-links a {
    display: inline-block;
    margin: 0 10px;
}

.social-links img {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.social-links img:hover {
    transform: scale(1.1);
}

/* "Przyklejony" przycisk "Głosuj!" */
.sticky-vote-button {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 999;
    padding: 15px 25px;
    font-size: 1.2em;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite; /* Dodatkowa animacja pulsowania */
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
}

/* Responsywność - Media Queries */

/* Dla ekranów o szerokości do 768px (tablety) */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 44px;
    }

    .hero-section p {
        font-size: 18px;
    }
    
    .sticky-vote-button {
        right: 20px;
        bottom: 20px;
        padding: 12px 20px;
        font-size: 1em;
    }

    .about-section h2,
    .webryki-story-section h2,
    .benefits-section h2,
    .cost-section h2,
    .vote-section h2 {
        font-size: 32px;
    }

    .pills-grid {
        gap: 20px;
    }

    .pill-item {
        max-width: 300px;
    }

    .story-content {
        flex-direction: column;
        text-align: center;
    }

    .story-text, .story-image {
        min-width: unset;
        flex: auto;
    }

    .webryki-characteristics li {
        flex-basis: calc(50% - 30px);
    }

    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .cost-breakdown {
        grid-template-columns: 1fr;
    }

    .vote-steps {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Dla ekranów o szerokości do 480px (smartfony) */
@media (max-width: 480px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        flex-direction: column;
        margin-top: 15px;
    }

    .main-nav ul li {
        margin: 5px 0;
    }

    .hero-section {
        padding: 100px 20px;
        min-height: 500px;
    }

    .hero-section h1 {
        font-size: 34px;
    }

    .hero-section p {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .button {
        margin: 10px 0;
        width: 100%;
        max-width: 250px;
    }

    .sticky-vote-button {
        padding: 10px 18px;
        font-size: 1em;
    }

    .about-section h2,
    .webryki-story-section h2,
    .benefits-section h2,
    .cost-section h2,
    .vote-section h2 {
        font-size: 28px;
    }

    .pills-grid {
        flex-direction: column;
    }

    .pill-item {
        max-width: 100%;
    }

    .webryki-characteristics li {
        flex-basis: 100%;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .benefits-section .section-description {
        font-size: 16px;
    }

    .vote-steps {
        grid-template-columns: 1fr;
    }

    .vote-important-info p {
        font-size: 16px;
    }

    .call-to-action-final {
        font-size: 18px;
    }

    footer {
        padding: 30px 0;
    }
}