/*
Theme Name: EFO Academia v5.0 - Premium Edition
Theme URI: https://www.serviceti.cl
Description: Versión premium autoadministrable con soporte para Cursos, PDFs y Carrito de Compras.
Version: 5.0.0
Author: STI - Servicios Tecnológicos Integrales
Author URI: https://www.serviceti.cl
*/

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #a855f7;
    --accent: #f43f5e;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Header & Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

.logo i {
    font-size: 2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon-wrapper {
    position: relative;
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.cart-icon-wrapper:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    border: 2px solid var(--white);
}

/* Hero Section */
.hero {
    padding-top: 160px;
    padding-bottom: 80px;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent),
                radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.05), transparent);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeIn 0.8s ease-out;
}

.hero-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h2 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.hero h2 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
    animation: fadeIn 1s ease-out 0.2s both;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
}

.floating-card {
    position: absolute;
    background: var(--glass);
    backdrop-filter: blur(8px);
    padding: 1rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: float 4s ease-in-out infinite;
}

.card-1 { top: 20%; left: -10%; }
.card-2 { bottom: 10%; right: -5%; animation-delay: 1s; }

/* Product Section */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

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

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.product-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f1f5f9;
    position: relative;
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pdf-badge {
    background: var(--accent);
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.product-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.add-to-cart {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart:hover {
    background: var(--primary);
    color: white;
}

/* Admin Dashboard Simulation (For Front-end representation) */
.admin-preview-bar {
    background: var(--text);
    color: white;
    padding: 0.5rem 2rem;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-preview-bar a {
    color: #cbd5e1;
    text-decoration: none;
    margin-left: 1rem;
    transition: 0.2s;
}

.admin-preview-bar a:hover {
    color: white;
}

/* Footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 80px 0 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 60px;
}

.footer-brand h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-links h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero h2 { font-size: 3rem; }
    .hero p { margin-left: auto; margin-right: auto; }
    .hero-btns { justify-content: center; }
    .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-menu { display: none; }
    .footer-container { grid-template-columns: 1fr; gap: 2rem; }
}
