/* DigitalStudy Shared Stylesheet v1.1 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===================== CSS VARIABLES ===================== */
:root {
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --secondary: #2563eb;
    --accent: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===================== RESET & BASE ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

body.modal-open {
    overflow: hidden;
}

/* ===================== TYPOGRAPHY ===================== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    color: var(--text-dark);
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent);
}

p {
    line-height: 1.7;
}

/* ===================== NAVIGATION ===================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s;
}

.navbar.scrolled {
    box-shadow: var(--shadow);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s;
}

.logo:hover {
    color: var(--primary);
    transform: scale(1.02);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s;
    display: block;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===================== BUTTONS ===================== */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    font-family: inherit;
    text-align: center;
    line-height: 1.5;
}

.btn-outline {
    color: var(--primary);
    border: 2px solid var(--primary);
    background: transparent;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: var(--shadow);
}

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

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

.btn-secondary:hover {
    background: var(--border);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

.btn-white:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-transparent {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-transparent:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: white;
}

.btn-block {
    width: 100%;
}

/* ===================== LAYOUT ===================== */
.section {
    padding: 6rem 2rem;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    color: var(--secondary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===================== CARDS ===================== */
.card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 2rem;
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===================== BADGE ===================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-primary { background: rgba(37, 99, 235, 0.1); color: var(--secondary); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-error   { background: rgba(239, 68, 68, 0.1);  color: var(--error);   }

/* ===================== PAGE HERO (inner pages) ===================== */
.page-hero {
    padding: 10rem 2rem 5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

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

.page-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.15;
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.7;
    color: rgba(255,255,255,0.9);
}

.page-hero .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

.page-hero .breadcrumb a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.page-hero .breadcrumb a:hover { color: white; }

.page-hero .breadcrumb span { opacity: 0.5; }

/* ===================== FOOTER ===================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto 3rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--secondary);
    color: white;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
}

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

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.footer-bottom a:hover { color: white; }

/* ===================== SCROLL-TO-TOP ===================== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* ===================== LOADING / SPINNER ===================== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ===================== UTILITY ===================== */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-muted   { color: var(--text-light); }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

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

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.75rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 0.75rem 0;
        display: block;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .mobile-nav-cta {
        display: flex !important;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }

    .section {
        padding: 4rem 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .page-hero {
        padding: 8rem 1.5rem 4rem;
    }

    .page-hero h1 {
        font-size: 2.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Mobile nav CTA buttons - hidden on desktop */
.mobile-nav-cta {
    display: none;
}

/* ===================== PRINT ===================== */
@media print {
    .navbar, .scroll-to-top { display: none !important; }
    .page-hero { padding-top: 2rem; color: black; background: white; }
    .section { page-break-inside: avoid; }
}
