/*
 * Markus Haapasaari / Kaupunkilehti Kalajokinen
 * Kuvaus: Oskari Itävuori -yhtyeen täydellinen, kokonainen ja jakamaton tyylitiedosto.
 * Sisältää: Resetin, Header-bändikuvan (bandi.jpeg), logon sijoittelun ja kaikkien moduulien tyylit.
 * Tehty <3 Kalajoella.
 */

/* 1. AGGRESSIIVINEN NOLLAUS - Kaikki selaimen oletukset ja siniset linkit pois */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

a, a:link, a:visited, a:active {
    color: #ffffff !important;
    text-decoration: none !important;
    outline: none !important;
    border: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #d91e1e !important;
}

ul {
    list-style: none !important;
}

/* 2. MUUTTUJAT */
:root {
    --bg-color: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-red: #d91e1e;
    --accent-yellow: #f2c100;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Oswald', sans-serif;
    --transition-speed: 0.3s;
}

/* 3. PERUSRAKENNE */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 4. HEADER JA BÄNDIKUVA TAUSTALLA */
#main-header {
    position: relative;
    min-height: 550px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-bottom: 4px solid var(--accent-red);
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Käytetään bandi.jpeg-kuvaa, feidataan se alaosasta mustaan */
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(13, 13, 13, 1)), url('../bandi.jpeg');
    background-size: cover;
    background-position: center 25%;
    z-index: -1;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 10;
    padding: 25px 0;
    /* vielä vaaleampi yläpalkki logon tekstin erottuvuuden parantamiseksi */
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
}

/* Mobile toggle (hamburger) styling */
.mobile-toggle {
    display: none;
    width: 40px;
    height: 28px;
    gap: 4px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.mobile-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* ensure hamburger is on top and receives taps */
.mobile-toggle { z-index: 300; pointer-events: auto; -webkit-tap-highlight-color: transparent; }

.logo-area {
    display: inline-block;
    background: rgba(255,255,255,0.02);
    padding: 6px 10px;
    border-radius: 8px;
}

.main-logo {
    height: 100px;
    width: auto;
    display: block;
    filter: drop-shadow(0 8px 30px rgba(0,0,0,0.9)) contrast(1.15);
}

.main-logo {
    height: 100px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 20px rgba(0,0,0,1));
}

#main-menu {
    display: flex;
    gap: 35px;
}

.nav-link {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.1rem;
    position: relative;
    padding: 10px 0;
    text-shadow: 2px 2px 10px rgba(0,0,0,1);
    cursor: pointer;
}

.nav-link.active, .nav-link:hover {
    color: var(--accent-red) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-red);
    transition: width var(--transition-speed);
}

.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}

/* 5. GLOBAALIT MODUULIOSAT */
.separator {
    width: 120px;
    height: 4px;
    background: var(--accent-red);
    margin: 30px auto;
    border: none;
}

.red-bg { background: var(--accent-red) !important; }
.yellow-bg { background: var(--accent-yellow) !important; }

#page-loader {
    padding: 60px 0;
    min-height: 50vh;
    transition: opacity var(--transition-speed) ease-in-out;
}

.fade-in { animation: fadeIn 0.5s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 6. MUSIIKKIOSIO (MUSIC.PHP) */
.accent-text-yellow { color: var(--accent-yellow); font-size: 3.5rem; text-align: center; }
.release-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-left: 6px solid var(--accent-yellow);
    margin-top: 40px;
}
.release-art img { width: 100%; height: auto; border-radius: 4px; }
.stream-link { border-bottom: 2px solid var(--accent-yellow); padding-bottom: 5px; margin-right: 15px; }

/* 6. MUSIIKKIOSIO (MUSIC.PHP) */
.disco-thumb { position: relative; }
.play-overlay {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.play-overlay svg { width: 16px; height: 16px; fill: var(--accent-yellow); }
.play-overlay:focus { outline: none; box-shadow: 0 0 0 3px rgba(242,193,0,0.15); }
.disco-thumb.playing .play-overlay { transform: scale(1.05); }

/* release-art specific */
.release-art { position: relative; }
.release-art .play-overlay {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
}
.release-art .play-overlay svg { width: 20px; height: 20px; }
.release-art.playing .play-overlay { transform: scale(1.08); }
/* 7. KEIKKAOSIO (GIGS.PHP) */
.gig-item {
    display: flex;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.gig-date { min-width: 120px; text-align: center; }
.gig-date .day { font-size: 3rem; color: var(--accent-red); font-family: var(--font-heading); line-height: 1; }
.gig-details { flex-grow: 1; padding: 0 40px; }
.btn-small { border: 2px solid var(--accent-red); padding: 10px 25px; font-family: var(--font-heading); }

/* 8. YHTEYSTIETO-OSIO (CONTACT.PHP) */
.contact-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; }
.modern-form { background: rgba(255, 255, 255, 0.02); padding: 40px; border: 1px solid rgba(255, 255, 255, 0.05); }
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 10px; color: var(--text-secondary); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 15px; background: #1a1a1a; border: 1px solid #333; color: #fff; font-family: inherit;
}
.btn-primary {
    background: var(--accent-red); border: none; padding: 20px; color: #fff !important;
    font-family: var(--font-heading); text-transform: uppercase; font-size: 1.2rem; cursor: pointer;
}

/* 9. FOOTER */
#main-footer {
    padding: 100px 0;
    background: #000;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.coords-display { font-family: var(--font-heading); font-size: 1.5rem; color: var(--accent-red); margin-bottom: 10px; }

/* 10. MOBIILI */
@media (max-width: 768px) {
    #main-header { min-height: 350px; overflow: visible; }
    .main-logo { height: 70px; }
    /* display hamburger on tablet/phone */
    .mobile-toggle { display: flex; }
    #main-menu {
        display: none;
        flex-direction: column;
        /* make the mobile menu fullscreen and scrollable so it never gets clipped */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.975);
        padding: 90px 20px 30px 20px;
        box-sizing: border-box;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        align-items: flex-start;
        gap: 18px;
        z-index: 9999;
        transform: translateY(-6%);
        transition: transform 220ms ease;
    }
    /* force-show and slide into place when active */
    #main-menu.active { display: flex !important; transform: translateY(0) !important; }
    .contact-grid, .release-feature { grid-template-columns: 1fr; }
    .gig-item { flex-direction: column; text-align: center; gap: 20px; }
}

/* Extra mobile tightening to reduce scrolling on small screens */
@media (max-width: 600px) {
    #main-header { min-height: 220px; }
    .main-logo { height: 40px; }
    .hero-logo { max-width: 220px; margin-bottom: 1rem; }
    .grid-2-col { grid-template-columns: 1fr; gap: 24px; padding: 40px 0; }
    .feature-img { height: auto; max-height: 160px; object-fit: contain; }
    .release-feature { padding: 18px; gap: 18px; }
    .release-art img { max-width: 84px; height: auto; }
    .release-info h3 { font-size: 1.6rem; }
    .release-description { font-size: 0.95rem; line-height: 1.4; }
    .stream-link, .mini-link { padding: 8px 12px; font-size: 0.8rem; }
    .discography-grid { gap: 18px; }
    .disco-item { padding: 14px; }
    .disco-thumb img { height: 64px; width: auto; }
    .media-grid { gap: 12px; }
    .media-card img { height: 64px; }
    .btn { padding: 12px 18px; }
    .hero-actions { gap: 12px; margin-top: 1rem; }
    .nav-wrapper { padding: 14px 0; }
    .logo-area { padding: 4px 8px; border-radius:6px; }
}

/* Extra small screens */
@media (max-width: 420px) {
    #main-header { min-height: 200px; }
    .main-logo { height: 36px; }
    .release-art img { max-width: 72px; }
    .disco-thumb img { height: 56px; }
    .media-card img { height: 56px; }
    .release-feature { gap: 10px; padding: 10px; }
    /* make menu buttons and links a bit tighter */
    #main-menu { padding: 20px 14px; }
    .nav-link { font-size: 0.95rem; }
}

@media (max-width: 360px) {
    .main-logo { height: 32px; }
    .release-art img { max-width: 64px; }
    .disco-thumb img { height: 48px; }
    .media-card img { height: 48px; }
    .nav-link { font-size: 0.9rem; }
}
