/* ===== RESET + BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #ffffff;
    color: #1A2A3A;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #FF5E3A, #FFB347, #FF5E3A);
    background-size: 200% auto;
    animation: gradientMove 2s linear infinite;
    z-index: 1001;
    transition: width 0.1s;
}

@keyframes gradientMove {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ===== HEADER ===== */
.main-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 12px;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1A2A3A;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: #FF5E3A;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    font-weight: 600;
    color: #1A2A3A;
    transition: 0.3s;
    font-size: 1rem;
}

.nav-menu a:hover {
    color: #FF5E3A;
    transform: translateY(-2px);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon {
    position: relative;
    font-size: 1.4rem;
    color: #1A2A3A;
    transition: 0.3s;
}

.cart-icon:hover {
    color: #FF5E3A;
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #FF5E3A;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    box-shadow: 0 0 5px rgba(255,94,58,0.5);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1A2A3A;
}

/* ===== HERO CON EFECTO DE PARTÍCULAS ===== */
.hero {
    background: linear-gradient(135deg, #FFF0EB 0%, #FFE0D6 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    background: #FF5E3A;
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 60px;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(255,94,58,0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,94,58,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255,94,58,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,94,58,0); }
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: #1A2A3A;
}

.highlight {
    color: #FF5E3A;
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(255, 94, 58, 0.3);
    z-index: -1;
    border-radius: 8px;
}

.hero p {
    font-size: 1.1rem;
    color: #4A5568;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* ===== BOTONES CON EFECTO RIPPLE Y GLOW ===== */
.btn {
    padding: 0.9rem 2rem;
    border-radius: 60px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-primary {
    background: #1A2A3A;
    color: white;
}

.btn-primary:hover {
    background: #FF5E3A;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(255,94,58,0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid #1A2A3A;
    color: #1A2A3A;
}

.btn-outline:hover {
    background: #1A2A3A;
    color: white;
    transform: translateY(-4px);
}

.btn-light {
    background: white;
    color: #1A2A3A;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.btn-light:hover {
    background: #FF5E3A;
    color: white;
    transform: scale(1.03);
}

/* ===== FEATURES ===== */
.features {
    padding: 5rem 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1A2A3A, #FF5E3A);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.section-header p {
    color: #5A6B7F;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #F8FAFE;
    border-radius: 32px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s ease;
    transform: translateY(0);
    box-shadow: 0 10px 20px rgba(0,0,0,0.02);
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 24px 40px -12px rgba(0,0,0,0.2);
    background: white;
}

.feature-icon {
    font-size: 3rem;
    color: #FF5E3A;
    margin-bottom: 1.2rem;
    transition: 0.3s;
}

.feature-card:hover .feature-icon {
    transform: rotateY(360deg);
}

/* ===== COURSES & BOOKS CARDS 3D ===== */
.courses-grid, .books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card, .book-card {
    background: white;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    transform-style: preserve-3d;
    position: relative;
}

.course-card:hover, .book-card:hover {
    transform: translateY(-12px) rotateX(3deg);
    box-shadow: 0 28px 40px -12px rgba(0,0,0,0.3);
}

.course-img {
    position: relative;
    overflow: hidden;
}

.course-img img, .book-cover img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-img img,
.book-card:hover .book-cover img {
    transform: scale(1.08);
}

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #00D09C;
    color: white;
    padding: 4px 12px;
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: bold;
    backdrop-filter: blur(2px);
}

.course-info, .book-details {
    padding: 1.5rem;
}

.course-info h3, .book-details h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #7B8A9B;
    margin: 1rem 0;
}

.btn-sm {
    background: #1A2A3A;
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: 0.2s;
    border: none;
    cursor: pointer;
}

.btn-sm:hover {
    background: #FF5E3A;
    transform: scale(1.02);
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FF5E3A;
    margin: 0.5rem 0;
}

/* ===== FILTROS DE CURSOS ===== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin: 2rem 0;
    gap: 1rem;
}

.institution-tags {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.tag {
    background: #F0F2F5;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
}

.tag.active, .tag:hover {
    background: #FF5E3A;
    color: white;
    transform: translateY(-2px);
}

/* ===== PÁGINA FUNDACIÓN (ABOUT) MODERNA ===== */
.about-hero {
    background: linear-gradient(120deg, #1A2A3A, #2A3A54);
    color: white;
    padding: 4rem 0;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.about-hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1A2A3A;
}

.about-text p {
    color: #4A5568;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.impact-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #F8FAFE;
    border-radius: 24px;
    transition: 0.3s;
}

.stat-item:hover {
    transform: translateY(-8px);
    background: #FF5E3A;
    color: white;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    display: block;
}

.about-image img {
    width: 100%;
    border-radius: 32px;
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.2);
    transition: 0.4s;
}

.about-image img:hover {
    transform: scale(1.02);
}

/* ===== CONTACTO MODERNO ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem 0;
}

.info-card {
    background: white;
    padding: 1.8rem;
    border-radius: 28px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    transition: 0.3s;
    text-align: center;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 32px rgba(0,0,0,0.1);
}

.info-card i {
    font-size: 2rem;
    color: #FF5E3A;
    margin-bottom: 0.5rem;
}

.contact-form form {
    background: #F8FAFE;
    padding: 2rem;
    border-radius: 32px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 60px;
    font-family: inherit;
    transition: 0.2s;
}

.contact-form textarea {
    border-radius: 24px;
    resize: vertical;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: #FF5E3A;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,94,58,0.2);
}

/* ===== FOOTER ===== */
.main-footer {
    background: #0C1622;
    color: #CBD5E1;
    padding: 3rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 3px;
    background: #FF5E3A;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

.footer-logo {
    height: 55px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-col p {
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #CBD5E1;
    text-decoration: none;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #FF5E3A;
    transform: translateX(5px);
}

.social-section {
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.social-links a {
    background: #1E293B;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: #FF5E3A;
    transform: translateY(-3px);
}

.newsletter-section p {
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 350px;
}

@media (max-width: 768px) {
    .newsletter-form {
        margin: 0 auto;
    }
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1rem;
    border-radius: 60px;
    border: none;
    background: #1E293B;
    color: white;
    font-family: inherit;
}

.newsletter-form input::placeholder {
    color: #94A3B8;
}

.newsletter-form button {
    background: #FF5E3A;
    border: none;
    padding: 0 1.2rem;
    border-radius: 60px;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
}

.newsletter-form button:hover {
    background: #E54A2E;
    transform: scale(1.02);
}

.footer-copyright {
    margin-top: 1rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero-grid, .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        padding: 2rem;
        box-shadow: 0 20px 30px rgba(0,0,0,0.1);
    }
    .nav-menu.show {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== PROMO ANIMATION ===== */
.promo-animation {
    background: linear-gradient(120deg, #FF5E3A, #FFB347);
    margin: 2rem 0;
    border-radius: 48px;
    overflow: hidden;
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.2);
}
.promo-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 3rem 2rem;
    color: white;
}
.promo-text h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.promo-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}
.btn-large {
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    background: white;
    color: #FF5E3A;
}
.btn-large:hover {
    background: #1A2A3A;
    color: white;
    transform: translateY(-2px);
}
.floating-books i {
    font-size: 4rem;
    margin: 0 0.5rem;
    animation: float 3s ease-in-out infinite;
    display: inline-block;
}
.floating-books i:nth-child(2) { animation-delay: 0.5s; }
.floating-books i:nth-child(3) { animation-delay: 1s; }
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}
@media (max-width: 768px) {
    .promo-content {
        flex-direction: column;
        text-align: center;
    }
    .floating-books i {
        font-size: 2.5rem;
        margin-top: 1rem;
    }
    .promo-text h2 {
        font-size: 1.8rem;
    }
}

/* ===== CARRUSEL DE INSTITUCIONES ALIADAS ===== */
.allied-institutions {
    padding: 4rem 0;
    background: linear-gradient(135deg, #F8FAFE 0%, #FFFFFF 100%);
}

.carousel-container {
    position: relative;
    max-width: 1100px;
    margin: 2rem auto;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.1);
    background: white;
}

.carousel-slide {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
}

.carousel-item {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    background: white;
}

.carousel-item img {
    max-width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.1));
    transition: transform 0.3s;
}

.carousel-item:hover img {
    transform: scale(1.05);
}

.carousel-item h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1A2A3A;
}

.carousel-item p {
    color: #FF5E3A;
    font-weight: 600;
    font-size: 1rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 94, 58, 0.9);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.carousel-btn:hover {
    background: #FF5E3A;
    transform: translateY(-50%) scale(1.05);
}

.prev {
    left: 15px;
}

.next {
    right: 15px;
}

.carousel-dots {
    text-align: center;
    margin-top: 1.5rem;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #CBD5E1;
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.dot.active {
    background: #FF5E3A;
    width: 28px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .carousel-item img {
        max-width: 120px;
    }
    .carousel-item h3 {
        font-size: 1.3rem;
    }
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Botón Plataforma Cursos - Minimalista y Animado */
.btn-platform {
    background: linear-gradient(135deg, #FF5E3A, #FF8C5A);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 4px 10px rgba(255, 94, 58, 0.3);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(2px);
    letter-spacing: 0.3px;
}

.btn-platform i {
    font-size: 1rem;
    transition: transform 0.2s;
}

.btn-platform:hover {
    background: linear-gradient(135deg, #E54A2E, #FF6B4A);
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(255, 94, 58, 0.4);
}

.btn-platform:hover i {
    transform: translateX(3px);
}

/* En móviles, si el texto es largo, se ajusta */
@media (max-width: 768px) {
    .btn-platform span {
        display: none; /* oculta el texto en móviles, solo icono */
    }
    .btn-platform {
        padding: 0.5rem 0.9rem;
    }
    .btn-platform i {
        margin: 0;
    }
}