/* ========================================
   Ernesto Acher - Sitio Homenaje
   Recreación fiel del diseño 2008
   ======================================== */

/* ========== CSS RESET ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

ul, ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
}

/* ========== CSS VARIABLES ========== */
:root {
    /* Colores principales - extraídos del sitio original */
    --color-background: #0d0d0d;
    --color-wine: #6B1C23;
    --color-wine-dark: #4A1117;
    --color-text: #ffffff;
    --color-text-dim: #cccccc;
    --color-silver: #d4d4d4;

    /* Tipografía */
    --font-logo: 'Great Vibes', cursive;
    --font-menu: 'Crimson Text', Georgia, serif;
    --font-body: Georgia, 'Times New Roman', serif;

    /* Tamaños */
    --logo-size: 4rem;
    --menu-size: 1.1rem;
    --text-size: 0.85rem;

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* ========== BASE STYLES ========== */
html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.5;
}

/* ========== SITE CONTAINER ========== */
.site-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ========== HEADER / LOGO ========== */
.site-header {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.logo {
    font-family: var(--font-logo);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 400;
    color: var(--color-silver);
    text-shadow:
        1px 1px 2px rgba(0,0,0,0.5),
        0 0 20px rgba(212, 212, 212, 0.3);
    letter-spacing: 2px;
    white-space: nowrap;
}

/* Cintas/pañuelo decorativo bajo el logo */
.logo-ribbon {
    width: 200px;
    height: 20px;
    margin: 0.5rem auto 0;
    position: relative;
}

.logo-ribbon::before,
.logo-ribbon::after {
    content: '';
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-silver) 20%,
        var(--color-silver) 80%,
        transparent 100%);
    opacity: 0.6;
}

.logo-ribbon::before {
    width: 100%;
    top: 0;
    left: 0;
}

.logo-ribbon::after {
    width: 60%;
    top: 8px;
    left: 20%;
}

/* ========== MAIN CONTENT LAYOUT ========== */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 1fr;
    position: relative;
    padding-top: 15%;
}

/* ========== ELIPSE DECORATIVA ========== */
.ellipse-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center,
        var(--color-wine) 0%,
        var(--color-wine-dark) 60%,
        transparent 70%);
    opacity: 0.9;
    z-index: 1;
    pointer-events: none;
}

/* Borde curvo de la elipse */
.ellipse-bg::before {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    right: -5%;
    bottom: -5%;
    border-radius: 50%;
    border: 3px solid var(--color-wine);
    opacity: 0.4;
}

/* ========== MENÚ PRINCIPAL (IZQUIERDA) ========== */
.menu-principal {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    padding-left: 5%;
}

.menu-principal ul {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.menu-principal li {
    text-align: right;
}

.menu-principal a {
    font-family: var(--font-menu);
    font-size: clamp(0.8rem, 1.2vw, 1.1rem);
    color: var(--color-text);
    transition: all var(--transition-fast);
    display: inline-block;
    padding: 0.2rem 0;
    position: relative;
}

.menu-principal a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-silver);
    transition: width var(--transition-normal);
}

.menu-principal a:hover {
    color: var(--color-silver);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.menu-principal a:hover::after {
    width: 100%;
}

.menu-principal a.active {
    color: var(--color-silver);
}

/* ========== CARRUSEL CENTRAL ========== */
.carousel-container {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
}

.carousel {
    width: 100%;
    max-width: 350px;
    position: relative;
}

.carousel-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: justify;
    animation: fadeIn 0.5s ease;
}

.carousel-slide.active {
    display: flex;
}

.carousel-slide img {
    width: 200px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.carousel-text {
    font-family: var(--font-body);
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    color: var(--color-text-dim);
    line-height: 1.6;
    text-align: justify;
    max-width: 280px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== FOTO DE ERNESTO ========== */
.ernesto-photo {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8;
    pointer-events: none;
}

.ernesto-photo img {
    max-height: 70vh;
    width: auto;
    filter: drop-shadow(0 0 30px rgba(0,0,0,0.8));
}

/* ========== MENÚ MEDIA (DERECHA) ========== */
.menu-media {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 5%;
}

.menu-media ul {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.menu-media li {
    text-align: left;
}

.menu-media a {
    font-family: var(--font-menu);
    font-size: clamp(0.85rem, 1.3vw, 1.15rem);
    color: var(--color-text);
    transition: all var(--transition-fast);
    display: inline-block;
    padding: 0.2rem 0;
    position: relative;
}

.menu-media a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-silver);
    transition: width var(--transition-normal);
}

.menu-media a:hover {
    color: var(--color-silver);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.menu-media a:hover::after {
    width: 100%;
}

/* ========== FOOTER ========== */
.site-footer {
    position: absolute;
    bottom: 3%;
    right: 5%;
    z-index: 10;
    text-align: right;
    font-size: 0.65rem;
    color: var(--color-text-dim);
}

.update-link {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.update-link:hover {
    opacity: 1;
}

.archive-link {
    display: block;
    font-size: 0.55rem;
    opacity: 0.5;
    font-style: italic;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .ernesto-photo {
        right: 5%;
    }

    .ernesto-photo img {
        max-height: 60vh;
    }
}

@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr 1.5fr 1fr;
    }

    .carousel {
        max-width: 280px;
    }

    .ernesto-photo {
        right: 2%;
    }

    .ernesto-photo img {
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow: auto;
    }

    .site-container {
        height: auto;
        min-height: 100vh;
    }

    .main-content {
        display: flex;
        flex-direction: column;
        padding-top: 20%;
        gap: 2rem;
    }

    .site-header {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        padding: 2rem 1rem;
    }

    .menu-principal,
    .menu-media {
        padding: 1rem 2rem;
        justify-content: center;
    }

    .menu-principal ul,
    .menu-media ul {
        text-align: center;
    }

    .menu-principal li,
    .menu-media li {
        text-align: center;
    }

    .carousel-container {
        order: -1;
        padding: 1rem;
    }

    .ernesto-photo {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        display: flex;
        justify-content: center;
        padding: 2rem;
    }

    .ernesto-photo img {
        max-height: 50vh;
        max-width: 80%;
    }

    .ellipse-bg {
        display: none;
    }

    .site-footer {
        position: relative;
        bottom: auto;
        right: auto;
        text-align: center;
        padding: 2rem;
    }
}

/* ========== UTILITIES ========== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
