:root {
    --primary-color: #0078d4;
    --secondary-color: #50e6ff;
    --accent-color: #00b294;
    --text-primary: #2d2d2d;
    --text-secondary: #666666;
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --font-primary: "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --gradient-primary: linear-gradient(135deg, #0078d4, #00a1f4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Estilos generales */
.courses-section {
    padding: 5rem 0;
    background-color: var(--background-light);
    font-family: var(--font-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header de sección */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid de cursos */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    position: relative;
}

/* Tarjetas de curso */
.course-card {
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.course-card__header {
    position: relative;
    height: 160px; /* Altura ajustada */
    overflow: hidden;
}

.course-card__header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
}

.tech-icon {
    width: 52px; /* Más grande */
    height: 52px; /* Más grande */
    background: white;
    border-radius: 8px;
    padding: 6px; /* Menos padding */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tech-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.course-status {
    background: white;
    color: #0078D4;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.course-card__body {
    padding: 1.5rem;
}
.course-title {
    font-size: 1.5rem;
    color: #2D2D2D;
    margin-bottom: 1rem;
    font-weight: 500;
}

.course-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.925rem;
}

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

.course-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.course-instructor {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
}

.instructor-avatar {
    width: 64px;  /* Aumentado de tamaño */
    height: 64px; /* Aumentado de tamaño */
    border-radius: 50%;
    overflow: hidden; /* Para asegurar que la imagen respete el border-radius */
    border: 2px solid #0078D4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen cubra todo el espacio */
    object-position: center; /* Centra la imagen */
}

.instructor-info {
    flex-grow: 1;
}

.instructor-info strong {
    display: block;
    color: #2D2D2D;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.instructor-info span {
    color: #666;
    font-size: 0.9rem;
}
/* Botones */
.btn-details,
.btn-notify {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-details {
    background: var(--gradient-primary);
    color: white;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 1rem;
    padding: 0.8rem;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.whatsapp-button:hover {
    background-color: #128C7E;
}

.whatsapp-button i {
    font-size: 1.2rem;
}

/* Asegurar que los botones no se peguen */
.btn-details {
    margin-bottom: 0.5rem;
}

.btn-notify {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-details:hover,
.btn-notify:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-details::after,
.btn-notify::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-details:hover::after,
.btn-notify:hover::after {
    opacity: 1;
}

/* Modal mejorado */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    display: flex;
}

.modal-content {
    background: white;
    width: 95%;
    max-width: 800px; /* Aumentado de 600px */
    border-radius: 12px;
    position: relative;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 1.25rem; /* Reducido de 1.5rem */
    font-weight: 500;
    color: #2D2D2D;
    margin: 0;

}

.modal-close {
    background: none;
    border: none;
    color: #666;
    font-size: 1.75rem; /* Aumentado para la X */
    cursor: pointer;
    width: 40px; /* Tamaño fijo para el botón */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
    margin: -10px -10px -10px 0;
}


.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem 2rem; /* Aumentado el padding horizontal */
    max-height: 75vh; /* Aumentado para más contenido */
    overflow-y: auto;
    line-height: 1.6;
}


/* Formulario mejorado */
.form-container {
    padding: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Scrollbar personalizado */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}


.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.925rem;
    font-family: inherit; /* Heredará la fuente del padre */
}


.form-label.required::after {
    content: '*';
    color: #dc3545;
    margin-left: 4px;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--background-light);
    font-family: inherit; /* Heredará la fuente del padre */
}


.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--background-white);
    box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.1);
}

.form-submit-container {
    margin-top: 2rem;
}

.form-submit {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit; /* Heredará la fuente del padre */
}

.form-submit:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Detalles del curso en el modal */
.course-details {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.module {
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.course-details h3,
.course-details h4 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 400;
    font-size: 1.25rem;
    color: #2D2D2D;
    margin-bottom: 1.5rem;
}

.module-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2D2D2D;
    margin-bottom: 1rem;
}

.module-topics {
    list-style: none;
    padding: 0;
    margin: 0;
}

.module-topics li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: #666;
}

.module-topics li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #0078D4;
}


/* Toast mejorado */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    color: white;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
    box-shadow: var(--shadow-lg);
}

.toast.success {
    background: linear-gradient(45deg, #28a745, #34d058);
}

.toast.error {
    background: linear-gradient(45deg, #dc3545, #ff4757);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.course-card[data-course="databricks"] .header-background {
    background-image: url('images/fondo_cursos/fondo1.jpg');
}

.course-card[data-course="data-factory"] .header-background {
    background-image: url('images/fondo_cursos/fondo2.jpg');
}

.course-card[data-course="airflow"] .header-background {
    background-image: url('images/fondo_cursos/fondo3.jpg');
}

.course-card[data-course="azure"] .header-background {
    background-image: url('images/fondo_cursos/azure-fondo.jpg');
}

.course-card[data-course="matlab"] .header-background {
    background-image: url('images/fondo_cursos/matlab-fondo.png');
}

.course-card[data-course="python"] .header-background {
    background-image: url('images/fondo_cursos/python-fondo.jpg');
}

.course-card[data-course="machine_l"] .header-background {
    background-image: url('images/fondo_cursos/ml-fondo.jpg');
}

/* Contenedor de imagen de fondo */

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(2px) brightness(0.85);
    transform: scale(1.1);
}

/* Overlay para mejorar legibilidad */
.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 120, 212, 0.4); /* Un poco de azul semi-transparente */
}

/* Contenido del header */
.header-content {
    position: relative;
    z-index: 2;
    padding: 1rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}








/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .course-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        width: 90%;
        margin: 20px;
        max-height: 90vh;
    }
    .modal-body {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }

    .modal-header {
        padding: 1rem;
    }
    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .course-card__header {
        height: 120px;
        padding: 1.5rem;
    }

    .modal-body {
        padding: 1rem;
    }
}






/* Sección de precio */
.price-section {
    margin: 1.5rem -1.5rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(to right, rgba(0, 120, 212, 0.05), rgba(0, 120, 212, 0.1));
}

.offer-tag {
    margin-bottom: 1rem;
}

.offer-label {
    display: block;
    color: #0078D4;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.offer-expires {
    display: block;
    color: #666;
    font-size: 0.875rem;
}

.price-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.price-tag {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-original {
    color: #666;
    text-decoration: line-through;
    font-size: 0.9rem;
    opacity: 0.8;
}

.price-discounted {
    color: #2D2D2D;
    font-size: 1.5rem;
    font-weight: 600;
}

.price-original .currency,
.price-discounted .currency {
    font-size: 0.8em;
    margin-right: 0.25rem;
}

.discount-badge {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    transition: transform 0.3s ease;
}

.discount-badge:hover {
    transform: scale(1.05);
}

.discount-amount {
    font-size: 1.125rem;
    font-weight: 600;
}

.discount-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Ajuste del botón para que quede bien espaciado */
.btn-details {
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .price-section {
        margin: 1rem -1rem;
        padding: 1rem;
    }

    .price-discounted {
        font-size: 1.25rem;
    }
}









/* Estilos para el contenedor de búsqueda */
.search-container {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 1rem 2.5rem 1rem 1rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    background-color: white;
}

.search-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* Estilos para las tarjetas cuando se filtran */
.course-card.hidden {
    display: none;
}

@media (max-width: 768px) {
    .search-container {
        padding: 0 1rem;
    }
}