/* Variables para personalización */
:root {
    --dark-bg: #1a1a1a;
    --dark-text: #ffffff;
    --dark-accent: #ff8c00;
    --light-bg: #e8d5b9;
    --light-text: #4a2f1f;
    --light-accent: #a85e2e;
    --font-main: 'Arial', sans-serif;
}

/* Modo claro por defecto */
body {
    background-color: var(--light-bg);
    color: var(--light-text);
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(232, 213, 185, 0.9);
    z-index: 1000;
    box-sizing: border-box;
}

body.dark-mode .header {
    background: rgba(0, 0, 0, 0.9);
}

.theme-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--light-accent);
    cursor: pointer;
    order: 1;
    padding: 0;
    margin-right: 10px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

body.dark-mode .theme-btn {
    color: var(--dark-accent);
}

.theme-text {
    font-size: 0.9rem;
    display: inline;
    text-transform: uppercase;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--light-accent);
    cursor: pointer;
    order: 0;
    display: none;
}

body.dark-mode .menu-toggle {
    color: var(--dark-accent);
}

.menu-toggle.active {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.menu-text {
    font-size: 1rem;
    display: none;
}

.nav {
    order: 0;
    display: flex;
    align-items: center;
}

.nav a {
    color: var(--light-text);
    margin: 0 15px;
    text-decoration: none;
    font-weight: 500;
}

body.dark-mode .nav a {
    color: var(--dark-text);
}

.nav a:hover {
    color: var(--light-accent);
}

body.dark-mode .nav a:hover {
    color: var(--dark-accent);
}

/* Contenedor general */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Main */
main {
    flex: 1 0 auto;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.profile-pic {
    width: 140px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    margin: 0;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Secciones */
.section {
    padding: 80px 0;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--light-accent);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    margin: 10px 0;
}

body.dark-mode .btn {
    background-color: var(--dark-accent);
}

.btn:hover {
    background-color: #8c4a24;
}

body.dark-mode .btn:hover {
    background-color: #e07b00;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    background: rgba(232, 213, 185, 0.8);
    flex-shrink: 0;
}

body.dark-mode .footer {
    background: rgba(0, 0, 0, 0.8);
}

/* Responsividad */
@media (max-width: 768px) {
    .header {
        flex-direction: row;
        padding: 10px;
        align-items: flex-start;
    }
    .menu-toggle {
        display: flex;
        margin-left: 0;
        padding-left: 10px;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }
    .menu-text {
        display: inline;
    }
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(232, 213, 185, 0.9);
        position: absolute;
        top: 50px;
        left: 0;
        padding: 10px 0;
    }
    body.dark-mode .nav {
        background: rgba(0, 0, 0, 0.9);
    }
    .nav.active {
        display: flex;
    }
    .nav a {
        margin: 10px 0;
        text-align: center;
    }
    .theme-btn {
        margin-bottom: 0;
    }
    .theme-text {
        font-size: 1.0rem;
    }
}

/* Escritorio: Fijar la página en #hero y ocultar otras secciones solo en home-page */
@media (min-width: 769px) {
    body.home-page {
        height: 100vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* Distribuye header, main y footer */
    }

    body.home-page .hero {
        flex: 1; /* Ocupa el espacio disponible entre header y footer */
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: unset; /* Elimina la restricción de 100vh para que se ajuste */
    }

    body.home-page .section {
        display: none;
    }

    body.home-page main {
        flex: 1; /* Asegura que main ocupe el espacio central */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body.home-page .footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        z-index: 1000;
    }

    .header {
        position: fixed;
        top: 0;
        width: 100%;
    }
}

/* Móvil: Permitir scroll y animar secciones */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    .header {
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
    }

    main {
        padding-top: 60px;
    }

    .section, .hero {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .section.visible, .hero.visible {
        opacity: 1;
        transform: translateY(0);
    }
}