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

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Poppins", Arial, sans-serif;
    color: #172033;
    background:
        radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.12), transparent 30%),
        radial-gradient(circle at 90% 20%, rgba(14, 165, 233, 0.10), transparent 28%),
        #f4f7fb;
    line-height: 1.7;
}

/* HEADER */

header {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 8%;
    background: linear-gradient(135deg, #0f172a, #172554 55%, #0369a1);
    color: white;
    overflow: hidden;
    border-bottom: 5px solid #38bdf8;
}

header::before,
header::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

header::before {
    width: 360px;
    height: 360px;
    right: -120px;
    top: -160px;
    background: rgba(56, 189, 248, 0.16);
}

header::after {
    width: 280px;
    height: 280px;
    left: -120px;
    bottom: -150px;
    background: rgba(59, 130, 246, 0.18);
}

.header-content {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
    text-align: left;
    margin-right: 210px;
}

.small-label {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 13px;
    border-left: 4px solid #38bdf8;
    color: #bae6fd;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.header-content h1 {
    margin: 0;
    font-size: clamp(2.8rem, 6vw, 5.8rem);
    line-height: 1.05;
    letter-spacing: 2px;
    font-weight: 700;
}

.header-content h1::after {
    content: "";
    display: block;
    width: 90px;
    height: 4px;
    margin-top: 22px;
    border-radius: 10px;
    background: #38bdf8;
}

.header-content p {
    margin: 20px 0 0;
    color: #dbeafe;
    font-size: 1rem;
    letter-spacing: 1px;
}

.profil-photo {
    position: absolute;
    z-index: 3;
    right: 9%;
    top: 50%;
    width: 170px;
    height: 170px;
    padding: 5px;
    object-fit: contain;
    transform: translateY(-50%);
    border: 4px solid #38bdf8;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(2, 8, 23, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profil-photo:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 22px 55px rgba(2, 8, 23, 0.45);
}

/* SIMPLE HEADER FOR OTHER PAGES */

body > header:not(:has(.header-content)) {
    min-height: 190px;
    padding: 45px 8%;
}

body > header:not(:has(.header-content)) h1 {
    position: relative;
    z-index: 2;
    margin: 0;
    text-align: center;
    font-size: clamp(2rem, 4vw, 3.5rem);
}

/* NAVIGATION */

nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #dbe3ee;
    box-shadow: 0 5px 20px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(12px);
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 20px;
    list-style: none;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 9px 18px;
    color: #334155;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: 0.25s ease;
}

nav ul li a:hover {
    color: #0369a1;
    background: #e0f2fe;
    border-color: #bae6fd;
    transform: translateY(-2px);
}

/* MAIN */

main {
    width: min(1180px, 90%);
    margin: 0 auto;
    padding: 75px 0;
}

.section-intro {
    max-width: 760px;
    margin-bottom: 45px;
}

.section-intro span {
    color: #0284c7;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.section-intro h2,
main > h2 {
    margin: 8px 0 12px;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.2;
}

.section-intro h2::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    margin-top: 16px;
    border-radius: 10px;
    background: #0ea5e9;
}

.section-intro p {
    color: #64748b;
    max-width: 650px;
}

/* COLUMNS / CARDS */

#suurkast {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

#suurkast section,
#kast3,
#kast4,
#kast5 {
    position: relative;
    padding: 32px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe3ee;
    border-top: 5px solid #0ea5e9;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

#suurkast section {
    min-height: 360px;
}

#suurkast section:nth-child(even) {
    transform: translateY(18px);
}

#suurkast section:hover,
#kast3:hover,
#kast4:hover,
#kast5:hover {
    border-color: #7dd3fc;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.13);
    transform: translateY(-5px);
}

#suurkast section:nth-child(even):hover {
    transform: translateY(13px);
}

.card-number {
    position: absolute;
    top: 24px;
    right: 28px;
    color: #bae6fd;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
}

#suurkast section h2,
#kast3 h2,
#kast4 h2,
#kast5 h2 {
    margin: 0 0 14px;
    color: #0f4c81;
    font-size: 1.55rem;
}

#suurkast section p,
#kast3 p,
#kast4 p,
#kast5 p {
    color: #64748b;
}

/* GALLERY */

.galerii {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 25px;
}

.galerii img {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: cover;
    border: 3px solid #e0f2fe;
    border-radius: 12px;
    background: #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galerii img:nth-child(even) {
    transform: translateY(12px);
}

.galerii img:hover {
    transform: scale(1.03);
    border-color: #38bdf8;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.20);
}

.galerii img:nth-child(even):hover {
    transform: translateY(12px) scale(1.03);
}

/* MEDIA */

#video iframe,
#kaart iframe,
#muusika iframe {
    display: block;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #e2e8f0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

#video iframe {
    max-width: 850px;
    height: 430px;
    margin: 25px auto 0;
}

#kaart iframe {
    height: 390px;
    margin-top: 25px;
}

#muusika iframe {
    max-width: 700px;
    height: 352px;
    margin: 25px auto 0;
}

/* LINKS */

#kast5 a {
    color: #0284c7;
    font-weight: 600;
    text-decoration: none;
}

#kast5 a:hover {
    text-decoration: underline;
}

/* FOOTER */

footer {
    margin-top: 55px;
    padding: 35px 20px;
    text-align: center;
    color: #cbd5e1;
    background: #0f172a;
    border-top: 4px solid #38bdf8;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

footer span {
    display: block;
    margin-top: 5px;
    color: #94a3b8;
    font-size: 0.78rem;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .header-content {
        margin-right: 180px;
    }

    .profil-photo {
        width: 145px;
        height: 145px;
        right: 5%;
    }

    #suurkast {
        grid-template-columns: 1fr;
    }

    #suurkast section:nth-child(even) {
        transform: none;
    }

    #suurkast section:nth-child(even):hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 650px) {
    header {
        min-height: 520px;
        align-items: flex-end;
        padding: 45px 7%;
    }

    .profil-photo {
        top: 45px;
        right: 50%;
        width: 135px;
        height: 135px;
        transform: translateX(50%);
    }

    .profil-photo:hover {
        transform: translateX(50%) scale(1.05);
    }

    .header-content {
        margin: 0;
        text-align: center;
    }

    .header-content h1 {
        font-size: 2.7rem;
    }

    .header-content h1::after {
        margin-left: auto;
        margin-right: auto;
    }

    nav ul {
        flex-direction: column;
        gap: 2px;
        padding: 8px;
    }

    nav ul li,
    nav ul li a {
        width: 100%;
    }

    nav ul li a {
        text-align: center;
        padding: 8px;
    }

    main {
        width: 92%;
        padding: 55px 0;
    }

    #suurkast section,
    #kast3,
    #kast4,
    #kast5 {
        padding: 26px 22px;
    }

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

    .galerii img,
    .galerii img:nth-child(even) {
        height: 270px;
        transform: none;
    }/* =========================================================
   PÕHISEADED
   ========================================================= */

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

    * {
        box-sizing: border-box;
    }

    html {
        scroll-behavior: smooth;
    }

    body {
        margin: 0;
        min-height: 100vh;
        background: #f5f7fb;
        color: #263238;
        font-family: "Montserrat", Arial, sans-serif;
        font-size: 16px;
        line-height: 1.7;
    }

    /* =========================================================
       HEADER
       ========================================================= */

    header {
        position: relative;
        min-height: 330px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 60px 8%;
        overflow: hidden;

        background:
                linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(30, 64, 175, 0.95)),
                #0f172a;

        color: #ffffff;
        border-bottom: 6px solid #38bdf8;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    }

    header::before {
        content: "";
        position: absolute;
        width: 420px;
        height: 420px;
        top: -240px;
        right: -100px;
        border-radius: 50%;
        background: rgba(56, 189, 248, 0.18);
    }

    header::after {
        content: "";
        position: absolute;
        width: 300px;
        height: 300px;
        left: -160px;
        bottom: -210px;
        border-radius: 50%;
        background: rgba(59, 130, 246, 0.18);
    }

    /* Header vanal index.html lehel */

    .header-content {
        position: relative;
        z-index: 2;
        width: min(850px, 100%);
        margin-right: 210px;
        text-align: left;
    }

    .small-label {
        display: inline-block;
        margin-bottom: 12px;
        padding: 6px 14px;

        color: #bae6fd;
        border-left: 4px solid #38bdf8;

        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 2px;
    }

    .header-content h1 {
        margin: 0;
        color: #ffffff;

        font-size: clamp(2.7rem, 6vw, 5.5rem);
        font-weight: 700;
        line-height: 1.05;
        letter-spacing: 2px;
    }

    .header-content h1::after {
        content: "";
        display: block;

        width: 90px;
        height: 4px;
        margin-top: 22px;

        background: #38bdf8;
        border-radius: 20px;
    }

    .header-content p {
        margin: 20px 0 0;
        color: #dbeafe;

        font-size: 1rem;
        letter-spacing: 1px;
    }

    /* Foto */

    .profil-photo {
        position: absolute;
        z-index: 3;

        top: 50%;
        right: 9%;

        width: 175px;
        height: 175px;

        padding: 5px;
        object-fit: contain;

        transform: translateY(-50%);

        background: #ffffff;
        border: 4px solid #38bdf8;
        border-radius: 50%;

        box-shadow:
                0 15px 40px rgba(0, 0, 0, 0.35),
                0 0 0 8px rgba(56, 189, 248, 0.08);

        transition: 0.3s ease;
    }

    .profil-photo:hover {
        transform: translateY(-50%) scale(1.05);

        box-shadow:
                0 20px 50px rgba(0, 0, 0, 0.42),
                0 0 0 12px rgba(56, 189, 248, 0.10);
    }

    /* Заголовок на остальных страницах */

    header > h1 {
        position: relative;
        z-index: 2;

        margin: 0;
        max-width: 1000px;

        color: #ffffff;
        text-align: center;

        font-size: clamp(2rem, 4vw, 3.7rem);
        line-height: 1.2;
    }

    /* =========================================================
       NAVIGATION
       ========================================================= */

    nav {
        position: sticky;
        top: 0;
        z-index: 1000;

        background: rgba(255, 255, 255, 0.96);
        border-bottom: 1px solid #dbe4ee;

        box-shadow: 0 5px 20px rgba(15, 23, 42, 0.08);

        backdrop-filter: blur(12px);
    }

    nav ul {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;

        max-width: 1200px;
        margin: 0 auto;
        padding: 10px 20px;

        gap: 6px;

        list-style: none;
    }

    nav ul li {
        margin: 0;
        padding: 0;
    }

    nav ul li a {
        display: block;

        padding: 9px 17px;

        color: #334155;
        text-decoration: none;

        font-size: 0.86rem;
        font-weight: 600;

        border: 1px solid transparent;
        border-radius: 10px;

        transition: 0.25s ease;
    }

    nav ul li a:hover {
        color: #0369a1;
        background: #e0f2fe;
        border-color: #bae6fd;

        transform: translateY(-2px);
    }

    /* Если на странице есть второй nav */

    nav + nav {
        display: none;
    }

    /* =========================================================
       MAIN
       ========================================================= */

    main {
        width: min(1180px, 90%);
        margin: 0 auto;
        padding: 75px 0;
    }

    /* Заголовки обычных страниц */

    main > h2 {
        margin: 0 0 35px;

        color: #0f172a;
        text-align: center;

        font-size: clamp(2rem, 4vw, 3.3rem);
        line-height: 1.2;
    }

    main > h2::after {
        content: "";
        display: block;

        width: 65px;
        height: 4px;

        margin: 15px auto 0;

        background: #0ea5e9;
        border-radius: 20px;
    }

    /* Intro на главной */

    .section-intro {
        max-width: 760px;
        margin-bottom: 50px;
    }

    .section-intro span {
        color: #0284c7;

        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 2px;
    }

    .section-intro h2 {
        margin: 8px 0 12px;

        color: #0f172a;

        font-size: clamp(2rem, 4vw, 3.5rem);
        line-height: 1.2;
    }

    .section-intro h2::after {
        content: "";
        display: block;

        width: 70px;
        height: 4px;

        margin-top: 16px;

        background: #0ea5e9;
        border-radius: 20px;
    }

    .section-intro p {
        max-width: 650px;
        margin: 0;

        color: #64748b;
    }

    /* =========================================================
       VEERUD / KASTID
       ========================================================= */

    #suurkast {
        display: grid;

        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 30px;
        align-items: stretch;
    }

    /* Все карточки */

    #suurkast section,
    #kast3,
    #kast4,
    #kast5 {
        position: relative;

        min-width: 0;
        padding: 32px;

        background: #ffffff;

        border: 1px solid #dbe4ee;
        border-top: 5px solid #0ea5e9;
        border-radius: 18px;

        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);

        transition:
                transform 0.3s ease,
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    }

    #suurkast section {
        min-height: 350px;
    }

    /* Каждая вторая карточка немного ниже */

    #suurkast section:nth-child(even) {
        transform: translateY(18px);
    }

    #suurkast section:hover,
    #kast3:hover,
    #kast4:hover,
    #kast5:hover {
        transform: translateY(-6px);

        border-color: #7dd3fc;

        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.13);
    }

    #suurkast section:nth-child(even):hover {
        transform: translateY(12px);
    }

    /* Номер карточки */

    .card-number {
        position: absolute;

        top: 22px;
        right: 27px;

        color: #cbd5e1;

        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 2px;
    }

    /* Заголовки карточек */

    #suurkast section h2,
    #kast3 h2,
    #kast4 h2,
    #kast5 h2 {
        margin: 0 0 14px;

        color: #0f4c81;

        font-size: 1.55rem;
        font-weight: 700;
        line-height: 1.3;
    }

    #suurkast section p,
    #kast3 p,
    #kast4 p,
    #kast5 p {
        margin-top: 0;

        color: #64748b;
    }

    /* =========================================================
       GALERII
       ========================================================= */

    .galerii {
        display: grid;

        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 15px;
        margin-top: 25px;
    }

    .galerii img {
        display: block;

        width: 100%;
        height: 210px;

        object-fit: cover;

        background: #e2e8f0;

        border: 3px solid #e0f2fe;
        border-radius: 13px;

        box-shadow: 0 7px 20px rgba(15, 23, 42, 0.08);

        transition:
                transform 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    }

    .galerii img:nth-child(even) {
        transform: translateY(12px);
    }

    .galerii img:hover {
        transform: scale(1.04);

        border-color: #38bdf8;

        box-shadow: 0 15px 30px rgba(14, 165, 233, 0.18);
    }

    .galerii img:nth-child(even):hover {
        transform: translateY(12px) scale(1.04);
    }

    /* =========================================================
       VIDEO / KAART / MUUSIKA
       ========================================================= */

    #video iframe,
    #kaart iframe,
    #muusika iframe {
        display: block;

        width: 100%;

        background: #e2e8f0;

        border: 1px solid #cbd5e1;
        border-radius: 14px;

        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    }

    /* Video */

    #video iframe {
        max-width: 850px;
        height: 430px;

        margin: 25px auto 0;
    }

    /* Kaart */

    #kaart iframe {
        height: 390px;

        margin-top: 25px;
    }

    /* Muusika */

    #muusika iframe {
        max-width: 700px;
        height: 352px;

        margin: 25px auto 0;
    }

    /* =========================================================
       LINGID
       ========================================================= */

    #kast5 a {
        display: inline-block;

        margin: 6px 0;

        color: #0284c7;
        font-weight: 600;

        text-decoration: none;

        transition: 0.2s ease;
    }

    #kast5 a:hover {
        color: #0369a1;
        text-decoration: underline;
    }

    /* =========================================================
       FOOTER
       ========================================================= */

    footer {
        margin-top: 45px;
        padding: 38px 20px;

        color: #cbd5e1;
        text-align: center;

        background: #0f172a;

        border-top: 5px solid #38bdf8;
    }

    footer p {
        margin: 0;

        color: #e2e8f0;

        font-size: 0.9rem;
        font-weight: 600;
    }

    footer span {
        display: block;

        margin-top: 5px;

        color: #94a3b8;

        font-size: 0.76rem;
    }

    /* =========================================================
       RESPONSIVE — TABLET
       ========================================================= */

    @media (max-width: 900px) {

        .header-content {
            margin-right: 175px;
        }

        .profil-photo {
            width: 145px;
            height: 145px;
            right: 5%;
        }

        #suurkast {
            grid-template-columns: 1fr;
        }

        #suurkast section:nth-child(even) {
            transform: none;
        }

        #suurkast section:nth-child(even):hover {
            transform: translateY(-6px);
        }

        #video iframe {
            height: 390px;
        }
    }

    /* =========================================================
       RESPONSIVE — TELEFON
       ========================================================= */

    @media (max-width: 650px) {

        header {
            min-height: 500px;

            align-items: flex-end;

            padding: 45px 7%;
        }

        .profil-photo {
            top: 40px;
            right: 50%;

            width: 135px;
            height: 135px;

            transform: translateX(50%);
        }

        .profil-photo:hover {
            transform: translateX(50%) scale(1.05);
        }

        .header-content {
            width: 100%;
            margin: 0;

            text-align: center;
        }

        .header-content h1 {
            font-size: 2.7rem;
        }

        .header-content h1::after {
            margin-left: auto;
            margin-right: auto;
        }

        .header-content p {
            font-size: 0.85rem;
        }

        header > h1 {
            font-size: 2rem;
        }

        nav {
            position: relative;
        }

        nav ul {
            flex-direction: column;

            width: 100%;

            gap: 2px;
            padding: 8px;
        }

        nav ul li,
        nav ul li a {
            width: 100%;
        }

        nav ul li a {
            padding: 8px;
            text-align: center;
        }

        main {
            width: 92%;
            padding: 55px 0;
        }

        .section-intro {
            margin-bottom: 35px;
        }

        .section-intro h2 {
            font-size: 2.2rem;
        }

        #suurkast {
            gap: 22px;
        }

        #suurkast section,
        #kast3,
        #kast4,
        #kast5 {
            min-height: auto;
            padding: 27px 22px;
            border-radius: 15px;
        }

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

        .galerii img,
        .galerii img:nth-child(even) {
            height: 270px;
            transform: none;
        }

        .galerii img:hover,
        .galerii img:nth-child(even):hover {
            transform: scale(1.02);
        }

        #video iframe {
            height: 230px;
        }

        #kaart iframe {
            height: 310px;
        }

        #muusika iframe {
            height: 352px;
        }

        footer {
            margin-top: 30px;
            padding: 32px 15px;
        }
    }

    /* =========================================================
       VÄIKE TELEFON
       ========================================================= */

    @media (max-width: 400px) {

        header {
            min-height: 470px;
        }

        .profil-photo {
            width: 120px;
            height: 120px;
        }

        .header-content h1 {
            font-size: 2.2rem;
        }

        .section-intro h2 {
            font-size: 1.9rem;
        }

        .galerii img,
        .galerii img:nth-child(even) {
            height: 240px;
        }

        #video iframe {
            height: 205px;
        }

        #kaart iframe {
            height: 280px;
        }
    }

    #video iframe {
        height: 240px;
    }

    #kaart iframe {
        height: 320px;
    }
}
