/* ==================== VARIABLES ==================== */
:root {
    --primary: #1e3a5f;
    --primary-light: #2d5a8a;
    --primary-dark: #0f2340;
    --accent: #e8735a;
    --accent-light: #f4a293;
    --accent-dark: #d4573d;
    --white: #ffffff;
    --gray-50: #f5f7fa;
    --gray-100: #e9ecf0;
    --gray-200: #d1d8e0;
    --gray-400: #8896a6;
    --gray-600: #5a6978;
    --gray-800: #2d3748;
    --shadow-sm: 0 2px 8px rgba(30,58,95,0.06);
    --shadow-md: 0 8px 30px rgba(30,58,95,0.1);
    --shadow-lg: 0 20px 60px rgba(30,58,95,0.12);
    --shadow-accent: 0 10px 40px rgba(232,115,90,0.25);
}

/* ==================== RESET & BASE ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-dark);
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}
.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}
.nav-links a {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
    position: relative;
    padding: 8px 0;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}
.nav-cta {
    background: var(--accent);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.nav-cta:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

/* ==================== MOBILE TOGGLE ==================== */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    z-index: 1002;
}
.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s;
}
.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== SIDEBAR MOBILE ==================== */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--white);
    z-index: 1001;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
    transition: right 0.4s ease;
    padding: 0 30px 30px;
    overflow-y: auto;
}
.sidebar.active {
    right: 0;
}
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 20px;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
}
.sidebar-header .logo {
    font-size: 1.3rem;
}
.sidebar-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-close:hover {
    background: var(--gray-50);
    color: var(--accent);
}
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}
.sidebar-nav {
    list-style: none;
    margin-bottom: 30px;
}
.sidebar-nav li {
    border-bottom: 1px solid var(--gray-100);
}
.sidebar-nav a {
    display: block;
    padding: 16px 0;
    color: var(--gray-800);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--accent);
}
.sidebar-cta {
    display: block;
    background: var(--accent);
    color: var(--white);
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
}
.sidebar-cta:hover {
    background: var(--accent-dark);
}
.sidebar-contact {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-100);
}
.sidebar-contact p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.sidebar-contact a {
    color: var(--primary);
    font-weight: 500;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(232,115,90,0.06) 0%, transparent 70%);
}
.page-header .container {
    position: relative;
    z-index: 1;
}
.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.page-header p {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Guide hero with illustration - split layout */
.page-header--guide {
    padding: 90px 0 50px;
    text-align: left;
}
.page-header--guide .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
.page-header--guide .guide-breadcrumb {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}
.page-header--guide .guide-hero-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: center;
}
.page-header--guide .guide-hero-text {}
.page-header--guide h1 {
    font-size: 2.4rem;
}
.page-header--guide p {
    margin: 0;
    max-width: 540px;
}
.guide-hero-illus {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 24px rgba(30,58,95,0.1));
    border-radius: 16px;
}

/* Prev/Next navigation */
.nav-prevnext { padding: 40px 0; }
.prevnext {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.prevnext-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    flex: 1;
    max-width: 48%;
}
.prevnext-prev { justify-content: flex-start; }
.prevnext-next { justify-content: flex-end; }
.prevnext-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(232,115,90,0.12);
}
.prevnext-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s;
}
.prevnext-card:hover img { transform: scale(1.1); }
.prevnext-card span {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-700);
    transition: color 0.2s;
}
.prevnext-card:hover span { color: var(--accent); }
.prevnext-card i {
    font-size: 1.1rem;
    color: var(--gray-400);
    flex-shrink: 0;
    transition: all 0.3s;
}
.prevnext-card:hover i { color: var(--accent); }
.prevnext-prev:hover i { transform: translateX(-3px); }
.prevnext-next:hover i { transform: translateX(3px); }
@media (max-width: 640px) {
    .prevnext-card { padding: 12px 14px; gap: 10px; }
    .prevnext-card img { width: 36px; height: 36px; }
    .prevnext-card span { font-size: 0.78rem; }
}

/* Related cards */
.guide-related {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px 60px;
}
.guide-related h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--gray-800);
}
.related-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.related-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px 16px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    text-align: center;
}
.related-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(232,115,90,0.12);
}
.related-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(30,58,95,0.08));
    transition: transform 0.3s;
}
.related-card:hover img { transform: scale(1.08); }
.related-card span {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-700);
    line-height: 1.3;
    transition: color 0.2s;
}
.related-card:hover span { color: var(--accent); }
/* Keep old style as fallback */
.guide-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.guide-related-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    color: var(--gray-600);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.25s;
    text-decoration: none;
}
.guide-related-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(232,115,90,0.04);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.guide-related-links a i { font-size: 0.8rem; }

/* ==================== SECTIONS ==================== */
.section { padding: 100px 0; }
.section-light { background: var(--white); }
.section-alt { background: var(--gray-50); }
.section-dark { background: var(--primary-dark); color: var(--white); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.8); }

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(232,115,90,0.1);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.section-dark .section-badge {
    background: rgba(255,255,255,0.1);
    color: var(--accent-light);
}
.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.section-header p {
    color: var(--gray-600);
    font-size: 1.05rem;
}
.section-dark .section-header p {
    color: rgba(255,255,255,0.7);
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}
.btn-primary {
    background: var(--accent);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}
.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--gray-200);
}
.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

/* ==================== CARDS ==================== */
.card {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}
.section-alt .card {
    box-shadow: var(--shadow-sm);
    border: none;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--accent);
    transition: height 0.4s;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.card:hover::before {
    height: 100%;
}
.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    background: var(--gray-50);
    color: var(--primary);
    transition: all 0.4s;
}
.card:hover .card-icon {
    background: var(--accent);
    color: var(--white);
}
.card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.card p {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==================== GRIDS ==================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ==================== STATS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.stat-item {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
}
.stat-item h3 {
    font-size: 2.5rem;
    color: var(--accent-light);
    margin-bottom: 8px;
}
.stat-item p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    text-align: center;
    padding: 80px 0;
}
.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}
.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--primary-dark);
    padding: 70px 0 24px;
    color: var(--white);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}
.footer-brand .logo {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--white);
}
.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-bottom: 20px;
    max-width: 280px;
    line-height: 1.6;
}
.footer-social {
    display: flex;
    gap: 10px;
}
.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    transition: all 0.3s;
}
.footer-social a:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
}
.footer-column h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--white);
}
.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--accent-light);
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}
.footer-legal {
    display: flex;
    gap: 24px;
}
.footer-legal a {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    transition: color 0.3s;
}
.footer-legal a:hover {
    color: rgba(255,255,255,0.8);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.animate.visible { opacity: 1; transform: translateY(0); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .mobile-toggle { display: flex; }
    
    .page-header { padding: 120px 0 60px; }
    .page-header h1 { font-size: 2rem; }
    .page-header--guide { padding: 100px 0 40px; }
    .page-header--guide .guide-hero-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .page-header--guide .guide-hero-illus {
        max-width: 220px;
        margin: 0 auto;
    }
    .page-header--guide { text-align: center; }
    .page-header--guide p { margin: 0 auto; }
    
    .section { padding: 70px 0; }
    .section-header h2 { font-size: 1.8rem; }
    
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
