/* ==========================================================================
   Tere Linux — Disainisüsteem & CSS
   ========================================================================== */

:root {
    /* Värvid */
    --bg-darker: #090d16;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.4);
    --bg-card-hover: rgba(30, 41, 59, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-active: rgba(14, 165, 233, 0.4);
    
    --primary: #0ea5e9;
    --primary-hover: #0284c7;
    --secondary: #14b8a6;
    --secondary-hover: #0d9488;
    
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --text-dark: #0f172a;
    
    /* Muud seaded */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Lähtestamine */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Tausta helendused (Aesthetic glow effects) */
.glow-bg {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.25;
}

.glow-1 {
    top: 10%;
    left: 5%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.glow-2 {
    top: 50%;
    right: 5%;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
}

/* Tüpoograafia */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

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

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

/* Korduvkasutatavad nupud */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(14, 165, 233, 0.3);
    opacity: 0.95;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    border: 1px solid var(--border-color);
}

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

.btn-sm {
    padding: 8px 18px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

/* Glassmorphism paneel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

/* Navigatsioon */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

/* Peamine sisu */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 24px 60px 24px;
}

/* Hero sektsioon */
.hero-section {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    padding: 40px 0 80px 0;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 100px;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    color: var(--text-gray);
    font-size: 1.15rem;
    margin-bottom: 40px;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

/* Hero vizuaal (Arvuti Mockup) */
.visual-card {
    background: #1e293b;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    overflow: hidden;
}

.card-header {
    background: #0f172a;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }

.card-title {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-left: 8px;
    font-family: var(--font-body);
}

.mockup-desktop {
    display: grid;
    grid-template-columns: 80px 1fr;
    height: 280px;
    font-size: 0.85rem;
}

.mockup-sidebar {
    background-color: #0f172a;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-item {
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text-gray);
    cursor: pointer;
}

.sidebar-item.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.mockup-main {
    padding: 20px;
    background-color: #1e293b;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mockup-header-bar {
    font-size: 1.1rem;
    font-weight: 600;
}

.mockup-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.grid-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.grid-card h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.grid-card p {
    color: var(--text-gray);
    font-size: 0.75rem;
}

/* Info Sektsioon (Miks Linux) */
.info-section, .test-section, .software-section, .guide-section, .faq-section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 32px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    background-color: var(--bg-card-hover);
    border-color: var(--border-color-active);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* Distro Testi disain */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.quiz-welcome {
    text-align: center;
}

.quiz-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(20, 184, 166, 0.15);
    border: 1px solid rgba(20, 184, 166, 0.3);
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 100px;
    margin-bottom: 16px;
}

.quiz-welcome h3 {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.quiz-welcome p {
    color: var(--text-gray);
    margin-bottom: 32px;
}

.quiz-progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress {
    width: 33%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 100px;
    transition: width 0.3s ease;
}

.question-header {
    margin-bottom: 24px;
}

.step-counter {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 8px;
}

.question-header h3 {
    font-size: 1.5rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    color: var(--text-white);
    text-align: left;
    font-size: 1rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.option-btn::after {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
    color: var(--primary);
}

.option-btn:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Testi Tulemuse kast */
.result-box {
    text-align: center;
}

.result-icon-wrapper {
    font-size: 4rem;
    margin-bottom: 16px;
}

.result-label {
    color: var(--text-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#result-title {
    font-size: 2.5rem;
    margin: 8px 0 16px 0;
}

#result-description {
    color: var(--text-gray);
    max-width: 550px;
    margin: 0 auto 24px auto;
}

.result-details {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    max-width: 550px;
    margin: 0 auto 32px auto;
    text-align: left;
}

.result-details h4 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.result-details ul {
    list-style-type: none;
}

.result-details li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.result-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Tarkvara Üleminekukaart */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px auto;
    position: relative;
}

#software-search {
    width: 100%;
    padding: 16px 20px 16px 48px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

#software-search:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-glow);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.5;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.software-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition);
}

.software-card:hover {
    border-color: var(--border-color-active);
    transform: translateY(-2px);
}

.soft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.win-app {
    font-weight: 700;
    color: #f1f5f9;
}

.arrow-divider {
    color: var(--primary);
    font-weight: bold;
}

.linux-app {
    font-weight: 700;
    color: var(--secondary);
}

.soft-body p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.soft-type {
    display: inline-block;
    padding: 3px 8px;
    background-color: rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    border-radius: 4px;
    color: var(--text-gray);
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Samm-sammuline Migratsioonijuhend (Checklist) */
.checklist-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    align-items: start;
}

.checklist-sidebar {
    position: sticky;
    top: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: var(--radius-md);
    text-align: center;
}

.progress-ring-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 16px auto;
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
}

.progress-sub {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checklist-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    gap: 20px;
    transition: var(--transition);
}

.checklist-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.checklist-card.completed {
    border-color: rgba(20, 184, 166, 0.25);
    background: rgba(20, 184, 166, 0.03);
}

.checklist-card.completed h3 {
    text-decoration: line-through;
    opacity: 0.6;
}

.checklist-card.completed .step-num {
    background-color: rgba(20, 184, 166, 0.2);
    color: var(--secondary);
}

/* Custom Checkbox disain */
.checkbox-container {
    display: block;
    position: relative;
    cursor: pointer;
    font-size: 22px;
    user-select: none;
    width: 28px;
    height: 28px;
    margin-top: 4px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 28px;
    width: 28px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 10px;
    top: 6px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Juhendi sisu */
.step-content {
    flex: 1;
}

.step-num {
    display: inline-block;
    padding: 3px 10px;
    background-color: rgba(14, 165, 233, 0.15);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 12px;
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.step-content ul {
    margin-left: 20px;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.step-content li {
    margin-bottom: 6px;
}

.text-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.text-link:hover {
    text-decoration: underline;
}

.code-block {
    display: block;
    background-color: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    overflow-x: auto;
    margin-top: 10px;
}

/* FAQ sektsioon (Akordion) */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.faq-question {
    width: 100%;
    padding: 24px;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-toggle-icon {
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding: 0 24px 24px 24px;
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0), padding 0.3s ease;
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(45deg);
}

/* Kogukonna bänner */
.community-banner {
    padding: 60px 0;
}

.community-content {
    padding: 60px;
    text-align: center;
    border-radius: var(--radius-lg);
}

.community-content h3 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.community-content p {
    color: var(--text-gray);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

.community-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.community-btn {
    display: inline-block;
    padding: 14px 28px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

/* Jalus */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 24px;
    background-color: var(--bg-darker);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.footer-sub {
    font-size: 0.8rem;
    margin-top: 8px;
    opacity: 0.6;
}

/* ==========================================================================
   Kohanduvus (Responsive Design)
   ========================================================================== */

@media (max-width: 968px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        margin: 0 auto 32px auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .checklist-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .checklist-sidebar {
        position: static;
    }
    
    .nav-links {
        display: none; /* Lihtsuse huvides peidame mobiilis vanillamenüü või lahendaks selle burgeriga */
    }
}

@media (max-width: 576px) {
    .main-content {
        padding-top: 90px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .quiz-container {
        padding: 24px 16px;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .checklist-card {
        padding: 16px;
        gap: 12px;
    }
}
