/*
Theme Name: Dennis Rönngård Onepage
Author: Din Studio
Description: Perfekt placerad språkväljare för både dator och mobil.
Version: 13.0
*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color, #2d3748);
    background-color: var(--bg-color, #faf9f6);
    line-height: 1.6;
}

/* Base structural elements */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-music-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: var(--music-bg-opacity, 0.12);
    pointer-events: none;
    background-repeat: repeat;
    background-position: center;
}

/* ==========================================
   1. DATORVY (> 900px)
   ========================================== */
@media (min-width: 901px) {
    .hero-section {
        min-height: 100vh;
        display: flex;
        align-items: center;
        padding: 4rem 2rem;
    }

    .hero-bg-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 50%;
        height: 100%;
        object-fit: contain;
        object-position: left center;
        z-index: 1;
        opacity: var(--img-opacity, 0.85);
    }

    .hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        pointer-events: none;
        background: linear-gradient(
            to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.15) 30%,
            rgba(255, 255, 255, 0.85) 55%,
            rgba(255, 255, 255, 1) 100%
        );
    }

    .hero-container {
        position: relative;
        z-index: 3;
        max-width: 1200px;
        width: 100%;
        margin: 0 auto;
        display: flex;
        justify-content: flex-end;
    }

    .hero-content {
        max-width: 650px;
        width: 100%;
        text-align: right;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    /* DATOR: Språkväljaren högerjusterad direkt ovanför rubriken */
    .lang-switcher-container {
        position: relative;
        top: auto;
        right: auto;
        display: inline-flex;
        gap: 0.3rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 0.35rem 0.5rem;
        border-radius: 30px;
        border: 1.5px solid var(--accent-color, #967d54);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
        margin-bottom: 1.2rem;
        align-self: flex-end;
        z-index: 5;
    }

    .hero-content h1 {
        font-size: 3rem;
        letter-spacing: 2px;
        margin-bottom: 1.5rem;
        color: var(--title-color, #1a202c);
        font-weight: 400;
        text-align: right;
        width: 100%;
    }

    .hero-content .hero-bio {
        font-size: 1.05rem;
        color: var(--text-color, #4a5568);
        margin-bottom: 2.5rem;
        line-height: 1.8;
        white-space: pre-line;
        text-align: right;
        width: 100%;
    }

    .hero-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 1.2rem;
        flex-wrap: wrap;
        width: 100%;
    }
}

/* ==========================================
   2. MOBILVY (<= 900px)
   ========================================== */
@media (max-width: 900px) {
    .hero-section {
        display: flex;
        flex-direction: column;
        padding: 0;
        min-height: auto;
        position: relative;
    }

    /* MOBIL: Språkväljaren fastlåst i absolut övre högra hörnet på hela hero-sektionen */
    .hero-container {
        position: static;
        width: 100%;
        padding: 1rem 1.25rem 3rem;
    }

    .hero-content {
        position: static;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .lang-switcher-container {
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 30;
        display: inline-flex;
        gap: 0.25rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 0.3rem 0.5rem;
        border-radius: 30px;
        border: 1.5px solid var(--accent-color, #967d54);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        margin-bottom: 0;
        align-self: auto;
    }

    .hero-image-box {
        position: relative;
        width: 100%;
        height: 52vh;
        min-height: 320px;
        max-height: 460px;
        overflow: hidden;
    }

    .hero-bg-image {
        position: relative;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        display: block;
        opacity: 1;
    }

    .hero-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 50%;
        pointer-events: none;
        background: linear-gradient(
            to bottom,
            rgba(250, 249, 246, 0) 0%,
            rgba(250, 249, 246, 0.7) 60%,
            var(--bg-color, #faf9f6) 100%
        );
        z-index: 2;
    }

    .hero-content h1 {
        font-size: 2.1rem;
        letter-spacing: 1px;
        text-align: center;
        margin-bottom: 1rem;
        color: var(--title-color, #1a202c);
        font-weight: 400;
        width: 100%;
    }

    .hero-content .hero-bio {
        font-size: 1rem;
        line-height: 1.7;
        text-align: center;
        margin-bottom: 2rem;
        color: var(--text-color, #4a5568);
        white-space: pre-line;
        width: 100%;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        width: 100%;
    }

    .btn {
        width: 100%;
        padding: 0.95rem 1.5rem;
    }
}

/* ==========================================
   3. GEMENSAMMA KOMPONENTER
   ========================================== */
.lang-btn {
    background: transparent;
    border: none;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-color, #4a5568);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
}

.lang-btn:hover {
    color: var(--accent-color, #967d54);
}

.lang-btn.active {
    background-color: var(--accent-color, #967d54);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(150, 125, 84, 0.3);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color, #967d54);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(150, 125, 84, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(150, 125, 84, 0.4);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.85);
    color: var(--text-color, #4a5568);
    border: 1px solid #cbd5e0;
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    border-color: var(--accent-color, #967d54);
    color: var(--accent-color, #967d54);
    transform: translateY(-2px);
}

.instagram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--accent-color, #967d54);
    border: 1px solid #cbd5e0;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    flex-shrink: 0;
}

.instagram-btn:hover {
    color: #ffffff;
    background-color: var(--accent-color, #967d54);
    border-color: var(--accent-color, #967d54);
    transform: translateY(-2px);
}

.instagram-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.contact-box {
    display: none;
    margin-top: 2.5rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    width: 100%;
}

@media (min-width: 901px) {
    .contact-box { text-align: right; }
    .contact-info { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-end; }
}

@media (max-width: 900px) {
    .contact-box { padding: 1.5rem 1.25rem; text-align: center; border-radius: 14px; }
    .contact-box h3 { font-size: 1.3rem; text-align: center; }
    .contact-info { display: flex; flex-direction: column; gap: 0.8rem; align-items: center; }
}

.contact-box.active {
    display: block;
}

.contact-box h3 {
    color: var(--title-color, #1a202c);
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.contact-card-item {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.05rem;
    color: var(--text-color, #4a5568);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    background: rgba(245, 245, 247, 0.9);
    border-radius: 30px;
    transition: all 0.2s ease;
    word-break: break-all;
}

.contact-card-item:hover {
    background: var(--accent-color, #967d54);
    color: #ffffff;
}

.contact-extra-text {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-color, #4a5568);
    line-height: 1.6;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.site-footer {
    background-color: var(--footer-bg, #1a202c);
    color: var(--footer-text, #a0aec0);
    padding: 2.5rem 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    position: relative;
    z-index: 5;
    width: 100%;
}
