/* ===== PORTAL ACADÉMICO AJEDREZ DE SILICIO - CSS PREMIUM ===== */

/* ===== VARIABLES CSS ===== */
:root {
    --primary-color: #c70039;
    --secondary-color: #ff1744;
    --accent-color: #ff6b9d;
    --background-dark: #0a0a0a;
    --background-light: #1a1a1a;
    --background-card: rgba(26, 26, 26, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: #333333;
    --border-light: #444444;
    --gradient-primary: linear-gradient(135deg, #c70039, #ff1744);
    --gradient-secondary: linear-gradient(135deg, #ff1744, #ff6b9d);
    --gradient-accent: linear-gradient(135deg, #ff6b9d, #ff8fab);
    --shadow-glow: 0 0 30px rgba(199, 0, 57, 0.3);
    --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.4);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    --border-radius: 16px;
    --border-radius-large: 24px;
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== PARTÍCULAS DE FONDO ===== */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(199, 0, 57, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 23, 68, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(255, 107, 157, 0.1) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(199, 0, 57, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(199, 0, 57, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 30s linear infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ===== NAVEGACIÓN ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 90px;
}

.nav-logo img {
    height: 80px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(199, 0, 57, 0.3));
    display: block;
    margin: 0;
    padding: 0;
}

.nav-logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(199, 0, 57, 0.5));
}

.nav-title {
    text-align: center;
    flex: 1;
}

.nav-title h1 {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.nav-title p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main-content {
    margin-top: 90px;
    min-height: calc(100vh - 90px);
}

/* ===== HERO SECTION ===== */
.hero-section {
    padding: 4rem 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.title-line {
    display: block;
    color: var(--text-primary);
}

.title-highlight {
    display: block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.title-highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: underlineGlow 2s ease-in-out infinite;
}

@keyframes underlineGlow {
    0%, 100% { opacity: 0.3; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1); }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 500px;
    font-weight: 400;
}

/* ===== FORMULARIO DE ACCESO ===== */
.access-form-container {
    z-index: 2;
}

.form-card {
    background: var(--background-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-large) var(--border-radius-large) 0 0;
}

.form-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); box-shadow: var(--shadow-glow); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(199, 0, 57, 0.5); }
}

.form-icon i {
    font-size: 2rem;
    color: white;
}

.form-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.access-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.form-label i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.form-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(199, 0, 57, 0.1);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius);
    padding: 1.25rem 2rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: var(--shadow-glow);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(199, 0, 57, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-icon {
    position: relative;
    z-index: 2;
    transition: var(--transition-fast);
}

.btn-primary:hover .btn-icon {
    transform: translateX(5px);
}

/* ===== BENEFICIOS SECTION ===== */
.benefits-section {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, transparent 0%, rgba(199, 0, 57, 0.02) 50%, transparent 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.benefits-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.benefit-card {
    background: var(--background-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.benefit-card:hover::before {
    transform: scaleX(1);
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.benefit-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 50px rgba(199, 0, 57, 0.5);
}

.benefit-icon i {
    font-size: 2.5rem;
    color: white;
}

.benefit-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.benefit-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===== SECURITY SECTION ===== */
.security-section {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, rgba(199, 0, 57, 0.05) 0%, rgba(255, 23, 68, 0.05) 100%);
}

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

.security-header {
    text-align: center;
    margin-bottom: 4rem;
}

.security-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    animation: iconPulse 3s ease-in-out infinite;
}

.security-icon i {
    font-size: 2.5rem;
    color: white;
}

.security-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.security-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.security-item {
    background: var(--background-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.security-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: var(--transition);
}

.security-item:hover::before {
    transform: scaleY(1);
}

.security-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.security-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glow);
}

.security-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.security-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--background-light);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.footer-logo img {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(199, 0, 57, 0.3));
    transition: all 0.3s ease;
}

.footer-logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(199, 0, 57, 0.5));
}

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

.footer-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.footer-text p:last-child {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .security-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
        flex-direction: row;
        gap: 0.5rem;
        min-height: 60px;
    }
    
    .nav-logo img {
        height: 50px;
        width: auto;
    }
    
    .nav-title h1 {
        font-size: 1.2rem;
        margin-bottom: 0.1rem;
    }
    
    .nav-title p {
        font-size: 0.75rem;
    }
    
    .main-content {
        margin-top: 60px;
    }
    
    .hero-section {
        padding: 1.5rem 1rem;
        min-height: calc(100vh - 60px);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .form-card {
        padding: 1.5rem;
    }
    
    .form-icon {
        width: 60px;
        height: 60px;
    }
    
    .form-icon i {
        font-size: 1.5rem;
    }
    
    .form-header h3 {
        font-size: 1.3rem;
    }
    
    .form-header p {
        font-size: 0.9rem;
    }
    
    .benefits-section,
    .security-section {
        padding: 3rem 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .benefit-card,
    .security-item {
        padding: 1.5rem;
    }
    
    .benefit-icon,
    .security-icon {
        width: 80px;
        height: 80px;
    }
    
    .benefit-icon i,
    .security-icon i {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-logo img {
        height: 80px;
        width: auto;
    }
    
    .footer-text {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.5rem 0.75rem;
        min-height: 50px;
    }
    
    .nav-logo img {
        height: 45px;
        width: auto;
    }
    
    .nav-title h1 {
        font-size: 1rem;
    }
    
    .nav-title p {
        font-size: 0.7rem;
    }
    
    .main-content {
        margin-top: 50px;
    }
    
    .hero-section {
        padding: 1rem 0.75rem;
        min-height: calc(100vh - 50px);
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .form-card {
        padding: 1.25rem;
    }
    
    .form-icon {
        width: 50px;
        height: 50px;
    }
    
    .form-icon i {
        font-size: 1.2rem;
    }
    
    .form-header h3 {
        font-size: 1.1rem;
    }
    
    .form-header p {
        font-size: 0.8rem;
    }
    
    .benefit-card,
    .security-item {
        padding: 1.25rem;
    }
    
    .benefit-icon,
    .security-icon {
        width: 70px;
        height: 70px;
    }
    
    .benefit-icon i,
    .security-icon i {
        font-size: 1.8rem;
    }
    
    .benefit-card h3,
    .security-content h3 {
        font-size: 1.1rem;
    }
    
    .benefit-card p,
    .security-content p {
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .nav-container {
        padding: 0.4rem 0.5rem;
        min-height: 45px;
    }
    
    .nav-logo img {
        height: 40px;
        width: auto;
    }
    
    .nav-title h1 {
        font-size: 0.9rem;
    }
    
    .nav-title p {
        font-size: 0.65rem;
    }
    
    .main-content {
        margin-top: 45px;
    }
    
    .hero-section {
        padding: 0.75rem 0.5rem;
        min-height: calc(100vh - 45px);
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .form-card {
        padding: 1rem;
    }
    
    .form-icon {
        width: 45px;
        height: 45px;
    }
    
    .form-icon i {
        font-size: 1rem;
    }
    
    .form-header h3 {
        font-size: 1rem;
    }
    
    .form-header p {
        font-size: 0.75rem;
    }
    
    .benefit-card,
    .security-item {
        padding: 1rem;
    }
    
    .benefit-icon,
    .security-icon {
        width: 60px;
        height: 60px;
    }
    
    .benefit-icon i,
    .security-icon i {
        font-size: 1.5rem;
    }
    
    .footer-logo img {
        height: 70px;
        width: auto;
    }
}

/* ===== ANIMACIONES DE ENTRADA ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== UTILIDADES ===== */
.fade-in {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* ===== SELECTION ===== */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}