/* ============================================================================
   PEPDRAW COMPONENTS - SHARED ACROSS ALL PAGES
   Header, Footer, Navigation, Cookie Banner, Buttons, Badges
   ============================================================================ */

/* ===== NAVIGATION BAR ===== */
.nav {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 4rem;
    display: block;
}

.nav-links {
    display: flex;
    gap: var(--spacing-2xl);
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-base);
    font-size: var(--font-size-md);
}

.nav-links a:hover {
    color: var(--primary-blue);
}

/* ===== HERO SECTION (Landing/Marketing Pages) ===== */
.hero {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    padding: var(--spacing-4xl) var(--spacing-lg) var(--spacing-3xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content img {
    max-height: 10rem;
    margin-bottom: var(--spacing-lg);
}

.hero h1 {
    font-size: var(--font-size-6xl);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-tight);
}

.hero-subtitle {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-2xl);
    opacity: 0.95;
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-snug);
}

/* ===== HEADER (Content/Documentation Pages) ===== */
.header {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header img,
#header-logo {
    max-height: 6rem;
    display: block;
    margin: 0 auto var(--spacing-md);
}

.header h1 {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-tight);
}

.header p {
    font-size: var(--font-size-xl);
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: var(--line-height-snug);
}

/* ===== FOOTER ===== */
.footer {
    padding: var(--spacing-3xl) var(--spacing-lg);
    text-align: center;
    border-top: 1px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.footer p {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-base);
    font-size: var(--font-size-sm);
}

.footer-links a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.footer-links span {
    color: var(--border-medium);
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    font-size: var(--font-size-sm);
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* CTA Button (Hero/Landing Pages) */
.cta-button {
    display: inline-block;
    background: var(--bg-primary);
    color: var(--primary-blue);
    padding: var(--spacing-md) var(--spacing-3xl);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all var(--transition-slow);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin-top: var(--spacing-lg);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--text-inverse);
    padding: 0.375rem var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== COOKIE BANNER ===== */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: var(--spacing-lg);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: var(--z-modal);
    display: none;
    animation: slideUp var(--transition-slower) ease-out;
    border-top: 1px solid var(--border-light);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#cookie-banner.show {
    display: block;
}

.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.cookie-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.cookie-content {
    flex: 1;
    min-width: 300px;
}

.cookie-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
}

.cookie-text {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    opacity: 0.95;
}

.cookie-text a {
    color: var(--primary-blue);
    text-decoration: underline;
    font-weight: var(--font-weight-medium);
}

.cookie-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-base);
}

.cookie-btn-accept {
    background: var(--primary-blue);
    color: var(--text-inverse);
}

.cookie-btn-accept:hover {
    background: var(--primary-blue-dark);
}

.cookie-btn-settings {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.cookie-btn-settings:hover {
    border-color: var(--primary-blue);
}

.cookie-btn-reject {
    background: transparent;
    color: var(--text-secondary);
}

.cookie-btn-reject:hover {
    color: var(--text-primary);
}

/* ===== COOKIE SETTINGS MODAL ===== */
#cookie-settings-modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal-backdrop);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

#cookie-settings-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-2xl);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-2xl);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    transition: color var(--transition-base);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
}

.cookie-category {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.category-title {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
}

.category-description {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition-slower);
    border-radius: var(--radius-full);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-slower);
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-blue);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: var(--font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-xl);
    }

    .header h1 {
        font-size: var(--font-size-3xl);
    }

    .header p {
        font-size: var(--font-size-md);
    }

    .nav-links {
        gap: var(--spacing-md);
    }

    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .footer-links span {
        display: none;
    }
}
