/* Üldised stiilid */
:root {
    --primary-color: #005A9C; /* Tumesinine */
    --secondary-color: #00AEEF; /* Helesinine */
    --accent-color: #FFD700; /* Kuldne/kollane */
    --dark-grey: #333;
    --light-grey: #f4f4f4;
    --white: #fff;
    --font-header: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark-grey);
    scroll-behavior: smooth;
}

h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 40px; position: relative; }
h3 { font-size: 1.5rem; margin-bottom: 15px; }
h4 { font-size: 1.1rem; font-weight: 500; color: var(--primary-color); }


/* Pealkirjade span-elemendid */
h1 span, h2 span, h3 span {
    color: #555;
    font-weight: 400;
    font-size: 0.7em;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
}

section {
    padding: 60px 20px;
}

section:nth-child(even) {
    background-color: var(--light-grey);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 15px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}


/* Päis ja Navigatsioon */
header {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/hero-background.png') no-repeat center center/cover;
    color: var(--white);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    width: 100%;
    z-index: 100;
    transition: background-color 0.4s ease;
}

nav.scrolled {
    background: var(--primary-color);
}

.logo {
    font-family: var(--font-header);
    font-size: 1.8rem;
    font-weight: 700;
}

.logo-highlight {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px;
    transition: all 0.3s ease;
}


/* Kangelase Sektsioon */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-text h1 {
    color: var(--white);
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px auto;
}


/* Sissejuhatus */
#about {
    max-width: 900px;
    margin: 0 auto;
}

/* Laenude võrdlus */
#compare .section-intro {
    text-align: center;
    max-width: 800px;
    margin: -20px auto 40px auto;
}

.comparison-table {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 30px;
    width: 320px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-logo {
    max-height: 50px;
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
}

.card ul li {
    margin-bottom: 10px;
    border-bottom: 1px solid var(--light-grey);
    padding-bottom: 10px;
}

.card ul li strong {
    color: var(--primary-color);
}

.cta-button-small {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 25px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button-small:hover {
    background-color: var(--primary-color);
}

/* Juhendi sektsioon */
.guide-container {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 50px auto;
}

.guide-box {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    flex: 1;
}

.guide-box h3 {
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.guide-box ul {
    list-style-type: '✓';
    padding-left: 20px;
}

.guide-box ul li {
    margin-bottom: 10px;
    padding-left: 10px;
}

.facebook-comments-section {
    max-width: 800px;
    margin: 50px auto 0 auto;
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.facebook-comments-section h3 {
    margin-bottom: 15px;
}

/* KKK Sektsioon */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.faq-question {
    width: 100%;
    background: var(--white);
    border: none;
    padding: 15px 20px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    color: var(--primary-color);
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--light-grey);
}

.faq-answer p, .faq-answer ul {
    padding: 20px;
}
.faq-answer ul {
    padding-left: 40px;
}

/* Kontaktvorm */
#contact .section-intro {
    text-align: center;
    max-width: 600px;
    margin: -20px auto 40px auto;
}
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.success-message {
    color: #28a745;
    text-align: center;
}

/* Jalus */
footer {
    background: var(--dark-grey);
    color: var(--white);
    text-align: center;
    padding: 20px;
}

.footer-content a {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

#visitor-counter {
    margin-top: 10px;
    opacity: 0.7;
}

#visitor-counter p {
    font-size: 0.9rem;
}
#visitor-counter img {
    vertical-align: middle;
}

/* Reageeriv disain */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: var(--primary-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }
    .nav-links li {
        margin: 20px 0;
        opacity: 0;
    }
    .burger {
        display: block;
    }
    .nav-active {
        transform: translateX(0%);
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }
        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }

    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .guide-container {
        flex-direction: column;
    }
}