/*
Theme Name: Vilaseca Theme
Theme URI: https://vilaseca.losabe.blog
Author: Antigravity
Description: Tema personalizado con sidebar 30/70 y cabecera responsiva dinámica.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: vilaseca-theme
*/

/* Reset & Base */
* { box-sizing: border-box; }
body, html {
    margin: 0; padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f4f4f4;
}

/* 2-AREA STRUCTURE (Strictly 2 divs in body) */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* AREA 1: SIDEBAR / HEADER */
#componente-header {
    width: 100%;
    position: relative;
    aspect-ratio: 839 / 335;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #eee;
    overflow: hidden;
}

/* Background Layer for Mobile */
#componente-header::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: var(--bg-layer, none);
    background-size: 100% auto;
    background-position: center top;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
    pointer-events: none;
    z-index: 2; /* Between button images and text */
}

.logo-container {
    padding: 3vw 2vw;
    position: relative;
    z-index: 10;
}

.logo-container img {
    max-width: 40vw;
    height: auto;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.3));
}

.botones-container {
    display: flex;
    justify-content: center;
    gap: 4vw;
    padding: 0;
    position: relative;
    z-index: 5;
    margin-bottom: -1px; /* Stick to bottom */
    align-items: flex-end;
}

.nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease;
    line-height: 0;
}

.nav-btn img {
    height: 7vw;
    width: auto;
    border-radius: 1.5vw;
    display: block;
    position: relative;
    z-index: 1; /* Below bg layer */
}

.nav-btn span {
    position: absolute;
    color: #fff;
    font-size: 3vw;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    z-index: 3; /* Above bg layer */
}

/* Hidden links in mobile */
.sidebar-links {
    display: none;
}

/* AREA 2: MAIN CONTENT */
.main-content {
    width: 100%;
    flex: 1;
    background-color: #fff;
    padding: 20px;
}

/* MONITOR VIEW (30/70) */
@media (min-width: 1024px) {
    body, html {
        height: 100vh;
        overflow: hidden;
    }

    .site-wrapper {
        flex-direction: row;
        height: 100vh;
    }

    /* AREA 1: SIDEBAR (30%) */
    #componente-header {
        width: 30%;
        height: 100vh;
        aspect-ratio: auto;
        background-color: #d1d1d1;
        padding: 40px 30px;
        justify-content: space-between;
        z-index: 20;
        box-shadow: 4px 0 15px rgba(0,0,0,0.05);
    }

    #componente-header::after { display: none; } /* No dynamic BG in sidebar */

    .logo-container {
        padding: 0;
        text-align: center;
    }

    .logo-container img {
        max-width: 20vw;
    }

    .botones-container {
        flex-direction: column;
        gap: 20px;
        padding: 0;
        margin-bottom: 0;
        align-items: stretch;
        justify-content: flex-start;
        flex-grow: 1;
        margin-top: 40px;
    }

    .nav-btn img {
        height: auto;
        width: 100%;
        max-width: 25vw;
        border-radius: 1vw;
        z-index: 10;
    }

    .nav-btn span {
        font-size: 1.3vw;
        text-transform: uppercase;
        letter-spacing: 0.1vw;
        z-index: 11;
    }

    /* Links at bottom of sidebar */
    .sidebar-links {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
        padding-top: 20px;
        border-top: 1px solid #bbb;
    }

    .sidebar-links a {
        color: #555;
        text-decoration: none;
        font-size: 1vw;
        font-weight: 500;
        transition: color 0.2s;
    }

    .sidebar-links a:hover { color: #000; }

    /* AREA 2: MAIN CONTENT (70%) */
    .main-content {
        width: 70%;
        height: 100vh;
        overflow-y: auto;
        padding: 60px 80px;
    }

    .entry-title {
        font-size: 48px;
        text-align: center;
        margin-bottom: 50px;
    }
}
