/* ==========================================================
   VARIABLES
   ========================================================== */


:root {

    /* Colores corporativos */

    --color-primary: #00414e;          /* Verde corporativo */
    --color-primary-dark: #002d36;     /* Verde más oscuro para hover */

    --color-secondary: #ef9123;        /* Naranja corporativo */

    --color-accent: #ffdf00;           /* Amarillo corporativo */

    /* Texto */

    --color-text: #00414e;             /* Excelente contraste sobre blanco */
    --color-muted: #4f5b62;            /* Texto secundario */

    /* Fondos */

    --color-background: #ffffff;       /* Blanco */
    --color-surface: #f8f9f7;          /* Gris muy claro */

    /* Bordes */

    --color-border: #cfd8dc;

    --container-width: 1200px;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    --radius: 0.5rem;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ==========================================================
   RESET
   ========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {

    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 1rem;
    line-height: 1.6;

    color: var(--color-text);
    background: var(--color-background);
}

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

/* Enlaces */

a {
    color: var(--color-primary);
	text-decoration: none;
}

a:hover,
a:focus {

    color:
        var(--color-secondary);
    text-decoration:
        underline;
}


/* ==========================================================
   ESTRUCTURA
   ========================================================== */

.container {

    width: 100%;
    max-width: var(--container-width);

    margin: 0 auto;

    padding-left: 1rem;
    padding-right: 1rem;
}

.site-wrapper {

    display: flex;
    flex-direction: column;

    min-height: 100vh;
}

.site-content {
    flex: 1;
}

/* ==========================================================
   CABECERA
   ========================================================== */

.site-header {

   background: var(--color-primary);

    color: #ffffff;

    border-bottom: 4px solid
        var(--color-accent);
    padding: 1rem 0;
}

.site-header .container {

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.site-branding {

    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-name {

    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
}

/* ==========================================================
   NAVEGACIÓN
   ========================================================== */

.main-navigation {

    background: var(--color-secondary);
}

.main-menu {

    display: flex;
    flex-wrap: wrap;

    gap: 0.5rem;

    list-style: none;

    margin: 0;
    padding: 0;
}

.main-menu a,
.submenu-toggle {

    display: block;

    color: #ffffff;

    padding: 1rem;

    background: transparent;
    border: 0;

    cursor: pointer;
}

.main-menu a:hover,
.main-menu a:focus,
.submenu-toggle:hover,
.submenu-toggle:focus {

    background:
        rgba(0, 65, 78, .15);

    color: var(--color-primary);
}

/* ==========================================================
   SUBMENÚS
   ========================================================== */

.menu-item-has-children {
    position: relative;
}

.sub-menu {

    display: none;

    position: absolute;

    min-width: 220px;

    background: #ffffff;

    border: 1px solid var(--color-border);

    box-shadow: var(--shadow);

    list-style: none;

    padding: 0;
    margin: 0;

    z-index: 100;
}

.sub-menu a {

    color: var(--color-text);

    padding: 0.75rem 1rem;
}

.sub-menu.submenu-open {
    display: block;
}

/* ==========================================================
   HERO
   ========================================================== */

.hero {

    padding: 4rem 0;

    background:
        linear-gradient(
            135deg,
            var(--color-primary),
            var(--color-primary-dark)
        );

    color: #ffffff;
}

.hero__content {

    max-width: 800px;
}

.hero h1 {

    margin-top: 0;

    font-size: 2.5rem;
}

.hero__description {

    font-size: 1.2rem;

    color: rgba(
        255,
        255,
        255,
        0.9
    );
}

/* ==========================================================
   BOTONES
   ========================================================== */

.btn {

    display: inline-block;

    padding: 0.75rem 1.25rem;

    border-radius: var(--radius);

    text-decoration: none;

    transition: 0.2s ease;
}

.btn-primary {

     background:
        var(--color-secondary);

    color:
        var(--color-primary);

    font-weight: 700;
}

.btn-primary:hover {

    background: var(--color-primary-dark);

    text-decoration: none;
}

.btn-secondary {
    background:
        var(--color-primary);

    color:
        #ffffff;
}

.btn-secondary:hover {

    background:
        var(--color-primary-dark);
}

.btn-outline {

    border: 2px solid var(--color-primary);

    color: var(--color-primary);
}

/* ==========================================================
   TARJETAS
   ========================================================== */

.card-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(280px, 1fr)
        );

    gap: 1.5rem;
}

.card {

    padding: 1.5rem;

    background: #ffffff;

    border: 1px solid var(--color-border);

    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

/* ==========================================================
   PÁGINAS
   ========================================================== */

.page-content {

    padding: 2rem 0;
}

.page-header {

    margin-bottom: 2rem;
}

.page-summary {

    font-size: 1.1rem;

    color: var(--color-muted);
}

.page-body {

    max-width: 900px;
}

.page-actions {

    margin-top: 3rem;

    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ==========================================================
   DASHBOARD
   ========================================================== */

.admin-dashboard {

    padding: 2rem 0;
}

.dashboard-header {

    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 2rem;
}

.stats-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(200px, 1fr)
        );

    gap: 1rem;
}

.stat-card {

    padding: 1.5rem;

    border-radius: var(--radius);

    background: #ffffff;

    border: 1px solid var(--color-border);

    box-shadow: var(--shadow);
}

.stat-value {

    margin: 0;

    font-size: 2rem;

    font-weight: 700;
}

.actions-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(260px, 1fr)
        );

    gap: 1rem;
}

.dashboard-card {

    display: block;

    padding: 1.5rem;

    border-radius: var(--radius);

    border: 1px solid var(--color-border);

    background: #ffffff;

    box-shadow: var(--shadow);

    color: inherit;
}

.dashboard-card:hover {

    border-color: var(--color-primary);

    text-decoration: none;
}

/* ==========================================================
   LOGIN
   ========================================================== */

.admin-login {

    min-height: 100vh;

    display: flex;
    align-items: center;
}

.login-card {

    max-width: 480px;

    margin: 2rem auto;

    padding: 2rem;

    background: #ffffff;

    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

.form-group {

    margin-bottom: 1rem;
}

.form-group label {

    display: block;

    margin-bottom: 0.5rem;

    font-weight: 600;
}

.form-group input {

    width: 100%;

    padding: 0.75rem;

    border: 1px solid var(--color-border);

    border-radius: var(--radius);
}

/* ==========================================================
   MENSAJES
   ========================================================== */

.flash-message {

    padding: 1rem;

    margin-bottom: 1rem;

    border-radius: var(--radius);

    border-left: 5px solid transparent;

    font-weight: 500;
}

.flash-success {

    background: #e8f5e9;

    color: #1b5e20;

    border-left-color: #2e7d32;
}

.flash-error {

    background: #ffebee;

    color: #b71c1c;

    border-left-color: #d32f2f;
}

.flash-warning {

    background: #fff8e1;

    color: #e65100;

    border-left-color: #f57c00;
}

.flash-info {

    background: #e3f2fd;

    color: #0d47a1;

    border-left-color: #1976d2;
}

/* ==========================================================
   ERRORES
   ========================================================== */

.error-page {

    padding: 4rem 0;

    text-align: center;
}

.error-header {

    margin-bottom: 2rem;
}

.error-header h1 {

    font-size: 3rem;

    margin-bottom: 1rem;
}

.error-subtitle {

    font-size: 1.2rem;

    color: var(--color-muted);
}

.error-actions {

    margin-top: 2rem;

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 1rem;
}

/* ==========================================================
   BREADCRUMB
   ========================================================== */

.breadcrumb {

    margin-bottom: 1.5rem;
}

.breadcrumb ol {

    display: flex;

    flex-wrap: wrap;

    gap: 0.5rem;

    padding: 0;

    margin: 0;

    list-style: none;
}

.breadcrumb li {

    color: var(--color-muted);
}

.breadcrumb li:not(:last-child)::after {

    content: "/";

    margin-left: 0.5rem;
}

/* ==========================================================
   TABLAS
   ========================================================== */

table {

    width: 100%;

    border-collapse: collapse;

    margin-bottom: 2rem;
}

th,
td {

    padding: 0.75rem;

    border: 1px solid var(--color-border);

    text-align: left;
}

th {

    background:
        var(--color-primary);
    color:
        #ffffff;
    font-weight: 700;
}


/* ==========================================================
   UTILIDADES
   ========================================================== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

/* ==========================================================
   VISUALMENTE OCULTO
   ========================================================== */

.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;
}

/* ==========================================================
   IMPRESIÓN
   ========================================================== */

@media print {

    .main-navigation,
    .site-footer,
    .accessibility-tools,
    .page-actions,
    .dashboard-header__actions {

        display: none !important;
    }

    body {

        background: #ffffff;

        color: #000000;
    }

    a {

        color: #000000;

        text-decoration: underline;
    }
}

/*.feature-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: grid;
    gap: 1rem;
}

.feature-list li {
    background: #f5f7fa;
    border-left: 4px solid #005a9c;
    padding: 1rem;
    border-radius: 0.5rem;
}*/

.feature-list {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(280px, 1fr)
        );

    gap: 1rem;
}

.feature-list li {

    border: 1px solid #d9e2ec;

    font-weight: 500;

    transition: transform 0.2s ease;
	
	background: #ffffff;

    border-left:
        6px solid
        var(--color-accent);

    color:
        var(--color-text);

    border-radius:
        0.75rem;

    padding: 1rem;

    box-shadow:
        var(--shadow);
}

.feature-list li:hover {
    transform: translateY(-2px);
}


/* ==========================================================
   ACCESSIBILITY
   ========================================================== */

.accessibility {

    padding: 4rem 0;

    background:

        linear-gradient(
            to bottom,
            #f5f8f8,
            #ffffff
        );
}

.accessibility h2 {
    margin-bottom: 1rem;
}

.accessibility p {
    max-width: 70ch;
    margin-bottom: 2rem;
}

.accessibility .container {
    max-width: 1200px;
    margin: 0 auto;
}


/* ==========================================================
   FOOTER
   ========================================================== */

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

.footer-menu li {
    margin-bottom: 0.5rem;
}

.footer-menu a {
    var(--color-accent);
    text-decoration: none;
}


.footer-menu a:hover {
    text-decoration: underline;
	color:
        #ffffff;
}

.footer-menu a:focus {

    color:
        #ffffff;
}

.footer-bottom {

    border-top:
        1px solid
        rgba(
            255,
            255,
            255,
            0.2
        );
    margin-top: 2rem;
    padding-top: 2rem;
}

.site-footer {
    var(--color-primary);
    color: #ffffff;
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}


/* ==========================================================
   GUIDELINES
   ========================================================== */

.guidelines-section {

    margin-top: 4rem;
}

.guidelines-section h2 {

    color: var(--color-primary);

    margin-bottom: 2rem;
}

.guideline-card {

    display: grid;

    grid-template-columns:
        1fr
        minmax(280px, 400px);

    gap: 2rem;

    align-items: center;

    margin-bottom: 2rem;

    padding: 2rem;

    background: #ffffff;

    border-left: 6px solid
        var(--color-secondary);

    border-radius: 12px;

    box-shadow: var(--shadow);
}

.guideline-content h3 {

    color: var(--color-primary);

    margin-top: 0;
}

/*.guideline-media img,*/

/* Asegura que la imagen ocupe el ancho disponible de su columna sin deformarse */
.guideline-card img {
    width: 25%;
    max-width: 250px;
    height: 25%;
    display: block;
    border-radius: 8px; /* Opcional: para que combine con la tarjeta */
}

.guideline-media video {

    width: 25%;

    display: block;

    border-radius: 10px;
}

.guideline-text p:last-child {

    margin-bottom: 0;
}

@media (max-width: 768px) {

    .guideline-card {

        grid-template-columns: 1fr;
    }
}