/* ========================================
   TamRank Global CSS
   Styles loaded on every page
   ======================================== */

/* ========================================
   Inline SVG Icon System
   ======================================== */

.tr-icon {
    display: inline-block;
    vertical-align: -0.125em;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.tr-icon-spin {
    animation: tr-spin 1s linear infinite;
}

@keyframes tr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   Hide WooCommerce Add-to-Cart Notices
   ======================================== */

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info {
    display: none !important;
}

/* ========================================
   Reading Progress Bar
   ======================================== */

.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 99999;
    pointer-events: none;
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--tr-color-primary);
    transition: width 0.15s ease-out;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

/* ========================================
   Reset & Base Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--tr-font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--tr-color-slate-700);
    background: var(--tr-color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ========================================
   Container & Layout
   ======================================== */

.container {
    max-width: var(--tr-container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--tr-color-slate-900);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--tr-color-primary) 0%, var(--tr-color-info) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--tr-radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--tr-color-primary);
    color: var(--tr-color-white);
    box-shadow: var(--tr-shadow-primary-hover);
}

.btn-primary:hover {
    background: var(--tr-color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--tr-shadow-primary-hover);
}

.btn-outline {
    background: transparent;
    color: var(--tr-color-slate-900);
    border: 2px solid var(--tr-color-slate-300);
}

.btn-outline:hover {
    border-color: var(--tr-color-primary);
    color: var(--tr-color-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--tr-color-slate-700);
}

.btn-ghost:hover {
    color: var(--tr-color-primary);
}

.btn-white {
    background: var(--tr-color-white);
    color: var(--tr-color-primary);
}

.btn-white:hover {
    background: var(--tr-color-base);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* ========================================
   Header & Navigation
   ======================================== */

.nav-container {
    background: rgba(236, 235, 228, 0.6);
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: var(--tr-container-max);
    z-index: 99999;
    padding: 18px 32px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Aanpassing voor WordPress admin bar */
.admin-bar .nav-container {
    top: 42px;
}

@media screen and (max-width: 782px) {
    .admin-bar .nav-container {
        top: 56px;
    }
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.logo-icon {
    height: 36px;
    width: 36px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--tr-color-slate-900);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--tr-color-slate-900);
    font-weight: 700;
    transition: color 0.2s;
}

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

/* Header CTA Group - Dynamic CTA */
.header-cta-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-cta-secondary.tr-btn {
    font-size: 14px;
    height: auto;
    padding: 0;
}

.header-cta-secondary.tr-btn:hover {
    background: transparent;
    color: var(--tr-color-primary);
}

/* Credits CTA - uses standard primary emerald styling */

/* Language Switcher */
.language-switcher {
    position: relative;
    margin-right: 8px;
}

.language-switcher__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--tr-color-base);
    border: 1px solid var(--tr-color-slate-300);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--tr-color-slate-700);
    transition: all 0.2s ease;
}

.language-switcher__toggle:hover {
    background: var(--tr-color-white);
    border-color: var(--tr-color-primary);
}

.language-switcher__flag {
    font-size: 16px;
    line-height: 1;
}

.language-switcher__code {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.language-switcher__arrow {
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.language-switcher__toggle[aria-expanded="true"] .language-switcher__arrow {
    transform: rotate(180deg);
}

.language-switcher__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-300);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.language-switcher__toggle[aria-expanded="true"] + .language-switcher__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-switcher__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--tr-color-slate-700);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.language-switcher__option:hover {
    background: var(--tr-color-base);
}

.language-switcher__option.is-active {
    background: var(--tr-color-primary-light);
    color: var(--tr-color-primary);
    font-weight: 600;
}

.language-switcher__option .language-switcher__flag {
    font-size: 18px;
}

.language-switcher__name {
    flex: 1;
}

.language-switcher__check {
    color: var(--tr-color-primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 24px;
    background: var(--tr-color-slate-700);
    display: block;
    transition: all 0.3s ease;
}

/* ========================================
   Section Headers
   ======================================== */

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--tr-color-primary-light);
    color: var(--tr-color-primary);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--tr-color-slate-500);
}

/* ========================================
   Responsive - Mobile Navigation
   ======================================== */

@media (max-width: 768px) {
    .nav-container {
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        padding: 16px 20px;
        border-radius: 20px;
    }

    /* Match the floating header pill's 20px inset so section content aligns with it */
    .container {
        padding: 0 20px;
    }

    .nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }

    .logo {
        flex: 1;
    }

    .menu-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #fff;
        padding: 24px;
        gap: 20px;
        box-shadow: 0 12px 24px rgba(0,0,0,0.08);
        display: none;
        z-index: 998;
        text-align: center;
    }



    .language-switcher {
        margin-right: 12px;
    }

    .language-switcher__toggle {
        padding: 6px 10px;
    }

    .language-switcher__code {
        display: none;
    }

    .language-switcher__dropdown {
        right: -20px;
        min-width: 160px;
    }

    .header-cta-group {
        display: none;
    }
}

/* ========================================
   Mobile Overlay - Playful Bubbles Style
   ======================================== */

.mobile-overlay {
    position: fixed;
    top: 20px;
    bottom: 20px;
    left: 5%;
    right: 5%;
    background: var(--tr-color-white);
    z-index: 999999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.mobile-overlay.active {
    display: flex;
}


/* Overlay Content */
.overlay-content {
    position: relative;
    z-index: 1;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    text-align: left;
}

/* Header */
.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.overlay-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.overlay-logo svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.overlay-logo span {
    font-weight: 700;
    font-size: 18px;
    color: var(--tr-color-slate-900);
}


.overlay-close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--tr-color-white);
    border: 2px solid var(--tr-color-slate-200);
    font-size: 26px;
    color: var(--tr-color-slate-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-weight: 300;
    box-shadow: var(--tr-shadow-sm);
}

.overlay-close:hover {
    background: var(--tr-color-slate-100);
    border-color: var(--tr-color-slate-300);
    color: var(--tr-color-slate-900);
}

/* Section Labels */
.overlay-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--tr-color-slate-400);
    margin-bottom: 12px;
}

/* Navigation Links */
.overlay-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: auto;
}

.overlay-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--tr-radius-lg);
    text-decoration: none;
    transition: all 0.2s;
    color: var(--tr-color-slate-700);
}

.overlay-link:hover {
    background: var(--tr-color-base);
    color: var(--tr-color-slate-900);
}

.overlay-link:hover svg {
    color: var(--tr-color-primary);
}

.overlay-link svg {
    color: var(--tr-color-slate-400);
    flex-shrink: 0;
    transition: color 0.2s;
}

.overlay-link span {
    font-weight: 600;
    font-size: 16px;
}

/* CTA Section */
.overlay-cta {
    background: linear-gradient(135deg, var(--tr-color-primary) 0%, var(--tr-color-primary-hover) 100%);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.overlay-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    margin-bottom: 12px;
}

.overlay-cta-btn {
    display: inline-block;
    background: var(--tr-color-white);
    color: var(--tr-color-primary);
    padding: 12px 28px;
    border-radius: var(--tr-radius-md);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.overlay-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Overlay Credits CTA - Gold/Amber styling */
.overlay-cta-credits {
    background: linear-gradient(135deg, var(--tr-color-warning) 0%, var(--tr-color-warning-hover) 100%);
    color: var(--tr-color-white);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.overlay-cta-credits:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.overlay-cta-secondary {
    display: block;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    text-decoration: underline;
    transition: color 0.2s;
}

.overlay-cta-secondary:hover {
    color: var(--tr-color-white);
}

/* Language Selector in Overlay */
.overlay-language {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.overlay-language-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.overlay-language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--tr-color-slate-100);
    border-radius: 12px;
    text-decoration: none;
    color: var(--tr-color-slate-700);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.overlay-language-option:hover {
    background: var(--tr-color-slate-200);
}

.overlay-language-option.is-active {
    background: var(--tr-color-primary-light);
    color: var(--tr-color-primary);
    font-weight: 600;
}

.overlay-language-flag {
    font-size: 20px;
    line-height: 1;
}

.overlay-language-name {
    flex: 1;
}

/* Social Links */
.overlay-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.overlay-social a {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--tr-color-slate-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tr-color-slate-500);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s;
}

.overlay-social a:hover {
    background: var(--tr-color-primary);
    color: var(--tr-color-white);
    transform: translateY(-2px);
}

/* Hide overlay on desktop */
@media (min-width: 769px) {
    .mobile-overlay {
        display: none !important;
    }
}

/* ========================================
   Responsive - General
   ======================================== */

@media (max-width: 768px) {
    :root {
        --tr-spacing-section: var(--tr-spacing-section-mobile);
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--tr-color-white);
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.25rem;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }
}

@media (max-width: 480px) {
    .btn-lg {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* ========================================
   Shared CTA Section (reusable across pages)
   ======================================== */

.cta {
    padding: var(--tr-spacing-section) 0;
    background: linear-gradient(135deg, var(--tr-color-primary) 0%, var(--tr-color-primary-hover) 100%);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta h2 {
    color: var(--tr-color-white);
    margin-bottom: var(--tr-space-4);
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--tr-text-lg);
    margin-bottom: var(--tr-space-10);
}

.cta-buttons {
    margin-bottom: 0;
}

.cta-glow {
    animation: ctaBreath 2.5s ease-in-out infinite;
}

@keyframes ctaBreath {
    0%, 100% { box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 4px 30px rgba(255, 255, 255, 0.4), 0 0 60px rgba(255, 255, 255, 0.1); }
}

@media (max-width: 768px) {
    .cta {
        padding: var(--tr-spacing-section-mobile) 0;
    }
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
    background: var(--tr-color-slate-800);
    color: var(--tr-color-white);
}

/* Trust Badges Strip */
.footer-trust {
    background: var(--tr-color-slate-900);
    padding: var(--tr-space-5) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-trust-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--tr-space-3) var(--tr-space-8);
    flex-wrap: wrap;
}

@media (min-width: 769px) {
    .footer-trust-inner {
        flex-wrap: nowrap;
    }
}

.footer-trust-badge {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-400);
}

.footer-trust-badge svg {
    color: var(--tr-color-primary);
}

.footer-trust-flag {
    font-size: 14px;
    line-height: 1;
}

/* Main Footer */
.site-footer > .container {
    padding-top: var(--tr-space-16);
    padding-bottom: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: var(--tr-space-16);
    padding-bottom: var(--tr-space-12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-links-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--tr-space-8);
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    margin-bottom: var(--tr-space-4);
}

.footer-logo-icon {
    height: 36px;
    width: 36px;
    flex-shrink: 0;
}

.footer-logo-text {
    font-size: var(--tr-text-xl);
    font-weight: var(--tr-font-extrabold);
    color: var(--tr-color-white);
}

.footer-logo-text span {
    color: var(--tr-color-primary);
}

.footer-description {
    color: var(--tr-color-slate-400);
    font-size: var(--tr-text-sm);
    line-height: var(--tr-leading-relaxed);
    margin-bottom: var(--tr-space-5);
}

/* Social Icons with glow */
.footer-social {
    display: flex;
    gap: var(--tr-space-2);
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: var(--tr-radius-md);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tr-color-slate-400);
    transition: all var(--tr-transition-base);
}

.footer-social a:hover {
    background: var(--tr-color-primary);
    color: var(--tr-color-white);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

/* Footer Links */
.footer-links h4 {
    color: var(--tr-color-white);
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--tr-space-5);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--tr-space-3);
}

.footer-links a {
    color: var(--tr-color-slate-400);
    font-size: var(--tr-text-sm);
    text-decoration: none;
    transition: color var(--tr-transition-base), padding-left var(--tr-transition-base);
}

.footer-links a:hover {
    color: var(--tr-color-primary);
    padding-left: 4px;
}

/* Bottom */
.footer-bottom {
    padding: var(--tr-space-6) 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--tr-color-slate-500);
    font-size: var(--tr-text-sm);
}

.footer-powered {
    margin-top: var(--tr-space-2);
    color: var(--tr-color-primary);
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-medium);
    display: inline-flex;
    align-items: center;
    gap: var(--tr-space-1);
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer-trust {
        padding: var(--tr-space-4) 0;
    }

    .footer-trust-inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--tr-space-3);
        justify-items: center;
    }

    .footer-trust-badge {
        font-size: 11px;
    }

    .site-footer > .container {
        padding-top: var(--tr-space-10);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--tr-space-8);
    }

    .footer-brand {
        max-width: 100%;
        text-align: center;
    }

    .footer-links-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--tr-space-6);
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-description {
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links {
        text-align: center;
    }

    .footer-links a:hover {
        padding-left: 0;
    }

    .footer-bottom p {
        font-size: var(--tr-text-xs);
        line-height: var(--tr-leading-relaxed);
    }
}

@media (max-width: 480px) {
    .footer-trust-inner {
        grid-template-columns: 1fr 1fr;
        justify-items: center;
        padding: 0 var(--tr-space-4);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--tr-space-6);
    }

    .footer-links-row {
        grid-template-columns: 1fr 1fr;
    }
}
