/* ========================================
   STYLES.CSS - INSTITUTO ASTECO
   ======================================== */

/* ========================================
   1. RESET Y BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    overflow-x: hidden !important;
}

body {
    background: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ========================================
   2. CONTENEDOR PRINCIPAL CENTRADO
   ======================================== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 255);
    /* box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px; */
    /* margin-top: 5%;  */
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
}

/* ========================================
   3. TIPOGRAFÍA ORGANIZADA
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-size: 26px !important;
    font-weight: bold;
    color: #2c3e50;
    margin: 20px 0 15px 0;
    text-align: center;
    line-height: 1.4;
}

p {
    font-size: 18px !important;
    line-height: 1.6;
    margin: 15px 0;
    text-align: justify;
    color: #555;
}

blockquote {
    background: #f8f9fa;
    border-left: 4px solid #163886;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    border-radius: 0 5px 5px 0;
}

blockquote p {
    margin: 0;
    font-size: 16px !important;
}

/* ========================================
   4. DROPDOWN PRINCIPAL
   ======================================== */
.dropdown {
    position: fixed !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 10000 !important;
}

.dropdown .btn {
    background: white !important;
    /* border: 1px solid #ddd !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important; */
    padding: 10px 15px;
}

.dropdown-menu {
    background: white !important;
    backdrop-filter: blur(10px) !important;
    /* border: 1px solid #ddd !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px; */
    min-width: 250px;
}

.dropdown-menu li a {
    padding: 12px 20px;
    font-size: 14px;
    color: #555;
    transition: all 0.3s ease;
}

.dropdown-menu li a:hover,
.dropdown-menu li a.active {
    background: #163886 !important;
    color: white !important;
}

/* ========================================
   5. SUBMENUS HORIZONTALES (TABS)
   ======================================== */
.nav.nav-tabs {
    background: #163886 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: none !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    margin: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.nav.nav-tabs::-webkit-scrollbar {
    height: 4px;
}

.nav.nav-tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.nav.nav-tabs li {
    flex-shrink: 0;
    white-space: nowrap;
}

.nav.nav-tabs li a {
    background: transparent !important;
    color: white !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 12px 18px !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    border-bottom: 3px solid transparent !important;
    white-space: nowrap;
}

.nav.nav-tabs li a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-bottom-color: #fff !important;
}

.nav.nav-tabs li.active a,
.nav.nav-tabs li a.active {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-bottom-color: #fff !important;
    font-weight: bold !important;
}

/* ========================================
   6. CONTENIDO DE TABS
   ======================================== */
.tab-content {
    background: white;
    padding: 30px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   7. TABLAS
   ======================================== */
.table {
    margin: 20px 0 !important;
    background: white !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.table th {
    background: #163886 !important;
    color: white !important;
    font-weight: bold !important;
    padding: 15px !important;
    font-size: 14px !important;
    text-align: center;
}

.table td {
    padding: 12px 15px !important;
    border-top: 1px solid #eee !important;
    font-size: 15px !important;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: rgba(22, 56, 134, 0.1) !important;
}

/* ========================================
   8. MULTIMEDIA
   ======================================== */
iframe {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

video {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

audio {
    width: 100% !important;
    margin: 15px 0 !important;
    border-radius: 5px !important;
}

/* ========================================
   9. IMÁGENES
   ======================================== */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

#sinmargen img,
#sinmargenuno img {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* ========================================
   10. MODALES
   ======================================== */
.modal {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.modal-dialog {
    margin: 5% auto !important;
    max-width: 90% !important;
}

.modal-content {
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    border: none;
}

.modal-header {
    background: #163886;
    color: white;
    border-radius: 10px 10px 0 0;
}

.modal-footer {
    border-top: 1px solid #eee;
}

/* ========================================
   11. LISTAS
   ======================================== */
ul, ol {
    margin: 15px 0;
    padding-left: 30px;
}

li {
    font-size: 14px !important;
    line-height: 1.6;
    margin-bottom: 8px;
    text-align: left !important;
}

/* ========================================
   12. GRID RESPONSIVE
   ======================================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
    margin-bottom: 20px;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
}

/* ========================================
   13. SECCIONES
   ======================================== */
.course-section {
    background: white;
    margin: 30px 0;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #163886;
}

.course-section:not(.active) {
    display: none;
}

.course-section.active {
    display: block;
    animation: slideIn 0.5s ease-in-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   14. BOTONES
   ======================================== */
.btn {
    border-radius: 6px !important;
    padding: 10px 20px;
    font-size: 14px;
    transition: all 0.3s ease !important;
    border: none;
}

.btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.btn-default {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-default:hover {
    background: #bdc3c7;
    color: #2c3e50;
}

/* ========================================
   15. NAVEGACIÓN CON FLECHAS - NUEVO
   ======================================== */
.navigation-arrows {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    pointer-events: none;
}

.arrow-left-container {
    left: 20px;
}

.arrow-right-container {
    right: 20px;
}

.nav-arrow {
    background: #163886;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(22, 56, 134, 0.3);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.nav-arrow:hover {
    background: #2c4a8a;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(22, 56, 134, 0.4);
}

.nav-arrow:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: scale(1);
    box-shadow: 0 2px 10px rgba(189, 195, 199, 0.3);
}

.nav-arrow:disabled:hover {
    background: #bdc3c7;
    transform: scale(1);
}

.arrow-left {
    padding-right: 2px; /* Ajustar visualmente el símbolo */
}

.arrow-right {
    padding-left: 2px; /* Ajustar visualmente el símbolo */
}

/* Indicador de progreso */
.progress-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(22, 56, 134, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

/* ========================================
   16. RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .main-container {
        margin-top: 60px;
        padding: 15px;
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .content-wrapper {
        padding: 20px;
    }
    
    .dropdown {
        top: 10px !important;
        left: 10px !important;
    }
    
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .nav.nav-tabs {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }
    
    .nav.nav-tabs li {
        flex: 1;
        min-width: calc(50% - 2px);
    }
    
    .nav.nav-tabs li a {
        text-align: center !important;
        padding: 10px 8px !important;
        font-size: 12px !important;
    }
    
    iframe {
        height: 250px;
    }

    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .arrow-left-container {
        left: 10px;
    }

    .arrow-right-container {
        right: 10px;
    }

    .progress-indicator {
        font-size: 11px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .nav.nav-tabs li {
        min-width: 100%;
    }
    
    .nav.nav-tabs li a {
        padding: 8px 10px !important;
        font-size: 11px !important;
    }
    
    iframe {
        height: 200px;
    }

    .nav-arrow {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .arrow-left-container {
        left: 5px;
    }

    .arrow-right-container {
        right: 5px;
    }

    .progress-indicator {
        font-size: 10px;
        padding: 5px 10px;
        bottom: 10px;
    }
}

/* ========================================
   17. UTILIDADES
   ======================================== */
.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.text-justify {
    text-align: justify !important;
}

.mt-20 {
    margin-top: 20px !important;
}

.mb-20 {
    margin-bottom: 20px !important;
}

/* ========================================
   18. LOADER (CONSERVADO)
   ======================================== */
#loader-wrapper {
    position: fixed;
    top: 20%;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

#loader {
    display: block;
    position: relative;
    left: 50%;
    top: 20%;
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #163886;
    animation: spin 2s linear infinite;
    z-index: 1001;
}

#loader:before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #e74c3c;
    animation: spin 3s linear infinite;
}

#loader:after {
    content: "";
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #f9c922;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loader-wrapper .loader-section {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background: #2a80c2;
    z-index: 1000;
    transform: translateX(0);
    background-image: url(../images/fondoCargando.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

#loader-wrapper .loader-section.section-left {
    left: 0;
}

#loader-wrapper .loader-section.section-right {
    right: 0;
}

.loaded #loader-wrapper .loader-section.section-left {
    transform: translateX(-100%);
    transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}

.loaded #loader-wrapper .loader-section.section-right {
    transform: translateX(100%);
    transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}

.loaded #loader {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.loaded #loader-wrapper {
    visibility: hidden;
    transform: translateY(-100%);
    transition: all 0.3s 1s ease-out;
}