/* =============================================
   KUNNONPAIKKA DEMO – Layout (Header, Footer, Nav)
   ============================================= */

/* HEADER */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
}

.logo-sub {
    font-family: 'Livvic', sans-serif;
    font-size: 0.68rem;
    font-weight: 400;
    display: block;
    color: var(--gray-500);
    letter-spacing: 0.5px;
}

/* NAVIGATION */
.nav-main {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-main a {
    text-decoration: none;
    color: var(--gray-800);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-main a:hover,
.nav-main a.active {
    background: var(--gray-100);
    color: var(--primary);
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    cursor: pointer;
}

.nav-dropdown-trigger::after {
    content: ' \25BE';
    font-size: 0.7em;
    opacity: 0.5;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    min-width: 160px;
    padding: 8px 0;
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu.touch-open {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 0.85rem;
    color: var(--gray-800);
    border-radius: 0;
}

.nav-dropdown-menu a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-lang {
    position: relative;
    margin-left: 4px;
}

.nav-lang-current {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
}

.nav-lang-current:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    min-width: 120px;
    padding: 6px 0;
    z-index: 100;
}

.nav-lang:hover .nav-lang-menu {
    display: block;
}

.nav-lang-menu a {
    display: block;
    padding: 8px 16px;
    font-size: 0.82rem;
    color: var(--gray-800);
    text-decoration: none;
    border-radius: 0;
}

.nav-lang-menu a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-main .nav-login {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-left: 4px;
}

.nav-main .nav-login:hover {
    color: var(--primary-light);
}

.nav-main .nav-cta {
    background: var(--primary);
    color: var(--white);
    margin-left: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
}

.nav-main .nav-cta:hover {
    background: var(--primary-light);
    color: var(--white);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--primary);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(2,77,77,0.7) 0%, rgba(3,102,102,0.6) 40%, rgba(4,138,138,0.5) 100%),
                url('https://images.unsplash.com/photo-1540979388789-6cee28a1cdc9?w=1600&q=80') center top/cover no-repeat;
    position: relative;
    padding-top: 72px;
}

.hero::after {
    display: none;
}

.hero-content {
    text-align: center;
    color: var(--white);
    padding: 60px 24px;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 16px;
}

.hero h1 em {
    font-family: 'Dancing Script', cursive;
    font-style: normal;
    color: var(--highlight);
}

.hero p {
    color: rgba(255,255,255,0.88);
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 520px;
    margin: 0 auto 32px;
}

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

/* Hero Search Bar */
.hero-search {
    display: flex;
    align-items: stretch;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 60px;
    overflow: hidden;
    max-width: 600px;
    width: 100%;
    margin-top: 36px;
}

.hero-search-field {
    flex: 1;
    padding: 12px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.hero-search-field label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 2px;
}

.hero-search-field input,
.hero-search-field select {
    border: none;
    outline: none;
    font-family: 'Livvic', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--white);
    background: transparent;
    padding: 0;
    cursor: pointer;
}

/* Hide native date picker icon */
.hero-search-field input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
}

.hero-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: var(--white);
    color: var(--primary);
    border: none;
    font-family: 'Livvic', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.hero-search-btn:hover {
    background: var(--highlight);
    color: var(--primary-dark);
}

.hero-guests-picker {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-guests-picker span {
    font-family: 'Livvic', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--white);
    min-width: 14px;
    text-align: center;
}

.guest-minus,
.guest-plus {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.35);
    background: transparent;
    color: var(--white);
    font-size: 0.9rem;
    font-family: 'Livvic', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
    line-height: 1;
}

.guest-minus:hover,
.guest-plus:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.15);
}

/* PAGE TOP (for subpages) */
.page-top {
    padding-top: 140px;
    padding-bottom: 60px;
    background: linear-gradient(160deg, rgba(2,77,77,0.88) 0%, rgba(3,102,102,0.78) 50%, rgba(4,138,138,0.68) 100%),
                url('https://images.unsplash.com/photo-1540979388789-6cee28a1cdc9?w=1600&q=80') center bottom/cover no-repeat;
    border-bottom: none;
}

.page-top h1 {
    color: var(--white);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.page-top p {
    margin-top: 8px;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
}

/* FOOTER */
.site-footer {
    background: var(--gray-800);
    color: rgba(255,255,255,0.75);
    padding: 60px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.footer-col p,
.footer-col a {
    font-size: 0.85rem;
    line-height: 2;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    display: block;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-logo {
    text-align: center;
    padding-bottom: 24px;
}

.footer-logo .logo {
    font-size: 1.6rem;
}

.footer-logo .logo-sub {
    font-size: 0.7rem;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
}

/* DEMO BADGE */

/* NOTIFICATION */
.notification {
    position: fixed;
    top: 84px;
    right: 24px;
    background: var(--white);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transform: translateX(120%);
    transition: var(--transition);
    max-width: 360px;
}

.notification.show {
    transform: translateX(0);
}

.notification h4 {
    color: var(--primary);
    font-size: 0.88rem;
    margin-bottom: 2px;
}

.notification p {
    font-size: 0.82rem;
    color: var(--gray-600);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-toggle { display: block; }

    .nav-main {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--gray-200);
    }

    .nav-main.open { display: flex; }
    .nav-main a { width: 100%; text-align: center; padding: 12px; }
    .nav-main .nav-cta { margin-left: 0; margin-top: 8px; }

    .hero { min-height: 70vh; }
    .hero-content { padding: 40px 16px; }
    .page-top { padding-top: 100px; }

    /* Otsikko: pakota rivinvaihto ennen em-elementtiä */
    .hero h1 em {
        display: block;
    }

    .hero-search {
        flex-direction: column;
        border-radius: var(--radius);
        max-width: 320px;
        width: 90%;
    }
    .hero-search-field {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        padding: 12px 20px;
    }
    /* Vieraat-kenttä: keskitä picker */
    .hero-guests-picker {
        justify-content: center;
    }
    .hero-search-btn {
        justify-content: center;
        padding: 16px;
        border-radius: 0 0 var(--radius) var(--radius);
    }

    /* Mobiili-dropdown: tilaa ympärille */
    .nav-dropdown {
        width: 100%;
        border-top: 1px solid var(--gray-100);
        border-bottom: 1px solid var(--gray-100);
        padding: 4px 0;
    }
    .nav-dropdown-trigger {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    .nav-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--gray-50);
        border-radius: var(--radius-sm);
        padding: 4px 0;
        margin: 0 8px 4px;
    }
    .nav-dropdown-menu a {
        padding: 10px 12px;
        text-align: center;
        font-size: 0.84rem;
    }
}
