/**
 * WGM Academic - Estilos Principales
 * Página web de presentación
 */

/* ==================== VARIABLES ==================== */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --bg-dark: #0f172a;
    --bg-medium: #1e293b;
    --bg-light: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --transition: all 0.3s ease;
    --header-height: 80px;
}

/* ==================== RESET ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-dark);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* ==================== UTILIDADES ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav__logo i {
    color: var(--primary);
    font-size: 1.8rem;
}

.nav__list {
    display: flex;
    gap: 40px;
}

.nav__link {
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav__link:hover,
.nav__link.active {
    color: var(--text-primary);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav__admin {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav__admin:hover {
    background: var(--primary);
    color: white;
}

.nav__toggle,
.nav__close {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==================== HERO ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background: 
        radial-gradient(ellipse at top right, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        var(--bg-dark);
    text-align: center;
}

.hero__container {
    padding: 60px 0;
}

.hero__content {
    max-width: 800px;
    margin: 0 auto;
}

.hero__subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(79, 70, 229, 0.2);
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--primary-light);
    margin-bottom: 25px;
}

.hero__subtitle i {
    color: var(--warning);
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
}

.hero__description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.hero__stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.hero__stat {
    text-align: center;
}

.hero__stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.hero__stat-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==================== BOTONES ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition);
}

.btn--primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

.btn--outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--bg-light);
}

.btn--outline:hover {
    background: var(--bg-light);
    border-color: var(--bg-light);
}

.btn--block {
    width: 100%;
}

.btn--large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* ==================== SECCIONES ==================== */
section {
    padding: 100px 0;
}

.section__header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section__subtitle {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(79, 70, 229, 0.2);
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--primary-light);
    margin-bottom: 15px;
}

.section__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.section__description {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ==================== FEATURES ==================== */
.features {
    background: var(--bg-medium);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature__card {
    background: var(--bg-dark);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature__card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature__icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border-radius: 20px;
    margin: 0 auto 25px;
    font-size: 2rem;
    color: white;
}

.feature__card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature__card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==================== PRICING ==================== */
.pricing__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    align-items: start;
}

.pricing__card {
    background: var(--bg-medium);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
}

.pricing__card:hover {
    transform: translateY(-10px);
    border-color: var(--bg-light);
}

.pricing__card--popular {
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.2) 0%, var(--bg-medium) 100%);
    border-color: var(--primary);
    transform: scale(1.05);
}

.pricing__card--popular:hover {
    transform: scale(1.05) translateY(-10px);
}

.pricing__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 20px;
    background: var(--gradient);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.pricing__name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pricing__price {
    margin: 20px 0;
}

.pricing__amount {
    font-size: 3rem;
    font-weight: 800;
}

.pricing__period {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing__features {
    margin-bottom: 30px;
    text-align: left;
}

.pricing__features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--bg-light);
}

.pricing__features li:last-child {
    border-bottom: none;
}

.pricing__features .fa-check {
    color: var(--success);
}

.pricing__features .fa-times {
    color: var(--text-muted);
}

/* ==================== DOWNLOAD ==================== */
.download {
    background: var(--bg-medium);
}

.download__box {
    background: var(--bg-dark);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    border: 2px dashed var(--bg-light);
    max-width: 550px;
    margin: 0 auto;
    transition: var(--transition);
}

.download__box:hover {
    border-color: var(--primary);
}

.download__icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border-radius: 25px;
    margin: 0 auto 25px;
    font-size: 3rem;
    color: white;
}

.download__box h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.download__info {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.download__requirements {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 25px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.download__requirements span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.download__note {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.download__note i {
    color: var(--success);
}

/* ==================== CONTACT ==================== */
.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact__card {
    background: var(--bg-medium);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

.contact__card:hover {
    transform: translateY(-5px);
}

.contact__icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border-radius: 15px;
    margin: 0 auto 15px;
    font-size: 1.5rem;
    color: white;
}

.contact__card h4 {
    margin-bottom: 5px;
}

.contact__card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.contact__card a,
.contact__card span {
    color: var(--primary-light);
    font-weight: 500;
}

.contact__form {
    background: var(--bg-medium);
    padding: 40px;
    border-radius: 20px;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form__group {
    margin-bottom: 20px;
}

.form__group input,
.form__group textarea,
.form__group select {
    width: 100%;
    padding: 15px 20px;
    background: var(--bg-dark);
    border: 2px solid var(--bg-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form__group input:focus,
.form__group textarea:focus,
.form__group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form__group input::placeholder,
.form__group textarea::placeholder {
    color: var(--text-muted);
}

.form__group textarea {
    resize: vertical;
    min-height: 120px;
}

.form__group select {
    cursor: pointer;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-medium);
    padding: 60px 0 30px;
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer__logo i {
    color: var(--primary);
}

.footer__brand p {
    color: var(--text-secondary);
    max-width: 300px;
    margin-bottom: 20px;
}

.footer__social {
    display: flex;
    gap: 15px;
}

.footer__social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 10px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer__social a:hover {
    background: var(--primary);
    color: white;
}

.footer__links h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer__links li {
    margin-bottom: 12px;
}

.footer__links a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer__links a:hover {
    color: var(--primary-light);
}

.footer__bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--bg-light);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing__card--popular {
        transform: scale(1);
    }
    
    .pricing__card--popular:hover {
        transform: translateY(-10px);
    }
    
    .contact__grid {
        grid-template-columns: 1fr;
    }
    
    .contact__info {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .contact__card {
        flex: 1;
        min-width: 200px;
    }
    
    .footer__content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    /* Navegación móvil */
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: var(--bg-dark);
        padding: 100px 40px;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    .nav__menu.show {
        right: 0;
    }
    
    .nav__list {
        flex-direction: column;
        gap: 30px;
    }
    
    .nav__link {
        font-size: 1.2rem;
    }
    
    .nav__close {
        display: block;
        position: absolute;
        top: 30px;
        right: 30px;
        color: var(--text-primary);
    }
    
    .nav__toggle {
        display: block;
        color: var(--text-primary);
    }
    
    /* Hero */
    .hero__title {
        font-size: 2.2rem;
    }
    
    .hero__description {
        font-size: 1rem;
    }
    
    .hero__stats {
        gap: 30px;
    }
    
    .hero__stat-number {
        font-size: 2rem;
    }
    
    /* Secciones */
    .section__title {
        font-size: 1.8rem;
    }
    
    .features__grid,
    .pricing__grid {
        grid-template-columns: 1fr;
    }
    
    .feature__card,
    .pricing__card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .contact__info {
        flex-direction: column;
    }
    
    .form__row {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer__content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .footer__brand p {
        max-width: 100%;
    }
    
    .footer__social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 1.8rem;
    }
    
    .hero__buttons {
        flex-direction: column;
    }
    
    .hero__buttons .btn {
        width: 100%;
    }
    
    .download__box {
        padding: 40px 25px;
    }
    
    .download__requirements {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact__form {
        padding: 30px 20px;
    }
}

/* ==================== SCREENSHOTS ==================== */
.screenshots {
    padding: 100px 0;
    background: var(--bg-dark);
}
.screenshots__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}
.screenshot__card {
    background: var(--bg-medium);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid var(--bg-light);
}
.screenshot__card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}
.screenshot__card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top left;
}
.screenshot__label {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-light);
}
@media (max-width: 768px) {
    .screenshots__grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== ACCESIBILIDAD ISO 23026 ==================== */

/* Screen reader only - etiquetas ocultas visualmente pero accesibles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible para navegación por teclado */
*:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Quitar outline genérico para mouse */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Focus visible en botones */
.btn:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.2);
}

/* Focus visible en inputs */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
    border-color: var(--primary);
}

/* Focus visible en enlaces de navegación */
.nav__link:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Mejora de contraste para textos secundarios (WCAG AA 4.5:1) */
.hero__description,
.section__description,
.feature__card p,
.footer p,
.contact__card p {
    color: #a3b3cc;
}

/* Skip to content link para accesibilidad por teclado */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    font-weight: 600;
    font-size: 0.9rem;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Reducir movimiento para usuarios con preferencia */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
