:root {
        --primary-color: #022141;    /* Azul corporativo oscuro */
        --secondary-color: #00bcd4;  /* Cian/Azul claro */
        --accent-color: #ff9800;     /* Naranja */
        --light-bg: #f8f9fa;         /* Fondo claro */
        --white: #ffffff;            /* Blanco */
        --dark-gray: #2c3e50;        /* Gris oscuro */
        --light-gray: #ecf0f1;       /* Gris claro */
        --success-color: #27ae60;    /* Verde */
        --warning-color: #f39c12;    /* Amarillo */
        --danger-color: #e74c3c;     /* Rojo */
      }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html, body {
            height: 100%;
            /* Permitimos scroll vertical para que se vean todas las áreas en pantallas pequeñas */
            overflow-x: hidden;
            overflow-y: auto;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, var(--primary-color) 0%, #1a4a7a 50%, var(--secondary-color) 100%);
            position: relative;
        }

        /* Efectos de fondo animados */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: 
                radial-gradient(circle at 20% 80%, rgba(0, 188, 212, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 152, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(34, 33, 65, 0.1) 0%, transparent 50%);
            animation: backgroundShift 20s ease-in-out infinite;
            z-index: -1;
        }

        @keyframes backgroundShift {
            0%, 100% { transform: translate(0, 0) scale(1); }
            33% { transform: translate(-10px, -10px) scale(1.1); }
            66% { transform: translate(10px, 10px) scale(0.9); }
        }

        .landing-container {
            min-height: 100vh;
            display: flex;
            align-items: flex-start;
            justify-content: center;
            /* Contenido apilado desde arriba, sin solaparse con la cabecera */
            padding: 1.5rem 1rem 1rem;
            position: relative;
        }

        .landing-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 25px;
            box-shadow: 
                0 25px 50px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.1);
            overflow: hidden;
            max-width: 1100px;
            width: 100%;
            /* Altura mínima para ocupar la pantalla, pero permitimos que crezca si el contenido lo necesita */
            min-height: 90vh;
            position: relative;
            animation: slideInUp 0.8s ease-out;
            display: flex;
            flex-direction: column;
        }

        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(50px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .landing-header {
            background: linear-gradient(135deg, var(--primary-color) 0%, #1a4a7a 100%);
            color: var(--white);
            padding: 2rem 3rem;
            text-align: center;
            position: relative;
            overflow: hidden;
            flex-shrink: 0;
            z-index: 1;
        }

        .landing-header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
            opacity: 0.3;
        }

        .landing-header h1 {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
            letter-spacing: -1px;
            position: relative;
            z-index: 2;
        }

        .landing-header .logo-icon {
            font-size: 3rem;
            margin-bottom: 0.5rem;
            display: block;
            color: var(--secondary-color);
            text-shadow: 0 0 20px rgba(0, 188, 212, 0.5);
            animation: pulse 2s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .landing-header p {
            font-size: 1.1rem;
            font-weight: 300;
            opacity: 0.95;
            line-height: 1.4;
            position: relative;
            z-index: 2;
            margin: 0;
        }

        .landing-content {
            padding: 2rem 3rem;
            background: var(--white);
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .area-selection {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
            gap: 2rem;
            flex: 1;
        }

        .area-card {
            background: linear-gradient(145deg, var(--white) 0%, var(--light-gray) 100%);
            border-radius: 20px;
            padding: 2rem;
            text-decoration: none;
            color: var(--dark-gray);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
            border: 2px solid transparent;
            box-shadow: 
                0 10px 30px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .area-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            opacity: 0;
            transition: opacity 0.4s ease;
            z-index: 1;
        }

        .area-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 
                0 20px 40px rgba(0, 0, 0, 0.15),
                0 0 0 1px var(--secondary-color);
            border-color: var(--secondary-color);
        }

        .area-card:hover::before {
            opacity: 0.05;
        }

        .area-card > * {
            position: relative;
            z-index: 2;
        }

        .area-icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1.5rem;
            font-size: 2rem;
            color: var(--white);
            box-shadow: 0 8px 25px rgba(2, 33, 65, 0.3);
            transition: all 0.3s ease;
        }

        .area-card:hover .area-icon {
            transform: scale(1.1) rotate(5deg);
            box-shadow: 0 12px 35px rgba(2, 33, 65, 0.4);
        }

        .area-title {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            color: var(--primary-color);
            transition: color 0.3s ease;
        }

        .area-card:hover .area-title {
            color: var(--secondary-color);
        }

        .area-description {
            font-size: 0.8rem;
            line-height: 1.5;
            color: var(--dark-gray);
            margin-bottom: 1.5rem;
            opacity: 0.8;
            flex: 1;
        }

        .area-features {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .area-features li {
            padding: 0.3rem 0;
            font-size: 0.8rem;
            color: var(--dark-gray);
            position: relative;
            padding-left: 1.5rem;
            transition: all 0.3s ease;
        }

        .area-features li::before {
            content: '✓';
            position: absolute;
            left: 0;
            top: 0.3rem;
            color: var(--success-color);
            font-weight: bold;
            font-size: 1rem;
        }

        .area-card:hover .area-features li {
            color: var(--primary-color);
            transform: translateX(3px);
        }

        .login-section {
            background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
            border-radius: 15px;
            padding: 1.5rem;
            text-align: center;
            border: 2px solid var(--light-gray);
            flex-shrink: 0;
        }

        .login-section .alert {
            border-radius: 12px;
            border: none;
            padding: 1rem;
            margin-bottom: 1rem;
            font-size: 0.95rem;
        }

        .login-section .alert-success {
            background: linear-gradient(135deg, var(--success-color) 0%, #2ecc71 100%);
            color: var(--white);
        }

        .login-section .alert-warning {
            background: linear-gradient(135deg, var(--warning-color) 0%, #f1c40f 100%);
            color: var(--white);
        }

        .btn {
            padding: 0.75rem 2rem;
            border-radius: 12px;
            font-weight: 600;
            font-size: 1rem;
            transition: all 0.3s ease;
            border: none;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            color: var(--white);
            box-shadow: 0 8px 25px rgba(2, 33, 65, 0.3);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 35px rgba(2, 33, 65, 0.4);
            color: var(--white);
        }

        .btn-outline-secondary {
            background: transparent;
            color: var(--primary-color);
            border: 2px solid var(--primary-color);
        }

        .btn-outline-secondary:hover {
            background: var(--primary-color);
            color: var(--white);
            transform: translateY(-2px);
        }

        .footer-info {
            text-align: center;
            color: var(--dark-gray);
            font-size: 0.8rem;
            margin-top: 1rem;
            opacity: 0.7;
        }

        /* Animaciones de entrada */
        .area-card:nth-child(1) {
            animation: slideInLeft 0.8s ease-out 0.2s both;
        }

        .area-card:nth-child(2) {
            animation: slideInRight 0.8s ease-out 0.4s both;
        }

        @keyframes slideInLeft {
            from {
                opacity: 0;
                transform: translateX(-50px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(50px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        /* Responsive Design */
        @media (max-width: 1200px) {
            .area-selection {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
            
            .landing-card {
                min-height: 95vh;
            }
        }

        @media (max-width: 768px) {
            .landing-container {
                /* Un poco menos de margen en móviles, pero manteniendo cabecera visible */
                padding: 1rem 0.5rem 0.75rem;
            }
            
            .landing-header {
                padding: 1.3rem 0.8rem;
                border-radius: 0;
            }
            
            .landing-header h1 {
                font-size: 1.7rem;
            }
            
            .landing-header p {
                font-size: 0.95rem;
            }
            
            .landing-content {
                padding: 1.2rem 0.9rem;
            }
            
            .area-card {
                padding: 1.2rem;
            }
            
            .area-icon {
                width: 42px;
                height: 42px;
                font-size: 1.4rem;
            }
            
            .area-title {
                font-size: 1.1rem;
            }

            .area-description {
                font-size: 0.75rem;
            }

            .area-features li {
                font-size: 0.75rem;
            }
            
            .landing-card {
                min-height: 98vh;
            }
        }

        @media (max-width: 480px) {
            .landing-header h1 {
                font-size: 1.5rem;
            }

            .landing-header p {
                font-size: 0.9rem;
            }
            
            .area-selection {
                gap: 0.8rem;
            }
            
            .area-card {
                padding: 0.9rem;
            }
            
            .landing-content {
                padding: 0.9rem;
            }

            .area-icon {
                width: 38px;
                height: 38px;
                font-size: 1.3rem;
            }

            .area-title {
                font-size: 1rem;
            }

            .area-description {
                font-size: 0.7rem;
            }

            .area-features li {
                font-size: 0.7rem;
            }
        }

        /* Efectos de hover adicionales */
        .area-card:hover .area-icon i {
            animation: bounce 0.6s ease;
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% {
                transform: translateY(0);
            }
            40% {
                transform: translateY(-8px);
            }
            60% {
                transform: translateY(-4px);
            }
        }

        /* Ajustes para pantallas muy altas */
        @media (min-height: 900px) {
            .landing-card {
                height: 85vh;
            }
            
            .landing-header {
                padding: 2.5rem 3rem;
            }
            
            .landing-content {
                padding: 2.5rem 3rem;
            }
        }

        /* Ajustes para pantallas muy bajas */
        @media (max-height: 600px) {
            .landing-card {
                height: 95vh;
            }
            
            .landing-header {
                padding: 1rem 2rem;
            }
            
            .landing-header h1 {
                font-size: 2rem;
            }
            
            .landing-content {
                padding: 1rem 2rem;
            }
            
            .area-card {
                padding: 1rem;
            }
            
            .area-icon {
                width: 40px;
                height: 40px;
                font-size: 1.5rem;
                margin-bottom: 1rem;
            }
            
            .area-title {
                font-size: 1.2rem;
                margin-bottom: 0.5rem;
            }
            
            .area-description {
                font-size: 0.85rem;
                margin-bottom: 1rem;
            }
            
            .area-features li {
                font-size: 0.8rem;
                padding: 0.2rem 0;
            }
        }