/* ===== VARIABLES Y RESET ===== */
:root {
    --color-primary: #b45309;
    --color-primary-dark: #92400e;
    --color-secondary: #15803d;
    --color-stone-800: #292524;
    --color-stone-700: #44403c;
    --color-stone-600: #57534e;
    --color-stone-500: #78716f;
    --color-stone-400: #a8a29e;
    --color-stone-300: #d6d3d1;
    --color-stone-200: #e7e5e4;
    --color-stone-100: #f5f5f4;
    --color-stone-50: #fafaf9;
    --color-white: #ffffff;
    --color-amber-100: #fef3c7;
    --color-amber-200: #fcd34d;
    --color-green-50: #dcfce7;
    --color-green-100: #bbf7d0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--color-white);
    color: var(--color-stone-800);
    line-height: 1.6;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== HEADER ===== */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-stone-200);
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-stone-800);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-desktop {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--color-stone-600);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.25rem;
}

.nav-link:hover {
    color: var(--color-stone-800);
}

.nav-link.active {
    color: var(--color-stone-800);
    border-bottom-color: var(--color-primary);
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    background: var(--color-white);
    border: 1px solid var(--color-stone-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn:hover {
    background: var(--color-stone-50);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-stone-600);
    border: 1px solid var(--color-stone-300);
}

.btn-secondary:hover {
    background: var(--color-stone-50);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-admin {
    background: var(--color-white);
    border: 1px solid var(--color-stone-300);
}

.btn-admin.active {
    background: var(--color-amber-100);
    color: var(--color-primary);
    border-color: var(--color-amber-200);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-section.hidden {
    display: none !important;
}

.user-name {
    font-size: 0.875rem;
    color: var(--color-stone-700);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--color-amber-100) 0%, #f5f5f4 50%, var(--color-green-50) 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.2;
}

.hero::before {
    width: 20rem;
    height: 20rem;
    background: var(--color-secondary);
    top: 5rem;
    left: 2rem;
    filter: blur(3rem);
}

.hero::after {
    width: 30rem;
    height: 30rem;
    background: var(--color-primary);
    bottom: 5rem;
    right: 2rem;
    filter: blur(3rem);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-amber-100);
    border: 1px solid var(--color-amber-200);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary);
    width: fit-content;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-stone-600);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: inherit;
}

.btn-large-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-large-primary:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-large-secondary {
    background: var(--color-white);
    color: var(--color-stone-700);
    border: 2px solid var(--color-stone-300);
}

.btn-large-secondary:hover {
    background: var(--color-stone-50);
    border-color: var(--color-stone-400);
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-stone-600);
}

.hero-card {
    background: var(--color-white);
    border: 1px solid var(--color-amber-200);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--color-amber-100), var(--color-green-50));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--color-stone-800);
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--color-stone-600);
}

.card-progress {
    margin: 1.5rem 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-stone-600);
}

.progress-value {
    color: var(--color-primary);
    font-weight: 500;
}

.progress-bar {
    height: 0.75rem;
    background: var(--color-stone-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    width: 85%;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-stone-200);
    font-size: 0.875rem;
    color: var(--color-stone-600);
}

/* ===== SECTIONS ===== */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--color-stone-800);
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-stone-600);
    max-width: 48rem;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===== ABOUT SECTION ===== */
.section-about {
    background: var(--color-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-text h3 {
    font-size: 1.5rem;
    color: var(--color-stone-800);
    font-weight: bold;
}

.about-text p {
    color: var(--color-stone-600);
    line-height: 1.8;
}

/* ===== MISSION SECTION ===== */
.section-mission {
    background: linear-gradient(135deg, var(--color-amber-100) 0%, #fed7aa 100%);
}

.mission-content {
    background: var(--color-white);
    border: 2px solid var(--color-primary);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    max-width: 56rem;
    margin: 0 auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.mission-emoji {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.mission-text {
    font-size: 1.25rem;
    color: var(--color-stone-700);
    line-height: 1.8;
    font-weight: 500;
}

.highlight {
    font-weight: bold;
}

.highlight-primary {
    color: var(--color-primary);
}

.highlight-secondary {
    color: var(--color-secondary);
}

/* ===== VISION SECTION ===== */
.section-vision {
    background: linear-gradient(135deg, var(--color-green-50) 0%, var(--color-green-100) 100%);
}

.vision-content {
    background: var(--color-white);
    border: 2px solid var(--color-secondary);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    max-width: 56rem;
    margin: 0 auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.vision-emoji {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.vision-text {
    font-size: 1.25rem;
    color: var(--color-stone-700);
    line-height: 1.8;
    font-weight: 500;
}

/* ===== COURSES SECTION ===== */
.section-courses {
    background: var(--color-stone-50);
}

.filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-stone-300);
    border-radius: 0.75rem;
    background: var(--color-white);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1);
}

.category-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.5rem 1rem;
    background: var(--color-white);
    border: 1px solid var(--color-stone-200);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-stone-600);
    font-family: inherit;
}

.category-btn:hover {
    background: var(--color-stone-100);
    border-color: var(--color-stone-300);
}

.category-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 4px 6px rgba(180, 83, 9, 0.3);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.course-card {
    background: var(--color-white);
    border: 1px solid var(--color-stone-200);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.course-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.course-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    display: block;
}

.course-body {
    padding: 1.5rem;
}

.course-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-amber-100);
    color: var(--color-primary);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.course-title {
    font-size: 1.125rem;
    font-weight: bold;
    color: var(--color-stone-800);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.course-card:hover .course-title {
    color: var(--color-primary);
}

.course-instructor {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-stone-200);
}

.instructor-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid var(--color-stone-100);
    object-fit: cover;
}

.instructor-info {
    flex: 1;
}

.instructor-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-stone-700);
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--color-stone-600);
}

.rating-stars {
    color: #fbbf24;
}

.course-description {
    font-size: 0.875rem;
    color: var(--color-stone-600);
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.course-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-stone-800);
}

.course-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-course {
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-course:hover {
    background: var(--color-primary-dark);
}

/* ===== CONTACT SECTION ===== */
.section-contact {
    background: var(--color-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    background: var(--color-amber-100);
    color: var(--color-primary);
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-stone-800);
    margin-bottom: 0.25rem;
}

.contact-text {
    color: var(--color-stone-600);
}

.contact-form {
    background: var(--color-stone-50);
    border: 1px solid var(--color-stone-200);
    border-radius: 1rem;
    padding: 2rem;
    grid-column: 1 / -1;
}

.contact-form h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-stone-800);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-stone-300);
    border-radius: 0.5rem;
    background: var(--color-white);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1);
}

.form-textarea {
    resize: none;
    min-height: 6rem;
}

.btn-submit {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-submit:hover {
    background: var(--color-primary-dark);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-stone-100);
    border-top: 1px solid var(--color-stone-200);
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-stone-800);
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #ec4899;
}

.footer-social span {
    color: var(--color-stone-600);
    font-weight: 500;
}

.footer-description {
    color: var(--color-stone-600);
    font-size: 0.875rem;
    max-width: 28rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.footer-copyright {
    border-top: 1px solid var(--color-stone-300);
    padding-top: 1.5rem;
    color: var(--color-stone-400);
    font-size: 0.75rem;
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .header-buttons {
        display: none;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero-text h1 {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.875rem;
    }

    .filters {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .mission-content,
    .vision-content {
        padding: 2rem 1rem;
    }

    .mission-text,
    .vision-text {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-form {
        grid-column: auto;
    }
}

/* ===== ESTILOS PARA MODALS ===== */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed; /* Se queda fijo en la pantalla */
    z-index: 100; /* Se asegura que esté por encima de todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6); /* Fondo oscuro semitransparente */
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* Centrado vertical y horizontalmente */
    padding: 2rem;
    border: 1px solid var(--color-stone-200);
    border-radius: 1rem;
    width: 90%;
    max-width: 400px; /* Ancho máximo del modal */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    color: var(--color-stone-800);
}

.close-btn {
    color: var(--color-stone-400);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--color-stone-700);
}

.modal-switch {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--color-stone-600);
}

.modal-switch a {
    color: var(--color-primary);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}
.modal-switch a:hover {
    text-decoration: underline;
}