/* Variables de color globales */
:root {
    --color-background-page: #F5F5F5;
    --color-background-card: #FFFFFF;
    --color-background-dark: #1A1A1A;
    --color-background-light-hover: #EEEEEE;

    --color-primary-text: #333333;
    --color-secondary-text: #666666;
    --color-text-on-dark: #FFFFFF;
    --color-text-on-light: #333333;

    --color-accent: #3A5C3A;
    --color-accent-light: #5C875C;
    --color-accent-dark: #2A402A;

    --color-border: #E0E0E0;
    --color-focus-outline: rgba(58, 92, 58, 0.5);

    --font-family-title: 'Lora', serif;
    --font-family-body: 'Open Sans', sans-serif;

    --border-radius-base: 6px;
    --box-shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Importar fuentes de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@700&family=Open+Sans:wght@400;500;700&display=swap');
/* Importar Font Awesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');


/* ESTILOS GLOBALES DE BODY Y TIPOGRAFÍA */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    background-color: var(--color-background-page);
    display: flex;
    flex-direction: column;
    font-family: var(--font-family-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-primary-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex-grow: 1;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-title);
    font-weight: 700;
    color: var(--color-primary-text);
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    line-height: 1.2;
}

h1 {
    font-size: 3em;
}

h2 {
    font-size: 2.4em;
}

h3 {
    font-size: 2em;
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
    color: var(--color-accent-dark);
    transform: translateY(-1px);
}

a:focus {
    outline: 2px solid var(--color-focus-outline);
    outline-offset: 2px;
    border-radius: var(--border-radius-base);
}

/* ESTILOS GENÉRICOS DE BOTONES E INPUTS */
button,
input[type="submit"],
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius-base);
    cursor: pointer;
    font-family: var(--font-family-body);
    font-weight: 500;
    font-size: 1.05em;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    text-align: center;
    text-decoration: none;
}

button.primary,
.button.primary {
    background-color: var(--color-accent);
    color: var(--color-text-on-dark);
}

button.primary:hover,
.button.primary:hover {
    background-color: var(--color-accent-dark);
    transform: translateY(-2px);
}

button.secondary,
.button.secondary {
    background-color: var(--color-background-card);
    color: var(--color-primary-text);
    border: 1px solid var(--color-border);
}

button.secondary:hover,
.button.secondary:hover {
    background-color: var(--color-background-light-hover);
    transform: translateY(-2px);
}

button:focus,
input[type="submit"]:focus {
    outline: 2px solid var(--color-focus-outline);
    outline-offset: 2px;
    border-radius: var(--border-radius-base);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 13px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-base);
    background-color: var(--color-background-card);
    color: var(--color-primary-text);
    font-family: var(--font-family-body);
    font-size: 1.0em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
    color: var(--color-secondary-text);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-focus-outline);
}


/* ESTILOS PARA EL HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #F8F9FA;
    /* CAMBIO: Fondo del header a un blanco muy suave, más común en paneles de administración */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    /* CAMBIO: Sombra más pronunciada para el header */
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100vw;
    left: 0;
}

header a {
    text-decoration: none;
    color: var(--color-primary-text);
    /* CAMBIO: Enlaces del header en el color de texto principal */
}

.init-logo {
    width: 160px;
    height: auto;
    object-fit: contain;
    filter: none;
    transition: transform 0.2s ease;
}

.init-logo:hover {
    transform: scale(1.05);
}

header nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.search-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-section input {
    border: 1px solid #D1D9E6;
    /* CAMBIO: Borde del input de búsqueda más claro, acorde a UI de admin */
    border-radius: 25px;
    width: 250px;
    height: 42px;
    background-color: var(--color-background-card);
    /* CAMBIO: Fondo blanco puro para el input */
    padding: 0 20px;
    color: var(--color-primary-text);
    font-size: 0.95em;
}

.search-section input::placeholder {
    color: #9AA7B7;
    /* CAMBIO: Placeholder más suave */
}

.search-section input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-focus-outline);
}

.search-section button {
    background-color: transparent;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    padding: 0;
}

.search-section button img {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(0%);
    /* CAMBIO: Para asegurar que los iconos sean de un gris oscuro, no negros puros. */
}

.search-section button:hover {
    background-color: #E6EAF0;
    /* CAMBIO: Fondo de hover más sutil y gris azulado */
}

.search-section button:focus {
    outline: 2px solid var(--color-focus-outline);
    outline-offset: 2px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-button {
    background-color: transparent;
    border: 1px solid #D1D9E6;
    /* CAMBIO: Borde del botón de dropdown más claro */
    box-shadow: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dropdown-button img {
    width: 26px;
    height: 26px;
    filter: brightness(0) saturate(0%);
    /* CAMBIO: Icono de dropdown en gris oscuro */
}

.dropdown-button:hover {
    background-color: #E6EAF0;
    /* CAMBIO: Fondo de hover más sutil y gris azulado */
    border-color: var(--color-accent);
    transform: none;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background-color: var(--color-background-card);
    min-width: 200px;
    border: 1px solid #D1D9E6;
    /* CAMBIO: Borde del dropdown más claro */
    border-radius: var(--border-radius-base);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* CAMBIO: Sombra más definida */
    z-index: 100;
    overflow: hidden;
    padding: 10px 0;
}

.dropdown-content a,
.dropdown-content p,
.logout-button {
    display: block;
    padding: 14px 25px;
    text-decoration: none;
    color: var(--color-primary-text);
    margin: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-family-body);
    font-size: 1em;
}

.dropdown-content a:hover,
.dropdown-content p:hover {
    background-color: #F0F2F5;
    /* CAMBIO: Fondo de hover más suave y gris */
    color: var(--color-primary-text);
}

.logout-button {
    color: #e74c3c;
    font-weight: 500;
}

.logout-button:hover {
    background-color: #F0F2F5;
    /* CAMBIO: Fondo de hover para logout */
    color: #c0392b;
}


/* ESTILOS PARA EL FOOTER */
footer {
    background-color: #000000; /* Fondo negro */
    color: #ffffff; /* Texto blanco */
    padding: 60px 40px;
    width: 100%;
    margin-top: auto;
    font-family: var(--font-family-body);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section {
    flex: 1; /* Permite que las secciones crezcan para ocupar el espacio */
    min-width: 200px;
}

.footer-section h3 {
    color: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 1.2em;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.footer-section ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #aaaaaa;
}

.footer-section ul li i {
    font-size: 1.1em;
    margin-right: 15px;
    color: #ffffff;
}

.footer-section ul li p {
    margin: 0;
    font-size: 1em;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.social-links a {
    color: #ffffff;
    font-size: 2em;
    transition: color 0.3s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: #aaaaaa;
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    font-size: 0.9em;
}

.footer-bottom p {
    margin: 0;
    color: #aaaaaa;
}

.legal-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.legal-links a {
    color: #aaaaaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: #ffffff;
}

.legal-links span {
    color: #aaaaaa;
}
/* MEDIA QUERIES GLOBALES */
/* MEDIA QUERIES GLOBALES */
@media (max-width: 1200px) {
    main {
        padding: 20px 0;
    }
}

@media (max-width: 1024px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2.8em;
    }

    h2 {
        font-size: 2.2em;
    }

    h3 {
        font-size: 1.8em;
    }

    header {
        padding: 15px 20px;
    }

    .init-logo {
        width: 150px;
    }

    .search-section input {
        width: 180px;
        height: 40px;
    }

    .search-section button {
        width: 40px;
        height: 40px;
    }

    .search-section button img {
        width: 22px;
        height: 22px;
    }

    .dropdown-button {
        width: 45px;
        height: 45px;
    }

    .dropdown-button img {
        width: 24px;
        height: 24px;
    }

    .dropdown-content {
        min-width: 180px;
    }

    .dropdown-content a,
    .dropdown-content p,
    .logout-button {
        padding: 12px 20px;
        font-size: 0.95em;
    }

    main {
        padding: 15px 0;
    }
    
    footer {
        padding: 40px 20px;
        font-size: 0.9em;
    }
    
    /* Ajustes específicos del footer para 1024px */
    footer nav {
        flex-direction: row; /* Mantener horizontal en tablets */
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .main-info, .navegation-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navegation-footer .social-media {
        display: flex;
        flex-direction: row;
        gap: 15px;
    }

    .navegation-footer button {
        width: 45px;
        height: 45px;
    }

    .navegation-footer img {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        padding: 15px;
        gap: 15px;
    }

    header nav {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .search-section {
        width: 100%;
        max-width: 300px;
    }

    .search-section input {
        width: calc(100% - 55px);
        max-width: none;
    }

    .dropdown {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .dropdown-content {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        min-width: 220px;
    }
    
    /* Ajustes específicos del footer para 768px */
    footer {
        padding: 30px 15px;
        text-align: center;
    }
    
    footer nav {
        flex-direction: column; /* Apilar en dispositivos móviles */
        align-items: center; /* Centrar las columnas */
        gap: 30px;
    }
    
    .main-info, .navegation-footer {
        align-items: center; /* Centrar el contenido de cada columna */
    }
    
    .navegation-footer .social-media {
        justify-content: center; /* Centrar los iconos de redes sociales */
        gap: 15px;
    }

    .navegation-footer button {
        width: 50px;
        height: 50px;
    }
    
    .navegation-footer img {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .init-logo {
        width: 120px;
    }

    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.8em;
    }

    h3 {
        font-size: 1.5em;
    }

    .search-section input {
        height: 38px;
        font-size: 0.85em;
    }

    .search-section button {
        width: 38px;
        height: 38px;
    }

    .search-section button img {
        width: 20px;
        height: 20px;
    }

    .dropdown-button {
        width: 42px;
        height: 42px;
    }

    .dropdown-button img {
        width: 22px;
        height: 22px;
    }

    .dropdown-content {
        min-width: 160px;
        font-size: 0.9em;
    }

    .dropdown-content a,
    .dropdown-content p,
    .logout-button {
        padding: 10px 15px;
    }
}