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

:root {
    --pastel-pink: #FFE5E5;
    --pastel-green: #E8F5E9;
    --pastel-beige: #FFF8E1;
    --text-dark: #2C3E50;
    --text-medium: #546E7A;
    --accent-pink: #F8BBD0;
    --accent-green: #A5D6A7;
    --page-gutter: clamp(1.25rem, 5vw, 2.5rem);
    --content-max: 860px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--pastel-pink) 0%, var(--pastel-beige) 50%, var(--pastel-green) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: calc(var(--content-max) + 4rem);
    margin: 0 auto;
    padding: 0 var(--page-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-dark);
    background: var(--pastel-pink);
}

.legal-main {
    max-width: var(--content-max);
    width: 100%;
    margin: 2.5rem auto 3.5rem;
    padding: 0 var(--page-gutter);
}

.legal-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.legal-card h1 {
    font-size: clamp(1.45rem, 4vw, 1.75rem);
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    line-height: 1.35;
}

.legal-updated {
    font-size: 0.85rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

.legal-card h2 {
    font-size: 1.15rem;
    margin: 2rem 0 0.75rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.legal-card h3 {
    font-size: 1rem;
    margin: 1.25rem 0 0.5rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.legal-card p,
.legal-card li {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.legal-card ul,
.legal-card ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-card a {
    color: var(--text-dark);
    font-weight: 500;
    overflow-wrap: break-word;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.contact-box {
    background: var(--pastel-green);
    border-radius: 16px;
    padding: 1.35rem 1.25rem;
}

.contact-box h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.contact-box p {
    margin: 0;
    font-size: 0.9rem;
}

.btn-back {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-green));
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.btn-back:hover {
    transform: translateY(-2px);
}

.source-list {
    list-style: none;
    padding: 0;
}

.source-list li {
    margin-bottom: 0.75rem;
}

.source-list a {
    display: block;
    padding: 0.85rem 1.15rem;
    background: var(--pastel-beige);
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.source-list a:hover {
    background: var(--pastel-pink);
}

footer {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    padding: 2.5rem var(--page-gutter) calc(2.5rem + env(safe-area-inset-bottom));
    text-align: center;
    color: var(--text-medium);
}

footer > p,
footer > ul,
.footer-legal-links {
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    margin: 1rem auto;
    padding: 0 0.5rem;
    list-style: none;
}

.footer-legal-links a {
    color: var(--text-medium);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
}

.footer-legal-links a:hover {
    color: var(--text-dark);
}

.footer-support {
    font-size: 0.85rem;
    margin-top: 0.75rem;
    line-height: 1.65;
    padding: 0 0.5rem;
    overflow-wrap: break-word;
}

.footer-copyright {
    font-size: 0.85rem;
    margin-top: 1rem;
    color: #90A4AE;
    padding: 0 0.5rem;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
    }

    .legal-main {
        margin-top: 1.75rem;
        margin-bottom: 2.5rem;
    }

    .legal-card {
        border-radius: 16px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .legal-card ul,
    .legal-card ol {
        padding-left: 1.25rem;
    }
}

/* Blog listing */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.blog-card {
    background: var(--pastel-beige);
    border-radius: 16px;
    padding: 1.35rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: block;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.blog-card h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: var(--text-dark);
}

.blog-card p {
    font-size: 0.88rem;
    margin: 0 0 0.75rem;
    color: var(--text-medium);
}

.blog-meta {
    font-size: 0.78rem;
    color: #90A4AE;
}

.article-lead {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.footer-disclaimer {
    font-size: 0.82rem;
    line-height: 1.6;
    max-width: 42rem;
    margin: 0.75rem auto 0;
    padding: 0 0.5rem;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(248, 187, 208, 0.6);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
    padding: 1rem var(--page-gutter) calc(1rem + env(safe-area-inset-bottom));
    transform: translateY(110%);
    transition: transform 0.35s ease;
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-banner p {
    flex: 1 1 280px;
    font-size: 0.88rem;
    color: var(--text-medium);
    margin: 0;
}

.cookie-banner p a {
    color: var(--text-dark);
    font-weight: 500;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cookie-banner-actions button {
    border: none;
    border-radius: 20px;
    padding: 0.6rem 1.1rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-green));
    color: var(--text-dark);
}

.cookie-btn-reject {
    background: #fff;
    color: var(--text-medium);
    border: 2px solid rgba(248, 187, 208, 0.5) !important;
}

.cookie-btn-settings {
    background: var(--pastel-green);
    color: var(--text-dark);
}

.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 62, 80, 0.45);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.cookie-modal {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.cookie-modal h3 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
}

.cookie-modal p {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 1rem;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.9rem;
}

.cookie-modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.cookie-modal-actions button {
    flex: 1;
    min-width: 120px;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 20px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

.cookie-save-btn {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-green));
    color: var(--text-dark);
}

.cookie-close-btn {
    background: var(--pastel-beige);
    color: var(--text-medium);
}

.form-error-banner {
    display: none;
    background: #ffebee;
    color: #c62828;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.form-error-banner.visible {
    display: block;
}
