/* RESET Y BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f4f4f4;
    color: #222;
    line-height: 1.6;
}

/* 1. BARRA SUPERIOR TIPO AMAZON */
.top-bar {
    background: #232f3e;
    color: #ccc;
    font-size: 13px;
    padding: 6px 0;
}

.top-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.language-selector select {
    background: #232f3e;
    color: #ccc;
    border: 1px solid #3a4553;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.language-selector select:focus {
    outline: none;
    border-color: #f0a500;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.auth-link, .auth-new {
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
}

.auth-link:hover, .auth-new:hover {
    color: #fff;
    text-decoration: underline;
}

.auth-separator {
    color: #666;
}

.auth-new span {
    color: #f0a500;
}

/* 2. HEADER PRINCIPAL */
header {
    background: #0c3b27;
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    height: 50px;
}

header nav {
    display: flex;
    gap: 30px;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.3s;
}

header nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* 3. HERO SECTION */
.hero {
    background: linear-gradient(rgba(28,125,77,0.8), rgba(28,125,77,0.8)), 
                url('img/fondo.jpg') center/cover no-repeat;
    color: white;
    text-align: center;
    padding: 120px 20px;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 48px);
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* BOTONES */
.btn {
    background: #f0a500;
    color: white;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 8px;
    margin: 8px;
    display: inline-block;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(240,165,0,0.3);
}

.btn:hover {
    background: #e69500;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240,165,0,0.4);
}

.btn-secondary {
    background: #1c7d4d;
    box-shadow: 0 4px 15px rgba(28,125,77,0.3);
}

.btn-secondary:hover {
    background: #16653e;
    box-shadow: 0 6px 20px rgba(28,125,77,0.4);
}

/* SECCIONES */
section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: auto;
}

section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #0c3b27;
}

/* CARDS */
.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;        
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.card:hover {
    transform: none;
    box-shadow: none;
}

.card h3 {
    color: #0c3b27;
    margin-bottom: 15px;
    font-size: 22px;
}

.card h4 {
    color: #1c7d4d;
    margin-bottom: 20px;
}

/* 4. FOOTER */
footer {
    background: #0c3b27;
    color: white;
    padding: 50px 20px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #1c7d4d;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: #f0a500;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #f0a500;
}

.cookies-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.cookies-container p {
    margin: 0;
    color: #ccc;
    font-size: 14px;
}

.cookies-container a {
    color: #f0a500;
    text-decoration: underline;
}

.cookies-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-cookies {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cookies-accept {
    background: #1c7d4d;
    color: white;
}

.btn-cookies-accept:hover {
    background: #16653e;
}

.btn-cookies-config {
    background: transparent;
    color: #ccc;
    border: 1px solid #3a4553;
}

.btn-cookies-config:hover {
    background: #3a4553;
    color: white;
}

/* RESPONSIVE */
/* ================================
   RESPONSIVE MÓVIL (pantallas pequeñas)
   ================================ */
@media (max-width: 768px) {

    /* Contenedor principal */
    .container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    /* Logo centrado */
    .logo {
        margin: 0 auto;
        width: 160px;
    }

    /* Menú superior */
    nav {
        display: flex;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* Hero */
    .hero-text h1 {
        font-size: 28px;
    }
    .hero-text p {
        font-size: 16px;
    }

    /* Cards */
    .cards {
        grid-template-columns: 1fr; /* UNA columna en móvil */
        gap: 20px;
        padding: 0 10px;
    }

    .card {
        padding: 20px;
    }

    /* Footer */
    footer {
        text-align: center;
        padding: 40px 10px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .footer-section ul li {
        text-align: center;
    }
}

@media (max-width: 800px) {
    .cards {
        grid-template-columns: 1fr;        /* ← 1 sola columna */
    }
}

/* COOKIES*/
#aceptarTodo {
    background: #0c3b27;
    color: white;
    box-shadow: 0 4px 15px rgba(12,59,39,0.4);
}

#aceptarTodo:hover {
    background: #16653e;
    transform: translateY(-2px);
}

#rechazarTodo {
    background: #666;
    color: white;
}

#rechazarTodo:hover {
    background: #444;
}

#configurar {
    background: transparent;
    color: #f0a500;
    border: 2px solid #f0a500 !important;
}

#configurar:hover {
    background: #f0a500;
    color: white;
}

.btn-cookies-reject { background: #ccc; color: #333; }
.btn-cookies-reject:hover { background: #aaa; }

.cookie-categories { margin: 20px 0; }
.cookie-category { margin-bottom: 20px; padding: 15px; border: 1px solid #eee; border-radius: 8px; }
.cookie-label { display: flex; align-items: center; cursor: pointer; font-weight: bold; color: #0c3b27; }
.cookie-label input { margin-right: 10px; }
.cookie-desc { margin-left: 25px; font-size: 14px; color: #666; margin-top: 5px; }

/* ========================================= */
/* MODAL DE COOKIES                          */
/* ========================================= */
.cookies-modal-content {
    background: white;
    max-width: 600px;
    width: 100%;
    border-radius: 12px;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
    color: #222;
}
.cookies-close {
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}
.cookies-close:hover { color: #000; }
.cookies-modal h3 { 
    color: #0c3b27; 
    margin-bottom: 20px; 
    font-size: 26px; 
}
.cookies-modal h4 { 
    color: #1c7d4d; 
    margin: 20px 0 10px; 
}
.cookies-modal ul { 
    margin: 15px 0; 
    padding-left: 22px; 
}
.cookies-modal ul li { 
    margin-bottom: 8px; 
}
.cookies-modal { display: none; position: fixed; z-index: 999999 !important; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); align-items: center; justify-content: center; padding: 20px; }
.cookies-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: #232f3e !important;
    color: white !important;
    padding: 20px !important;
    z-index: 99999 !important;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.4) !important;
    display: none !important;   /* oculto por defecto */
    transition: all 0.3s ease;
}

.cookies-banner.show {
    display: block !important;
}

/* ======= FORMULARIOS UNIFORMES (ESTILO A) ======= */

.form-wrapper {
    max-width: 700px;
    margin: auto;
}

.card form {
    width: 100%;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #0c3b27;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;    
    box-sizing: border-box;
}

/* Evitar comportamientos raros del textarea */
.form-group textarea {
    resize: none;
    line-height: 1.4;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #f0a500;
    outline: none;
    box-shadow: 0 0 0 3px rgba(240,165,0,0.15);
}

/* Checkboxes alineados correctamente */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    color: #333;
}

.form-check input[type="checkbox"] {
    transform: scale(1.2);
}

/* Botón centrado siempre */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

/* Fondo oscuro */
.modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Ventana modal */
.modal-window {
    background: #fff;
    width: 90%;
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 40px;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.25);
    animation: fadeIn 0.2s ease-out;
}

/* Botón de cerrar (X) */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #333;
}

/* Contenido */
.modal-content {
    margin-top: 20px;
    line-height: 1.6;
}

/* Animación */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 160px); /* altura fija estable */
    display: block;
}

/* PANEL NUEVO */

/* Contenedor central */
.panel-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    text-align: center;
}

/* Botones grandes */
.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 600px;
    margin: 40px auto;
}

.big-btn {
    padding: 25px;
    background: white;
    border-radius: 12px;
    border: 2px solid #0c3b27;
    text-align: center;
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s;
}

.big-btn:hover {
    background: #0c3b27;
    color: white;
}

/* Topbar */
.topbar {
    background: #0c3b27;
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 16px;
}

/* Dropdown usuario */
.user-menu {
    position: relative;
    cursor: pointer;
}

.dropdown {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    color: black;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    width: 220px;
    padding: 10px 0;
    z-index: 99;
}

.dropdown a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
}

.dropdown a:hover {
    background: #f0f0f0;
}

/* BLOQUE DE INFO USUARIO */
#infoUsuario {
    margin-top: 25px;
    text-align: center;
    font-size: 15px;
}

/* FOOTER SIEMPRE ABAJO */
body, html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto;
}
.info-horizontal {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 15px;
    font-size: 14px;
}
.info-horizontal p {
    margin: 0;
}
/* SUBTÍTULO BAJO HOLA CARLOS */
.panel-subtitle {
    text-align: right;
    padding: 10px 25px;
    font-size: 14px;
    color: #333;
    margin-top: 5px;
}
/* PANEL HEADER */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
}

.panel-header-left img.logo {
    max-height: 50px;
}

.panel-header-right {
    font-size: 16px;
    color: #0c3b27;
}

/* SUBTÍTULO */
.panel-subtitle {
    text-align: right;
    padding: 5px 25px 20px 25px;
    font-size: 14px;
    color: #333;
}

/* INFO USUARIO EN HORIZONTAL */
.info-horizontal {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    margin-bottom: 25px;
}
.info-horizontal p { margin: 0; }

/* DROPDOWN */
.dropdown {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    color: black;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    width: 220px;
    padding: 10px 0;
    z-index: 99;
}

.user-menu { position: relative; cursor: pointer; }

.user-menu:hover .dropdown {
    display: block;
}
/* Tarjetas de MIS DATOS a ancho total */
.card-full {
    width: 100%;
    max-width: 100% !important;
    background: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    margin-bottom: 40px;
}
/* PANEL LATERAL */
.sidebar-panel {
    position: fixed;
    top: 0;
    left: -300px; /* oculto inicialmente */
    width: 300px;
    height: 100%;
    background: #ffffff;
    border-right: 1px solid #dcdcdc;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    padding: 20px;
    z-index: 99999;
    transition: 0.3s ease;
}

.sidebar-open {
    left: 0; /* se desliza */
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    float: right;
    cursor: pointer;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.sidebar-menu li {
    padding: 12px 0;
    font-size: 17px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.sidebar-menu li:hover {
    color: #0c3b27;
    font-weight: bold;
}

/* OVERLAY */
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 99990;
}

.sidebar-overlay-show {
    display: block;
}

/* ICONO ☰ */
.sidebar-menu-icon {
    font-size: 26px;
    cursor: pointer;
    margin: 20px;
    user-select: none;
}
/* INFO USUARIO RESPONSIVE */
@media (max-width: 768px) {
    .info-horizontal {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 15px;
        gap: 8px;
    }
}
.license-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.license-table {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    text-align: center;
}

/* Hover desactivado */
.card:hover {
    transform: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}
/* ======== MODAL GENERAL ======== */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Caja del modal */
.modal-box {
    background: white;
    padding: 30px;
    width: 350px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    text-align: center;
    animation: fadeIn 0.2s ease-out;
}

/* Botón X */
.modal-close {
    position: absolute;
    right: 12px;
    top: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: black;
}

/* Título del modal */
.modal-title {
    font-size: 22px;
    margin-bottom: 10px;
    color: #333;
    font-weight: bold;
}

/* Texto dentro del modal */
.modal-text {
    font-size: 15px;
    color: #555;
    margin-bottom: 20px;
}

/* Animación */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}
.panel-container {
    max-width: 1200px;  /* o 1300, 1400 si quieres más ancho */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.card.section {
    width: 100%;   /* TODAS las cards ocuparán exactamente lo mismo */
}
.form-row {
    margin-bottom: 20px;
}
