/* Aplicación de estilos base */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(15, 23, 42, 0.35);
    outline-offset: 2px;
}

:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.app-shell__inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
}

.site-branding {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.site-branding__icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: #0f172a;
    color: #ffffff;
    display: grid;
    place-items: center;
}

.site-branding__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.site-branding__subtitle {
    margin: 0;
    color: #475569;
    font-size: 0.88rem;
}

.site-nav {
    display: none;
    gap: 1.5rem;
    align-items: center;
}

.site-nav a {
    color: #334155;
    font-size: 0.95rem;
    font-weight: 500;
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.85rem 1.4rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 180ms ease, transform 180ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button--primary {
    background: #0f172a;
    color: #ffffff;
}

.button--primary:hover {
    background: #111827;
}

.button--ghost {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}

.button--hero {
    background: #ffffff;
    color: #0f172a;
}

.button--outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.button--secondary {
    background: #0f172a;
    color: #ffffff;
    border: 1px solid transparent;
}

.site-content {
    flex: 1;
}

.hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    border-radius: 2rem;
    padding: 3rem 2rem;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.15);
}

.hero-banner__inner {
    display: grid;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-banner__content {
    max-width: 620px;
}

.hero-badge {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.hero-title {
    font-size: clamp(2.75rem, 4vw, 4.25rem);
    line-height: 1.02;
    margin: 1.25rem 0 1rem;
    font-weight: 800;
}

.hero-copy {
    max-width: 38rem;
    line-height: 1.85;
    color: #cbd5e1;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.75rem;
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.75rem;
    padding: 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.feature-card__icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.12);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-card__title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.feature-card__copy {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.75;
    font-size: 0.96rem;
}

.featured-section {
    margin-top: 3rem;
}

.featured-section__header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.about-section,
.contact-section {
    margin-top: 3rem;
    padding: 3rem 0;
}

.section-header {
    max-width: 760px;
    margin-bottom: 2rem;
}

.section-eyebrow {
    margin: 0;
    color: #0f172a;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
}

.section-title {
    margin: 0.75rem 0 1rem;
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 1.05;
    font-weight: 800;
    color: #0f172a;
}

.section-copy {
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.8;
}

.about-grid,
.contact-grid {
    display: grid;
    gap: 1.3rem;
    grid-template-columns: 1fr 1.5fr;
}

@media (max-width: 992px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.about-card,
.contact-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.75rem;
    padding: 1.6rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.about-card h3,
.contact-card h3 {
    margin: 0 0 0.8rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.about-card p,
.contact-card p {
    margin: 0;
    color: #475569;
    line-height: 1.8;
}

.contact-card--action {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-card--action .button {
    width: fit-content;
    margin-top: 1rem;
}

.featured-section__eyebrow {
    margin: 0;
    color: #64748b;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
}

.featured-section__title {
    margin: 0.5rem 0 0;
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 800;
    line-height: 1.05;
    color: #020617;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.3rem;
}

.course-grid__empty {
    grid-column: 1 / -1;
    border: 2px dashed #cbd5e1;
    border-radius: 2rem;
    padding: 2rem;
    text-align: center;
    color: #475569;
    background: #ffffff;
}

.course-card {
    display: flex;
    flex-direction: column;
    border-radius: 2rem;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.12);
}

.course-card__media {
    min-height: 220px;
    background: #f8fafc;
}

.course-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.course-card__placeholder {
    display: grid;
    place-items: center;
    min-height: 220px;
    color: #64748b;
    background: #f1f5f9;
}

.course-card__body {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.course-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.course-card__badge {
    display: inline-flex;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    background: #f8fafc;
}

.course-card__price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

.course-card__title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
}

.course-card__copy {
    margin: 0;
    color: #475569;
    font-size: 0.98rem;
    line-height: 1.75;
    min-height: 4.5rem;
}

.course-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.course-card__link {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}

.course-card__link:hover {
    text-decoration: underline;
}

.course-card__date {
    color: #64748b;
    font-size: 0.9rem;
}

.site-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.site-footer__container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-footer__links a {
    color: #475569;
}

.admin-nav {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.admin-nav__container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem;
}

.admin-nav__container a {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    color: #334155;
    font-size: 0.95rem;
    text-decoration: none;
}

@media (min-width: 900px) {
    .site-nav {
        display: flex;
    }
}

@media (max-width: 720px) {
    .site-header__container,
    .site-footer__container,
    .hero-banner__inner,
    .featured-section__header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .site-header__container {
        flex-direction: column;
        align-items: stretch;
    }

    .site-actions {
        justify-content: flex-start;
    }

    .featured-section__header {
        align-items: flex-start;
    }
}
