/*
Theme Name: Rõõmus Laine
Author: Andres Kuusk
Description: Rõõmus Laine OÜ spordiklubi WordPress theme.
Version: 1.0
*/

:root {
    --main: #0077b6;
    --dark: #023047;
    --light: #f1f9ff;
    --accent: #ffb703;
    --text: #222;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.6;
}

a {
    color: var(--main);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.site-header {
    background: var(--dark);
    color: white;
    padding: 20px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.main-nav a {
    color: white;
    margin-left: 20px;
    font-weight: bold;
}

.hero {
    background: linear-gradient(135deg, var(--main), #00b4d8);
    color: white;
    padding: 90px 0;
}

.hero h1 {
    font-size: 48px;
    margin: 0 0 15px;
}

.hero p {
    font-size: 20px;
    max-width: 720px;
}

.button {
    display: inline-block;
    background: var(--accent);
    color: #111;
    padding: 12px 22px;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 15px;
}

.section {
    padding: 55px 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card,
.news-item,
.contact-box {
    background: var(--light);
    border: 1px solid #d7eefc;
    border-radius: 10px;
    padding: 24px;
}

.news-list {
    display: grid;
    gap: 24px;
}

.news-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.site-footer {
    background: var(--dark);
    color: white;
    padding: 25px 0;
    margin-top: 40px;
}

@media (max-width: 800px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav a {
        display: inline-block;
        margin: 8px 15px 0 0;
    }

    .hero h1 {
        font-size: 34px;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}

/* Dark mode */
body.dark-mode {
    --main: #4cc9f0;
    --dark: #0b1320;
    --light: #14213d;
    --accent: #ffd166;
    --text: #f5f5f5;

    background: #0b1320;
    color: var(--text);
}

body.dark-mode .card,
body.dark-mode .news-item,
body.dark-mode .contact-box {
    background: #14213d;
    border-color: #263859;
}

body.dark-mode .site-header,
body.dark-mode .site-footer {
    background: #050914;
}

body.dark-mode a {
    color: #90e0ef;
}

body.dark-mode .button {
    color: #111;
}

.theme-toggle {
    background: var(--accent);
    color: #111;
    border: 0;
    border-radius: 6px;
    padding: 9px 14px;
    font-weight: bold;
    cursor: pointer;
}

.theme-toggle:hover {
    opacity: 0.9;
}
