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

/* ===================================================================
   PÄÄVÄRIT JA MUUT CSS-MUUTTUJAT
   =================================================================== */
:root {
    --accent: #161616;           /* PÄÄVÄRI – käytetään kaikkialla aksenttina */
    --btn-color: #fdfdfd;        /* Painikkeiden tekstin väri */
    --btn-bg: var(--accent);     /* Painikkeiden taustaväri */
    --primary-text-color: var(--accent); /* Päätekstiväri (esim. otsikot) */
}

/* ===================================================================
   YLEISET ASETUKSET
   =================================================================== */
html {
    scroll-behavior: smooth;     /* Pehmeä vieritys ankkurilinkkeihin */
}

.khula-font {
    font-family: "Khula", sans-serif;
    font-style: normal;
}

/* ===================================================================
   YLÄPALKIN (HEADER) PERUSTYYLIT
   =================================================================== */
header {
    background-color: transparent;  /* Läpinäkyvä tausta aluksi */
    color: #fff;                    /* Valkoinen teksti oletuksena */
}

/* Valikon sisältö – laajenee ja kutistuu mobiilissa */
header > .collapsible-header {
    display: flex;
    gap: 1rem;
    width: 100%;
    background-color: inherit;
    place-content: center;
    overflow: hidden;
    transition: width 0.3s ease;    /* Animaatio valikon leveydelle */
}

/* Animaatio valikon kutistuessa/laajentuessa */
.animated-collapse {
    transition: width 0.3s ease;
}

/* ===================================================================
   NAVIGAATIOLINKIT (HEADER-LINKIT)
   =================================================================== */
.header-links {
    display: flex;
    align-items: center;
    min-width: fit-content;
    border-radius: 25px;
    padding: 5px 10px;
    transition: background-color 0.3s, color 0.3s; /* Pehmeä hover-animaatio */
}

.header-links:hover {
    background-color: #ffffff;      /* Valkoinen tausta hoverissa */
    color: #240606;                 /* Tumma teksti hoverissa */
}

/* Tila, kun valkoinen tausta on näkyvissä (scrollattu alas) */
.header-white-bg {
    color: #000;                    /* Musta teksti valkoisella taustalla */
}

.header-white-bg:hover {
    background-color: var(--accent) !important; /* Pääväri hover-taustana */
    color: #fff !important;         /* Valkoinen teksti hoverissa */
}

/* Apuluokka päävärin käyttöön */
.primary-text-color {
    color: var(--primary-text-color);
}

/* ===================================================================
   OPASITEETTI-APULUOKAT
   =================================================================== */
.opacity-0 {
    opacity: 0 !important;          /* Piilotettu elementti */
}

.opacity-100 {
    opacity: 100 !important;        /* Täysin näkyvissä */
}

/* ===================================================================
   PAINIKKEET (.btn)
   =================================================================== */
.btn {
    padding: 10px 15px;
    width: max-content;
    border-radius: 25px;
    color: var(--btn-color);        /* Valkoinen teksti */
    background-color: var(--btn-bg); /* Pääväri taustana */
    justify-content: center;
    align-items: center;
    display: flex;
    cursor: pointer;                /* Osoitinmuoto painikkeelle */
}

.btn:hover {
    /* Tähän voi lisätä hover-efektejä, esim. varjo tai kirkastuminen */
}

/* ===================================================================
   SYÖTÖKENTÄT (.input)
   =================================================================== */
.input {
    padding: 10px;
    border-radius: 10px;
    outline: none;
    min-width: 100px;
    border: 2px solid #cecece;      /* Harmaa reunus oletuksena */
    transition: border 0.3s;        /* Pehmeä reunanvärin vaihto */
}

.input:active,
.input:focus,
.input:focus-within {
    border: 2px solid var(--accent); /* Pääväri fokus-tilassa */
}

/* ===================================================================
   KUVAKARUSELLI (SLIDER) – NAVIGOINTIPALLOT
   =================================================================== */
.slides {
    display: none;
    position: relative;
    height: 100%;
}

/* Navigointipallojen container */
.dots-container {
    text-align: center;
    margin-top: 20px;
}

/* Yksittäinen navigointipallo */
.dot {
    height: 10px;
    width: 10px;
    background-color: #bbb;         /* Harmaa oletuksena */
    border-radius: 50%;
    display: inline-block;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dots-container .active,
.dot:hover {
    background-color: #717171;      /* Tummanharmaa aktiivisena/hoverissa */
}

/* Häivytysanimaatio kuville */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

/* ===================================================================
   RUOKAMENU – KESKELLÄ KUVAA OLEVAT PAINIKKEET
   =================================================================== */
.menu-item-container {
    /* Tähän voi lisätä tyylejä ruokalistan kortteihin */
}

.menu-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 5px;
    transform: translate(-50%, -50%);
    z-index: 5;
    color: #000;
    background-color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    font-weight: bold;
}

.menu-btn:hover {
    background-color: var(--accent); /* Pääväri hoverissa */
    color: #fff;
}

/* ===================================================================
   ALAPALKKI (FOOTER)
   =================================================================== */
.footer-link {
    color: #fff;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #ffef0b;                 /* Keltainen hover-väri */
}

/* ===================================================================
   ARVOSTELUT (REVIEW SLIDER)
   =================================================================== */
.review-container {
    position: relative;
    max-width: 600px;
    margin: auto;
}

.review-slide {
    display: none;
    padding: 20px;
    text-align: center;
}

/* Häivytysanimaatio arvosteluille */
.fade {
    animation: fadeEffect 1s ease-in-out;
}

@keyframes fadeEffect {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tähtiarvostelut */
.stars {
    display: inline-block;
    font-size: 40px;
    cursor: pointer;
}

.stars .star {
    color: #ccc;                    /* Harmaa tähti oletuksena */
    transition: color 0.2s;
}

.stars .star:hover,
.stars .star.active {
    color: gold;                    /* Kultainen tähti hoverissa/aktiivisena */
}

/* ===================================================================
   ANIMAATIOT
   =================================================================== */
@keyframes fade {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* ===================================================================
   MEDIA QUERY: PIENET NÄYTÖT (alle 300px)
   =================================================================== */
@media only screen and (max-width: 300px) {
    .prev,
    .next,
    .text {
        font-size: 11px;            /* Pienempi teksti hyvin kapeilla näytöillä */
    }
}

/* ===================================================================
   MOBIILIVALIKKO (alle 768px)
   =================================================================== */
@media not all and (min-width: 768px) {
    header .collapsible-header {
        position: absolute;
        right: 0px;
        flex-direction: column;
        opacity: 0;
        height: 100dvh;
        width: 0vw;
        justify-content: space-between;
        padding: 5px;
        padding-top: 5%;
        padding-bottom: 5%;
        place-items: end;
        background-color: var(--accent); /* Mobiilivalikon tausta */
        color: white;
        overflow-y: scroll;
        transition: width 0.3s ease, opacity 0.3s ease;
    }

    .header-links {
        color: white;               /* Valkoinen teksti mobiilivalikossa */
    }
}

/* ===================================================================
   TAILWIND-APULUOKAT (CSS-muuttujien käyttö)
   =================================================================== */
/* Taustaväri päävärillä */
.tw-bg-accent {
    background-color: var(--accent);
}

/* Tekstin väri päävärillä */
.tw-text-accent {
    color: var(--accent);
}

/* Alleviivauksen väri päävärillä */
.tw-decoration-accent {
    text-decoration-color: var(--accent);
}

/* Reunuksen väri päävärillä */
.tw-border-accent {
    border-color: var(--accent);
}
