:root {
    --primary-color: rgb(243, 101, 17);
    --secondary-color: rgb(0, 0, 0);
    --accent-color: rgb(243, 101, 17);
    --light-color: rgb(0, 175, 154);
    --text-color: rgb(0, 0, 0);
    --success-color: rgb(243, 101, 17);
    --logo-img-size: 80px; 
    --logo-font-size: 1.5rem;
    --nav-link-font: 1rem;
}
        
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: var(--tahoma);
    }

    body {
        background-color: #f9f9f9;
        color: var(--text-color);
        line-height: 1.6;
        font-size: 20px;
    }

    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
    }

    nav{
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed; 
        top: 0;
        left: 0;
        background-image: linear-gradient(90deg, #00af9b , #000000);
        z-index: 20; 
        width: 100%;
        height: 101px;
        padding: 0 1rem;
    }

    .logo-cemproza {
        /* Tamaño fluido: mínimo 1rem, ideal basado en viewport, máximo 1.6rem */
        font-size: 1.5rem;
        font-weight: 700;
        color: white;
        display: block;
        margin-left: 20%;
    }

    .logo-cemproza-img {
        width: var(--logo-img-size);
        height: calc(var(--logo-img-size) + 0px);
        object-fit: contain;
    }


    .nav-enlaces {
        list-style: none;
        display: flex;
        gap: 30px;
        margin-right: 10%;
    }

    /* Label que actúa como botón hamburguesa (por defecto oculto en desktop) */
    .nav-toggle {
        display: none;
        background: transparent;
        border: none;
        color: white;
        font-size: 1.6rem;
        cursor: pointer;
    }

    /* checkbox oculto que controla el menú en móviles */
    .nav-toggle-checkbox {
        position: absolute;
        left: -9999px;
        width: 0;
        height: 0;
        overflow: hidden;
    }

    .nav-enlaces a {
        color:#00ffe1;
        font-weight: 500;
        /* tamaño fluido del texto de enlaces */
        font-size: clamp(0.85rem, 1.6vw, var(--nav-link-font));
        transition: all 0.1s ease-in-out 0.1s;
    }

    .nav-enlaces a:hover {
        color: var(--accent-color);
        background-color: rgba(243, 100, 17, 0.425);
        padding: 5px 8px;
        border-radius: 5px;
    }

    .nav-enlaces .active {
        color: var(--accent-color);
    }
    h1, h2, h3, h4 {
        font-family: "Roboto Condensed", sans-serif;
    }
    h2{
        text-shadow: 2px 3px 6px rgba(34, 0, 0, 0.537);
    }
    a{
        text-decoration: none;
    }

    .description {
        max-width: 800px;
        margin: 0 auto 20px;
        font-size: 1.1rem;
    }

    .search-container {
        max-width: 600px;
        margin: 0 auto 20px;
        position: relative;
    }

    .search-container input {
        width: 100%;
        padding: 12px 20px;
        border: none;
        border-radius: 50px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        font-size: 1rem;
    }

    .search-container button {
        position: absolute;
        right: 5px;
        top: 5px;
        background: var(--primary-color);
        border: none;
        color: white;
        padding: 7px 15px;
        border-radius: 50px;
        cursor: pointer;
    }

    .categories {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 30px;
    }

    .category-btn {
        padding: 10px 20px;
        background-color: white;
        border: 2px solid var(--primary-color);
        border-radius: 50px;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .category-btn:hover, .category-btn.active {
        background-color: var(--primary-color);
        color: white;
    }

    .filters {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 15px;
        background-color: white;
        border: 1px solid #ddd;
        border-radius: 5px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .filter-btn.active {
        background-color: var(--secondary-color);
        color: white;
        border-color: var(--secondary-color);
    }

    .course-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
        margin-bottom: 40px;
    }

    .course-card {
        background-color: white;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .course-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

    .course-image {
        width: 100%;
        height: 200px;                 
        background-color: #ddd;        
        background-size: cover;        
        background-position: center;
        background-repeat: no-repeat;
        display: block;
    }

    .course-content {
        padding: 20px;
    }

    .course-category {
        display: inline-block;
        padding: 5px 12px;
        background-color: var(--light-color);
        border-radius: 20px;
        font-size: 0.8rem;
        margin-bottom: 10px;
        color: var(--secondary-color);
    }

    .course-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
        color: var(--secondary-color);
    }

    .course-info {
        display: flex;
        justify-content: space-between;
        margin-bottom: 15px;
        font-size: 0.9rem;
        color: #666;
    }

    .course-description {
        margin-bottom: 20px;
        font-size: 0.95rem;
        color: #555;
    }

    .course-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .enroll-btn {
        padding: 8px 15px;
        background-color: var(--primary-color);
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .enroll-btn:hover {
        background-color: var(--secondary-color);
    }

    .pagination {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-bottom: 40px;
    }

    .pagination-btn {
        padding: 8px 15px;
        background-color: white;
        border: 1px solid #ddd;
        border-radius: 5px;
        cursor: pointer;
    }

    .pagination-btn.active {
        background-color: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

    footer {
        text-align: center;
        padding: 20px;
        background-color: var(--secondary-color);
        color: white;
        border-radius: 10px 10px 0 0;
    }

    /* ===== Modal ===== */
    .modal { 
    position: fixed; inset: 0; 
    display: none; 
    z-index: 9999; 
    }
    .modal.is-open { display: block; }

    .modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.45);
    }

    .modal__dialog {
    position: relative;
    max-width: 900px;
    margin: 5vh auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    overflow: hidden;
    }

    .modal__close {
    position: absolute; right: 10px; top: 10px;
    background: transparent; border: 0;
    font-size: 28px; line-height: 1; cursor: pointer;
    }

    .modal__header { padding: 20px 24px 0; }
    .modal__title { font-size: 1.4rem; margin-bottom: 6px; color: var(--secondary-color); }
    .modal__meta { color: #666; font-size: .95rem; margin-bottom: 14px; }

    .modal__body { padding: 0 24px 24px; }
    .modal__subtitle { margin: 18px 0 10px; color: var(--secondary-color); }

    .modal__description { color:#444; }
    .modal__description ul { padding-left: 18px; }

    .modal__sedes {
        display: flex; 
        flex-wrap: wrap;
        gap: 14px;
    }
    .modal__sedes a {
    display: block; text-decoration: none;
    border: 1px solid #eee; border-radius: 10px; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    }
    .modal__sedes a:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
    .modal__sedes img { width: 100%; height: 140px; object-fit: cover; display: block; }
    .modal__sedes span { display: block; padding: 10px; color:#222; font-weight: 600; text-align: center; }
    .modal__sedes a {
    max-width: 280px;
    margin: 0 auto;
    }
    .modal__sedes {
    justify-content: center;
    }
    footer {
    background-color: black;
    color: #00ffe1;
    padding: 30px 20px;
    text-align: center;
    font-size: 0.9rem;
}

footer p {
    margin: 5px 0;
}

    @media (max-width: 560px){
    .modal__dialog { margin: 2vh 10px; }
    }

    @media (max-width: 768px) {
        .course-grid {
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        }
        
        .filters {
            flex-direction: column;
        }
    }

    @media (max-width: 480px) {
        .course-grid {
            grid-template-columns: 1fr;
        }
        
        .category-btn {
            padding: 8px 15px;
            font-size: 0.9rem;
        }
    }

/* Media Query: Diseño responsivo para dispositivos pequeños */
@media (max-width: 700px) {
    .logo-cemproza{
        padding: 0px 0px 30px 0px;
        margin-left: 0%;
    }
    nav{
        flex-wrap: wrap;
        gap: 10px;
        padding: 20px 12px;
    }
    
    .nav-enlaces a {
        font-size: 0.85em;
        padding: 8px 10px;
    }

    /* mostrar label hamburguesa en tablets y móviles */
    .nav-toggle {
        padding: 10px 30px 40px 10px;
        display: flex;
        justify-content: end;
    }

    .nav-enlaces {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 10px 0 20px 0;
        background: linear-gradient(90deg, rgba(0,175,155,0.95), rgba(0,0,0,0.9));
        box-shadow: 0px 30px 60px 0px #33305a94;
    }

    /* cuando el checkbox esté marcado, mostrar el menú */
    .nav-toggle-checkbox:checked ~ .nav-enlaces {
        display: flex;
        margin-top: -20px;
        flex-direction: column;
        margin-left: 46px;
        border-radius: 30px;
    }
}
/* Asegurar que el contenido no quede oculto detrás del nav fijo */
body {
    padding-top: 101px;
}






