/* General Styles */
a {
    text-decoration: none;
    color: inherit;
    border: none !important;
}

/* Button Styles */
.index, .index2 {
    background-color:/* #61def2*/ #029e99;
    color: /*#181D38*/ #ebece8;
    border: 2px solid #029e99;
    border-radius: 6px;
    font-size: clamp(1rem, 10vw, 1.2rem); 
    font-weight: 600;
    padding: 10px;
    outline: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    transform: scale(1);
    transition: all 0.2s ease-in;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
    animation: fadeIn 2s ease-in-out 1s;
}

.index {
    width: 400px;
    min-width: 350px;
}

.index2 {
    width: 200px;
    min-width: 200px;
}

.index:hover, .index2:hover {
    background-color: #59d2ec;
    color: #ebece8;
    border-color: #59d2ec;
    transform: scale(0.98);
}

/* Certifications Section */
.certifications-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

.unique-h2 {
    text-align: center;
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-items: center;
}

.cert-card {
    width: 100%;
    max-width: 300px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 15px;
    transition: transform 0.3s ease-in-out;
}

.cert-card:hover {
    transform: scale(1.05);
}

.cert-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.unique-flag img {
    width: 50px;
    height: auto;
    margin-top: 10px;
}

.cert-info {
    padding: 10px;
}

.cert-info h1 {
    font-size: 18px;
    margin: 10px 0;
}

.cert-info p {
    font-size: 14px;
    color: #555;
}

.cert-info button {
    background-color: #D2B48C;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.cert-info button:hover {
    background-color: #B88A60;
}

/* Dropdown Menu Styles */
.emb {
    display: block;
    width: 100px;
    height: 50px;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}
  
.emb:hover, .emb:focus {
    color: #1e2125;
    text-decoration: none;
    background-color: #f8f9fa;
}

.nav-item .dropdown-menu a.emb {
    display: block !important;
    width: 100% !important;
    height: 40px;
    padding: 0.5rem 1rem !important;
    font-weight: 400 !important;
    color: #fff !important;
    background-color: #000 !important; 
    text-align: left !important;
    border: 0 !important;
}

.nav-item .dropdown-menu a.emb:hover, 
.nav-item .dropdown-menu a.emb:focus {
    color: #000 !important; 
    background-color: #fff !important; 
    text-decoration: none !important;
    border: 1px solid #000 !important; 
}

/* Courses Grid Section */
.cuadrados-container {
    background-size: cover;
    background-position: center;
    padding: 40px;
    text-align: center;
}

.cuadrado {
    position: relative;
    width: 100%;
    max-width: 295px;
    height: 200px;
    color: white;
    display: inline-block;
    margin: 8px;
    vertical-align: top;
    padding: 0 !important;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cuadrado:hover {
    transform: scale(1.05);
}

.cuadrado::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.cuadrado h5 {
    position: relative;
    z-index: 2;
    margin: 0;
}

.titulo {
    margin-bottom: 2px;
    color: white;
}

.subtitulo {
    font-size: 10px;
    color: white;
}

/* Specific backgrounds for each course */
.cuadrado1 { background-image: url('../src/img/ado.jpg'); }
.cuadrado2 { background-image: url('../src/img/vision.jpg'); }
.cuadrado3 { background-image: url('../src/img/esp2.jpg'); }
.cuadrado4 { background-image: url('../src/img/per2.jpg'); }
.cuadrado5 { background-image: url('../src/img/cal3.jpg'); }
.cuadrado6 { background-image: url('../src/img/Grande.png'); }
.cuadrado7 { background-image: url('../src/img/secundaria_inside.jpg'); } 

/* Video Grid Section */
.grid-3x3 {
    display: grid;
    gap: 20px;
    justify-content: center;
}

.grid-item {
    background-color: #181d38;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.grid-item iframe {
    width: 100%;
    height: 300px;
}

.grid-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Responsive Layouts */
@media (max-width: 576px) {
    .grid-3x3 {
        grid-template-columns: 1fr;
    }
    .row .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .grid-3x3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .row .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .grid-3x3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 993px) {
    .grid-3x3 {
        grid-template-columns: repeat(5, 1fr);
    }
    .row .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Dark Filter for Images */
.filtro-oscuro::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    z-index: 1;
}

.filtro-oscuro img {
    z-index: 2;
    border-radius: 15px;
}