/**
 * FIDALTEC CORPORATE THEME
 * Paleta cromática corporativa aplicada a todo el sitio
 *
 * Colores principales:
 * - Naranja FidalTec: #f45903
 * - Gris Oscuro: #3c3c3b
 * - Blanco: #ffffff
 */

/* ========================================
   VARIABLES CSS OVERRIDE
   ======================================== */
:root {
    --primary: #f45903;           /* Naranja FidalTec */
    --secondary: #3c3c3b;         /* Gris Oscuro */
    --dark: #3c3c3b;              /* Gris Oscuro */
    --light: #f5f5f5;             /* Gris muy claro */
    --success: #f45903;           /* Naranja (para consistencia) */
    --warning: #f45903;           /* Naranja (para consistencia) */
}

/* ========================================
   BOTONES - NARANJA PRINCIPAL
   ======================================== */
.btn-primary {
    color: #fff;
    background-color: #f45903;
    border-color: #f45903;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus {
    color: #fff;
    background-color: #d14f03;
    border-color: #d14f03;
}

.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
    color: #fff;
    background-color: #d14f03;
    border-color: #d14f03;
}

.btn-primary.disabled,
.btn-primary:disabled {
    color: #fff;
    background-color: #f45903;
    border-color: #f45903;
    opacity: 0.6;
}

/* ========================================
   BOTONES - GRIS SECUNDARIO
   ======================================== */
.btn-secondary {
    color: #fff;
    background-color: #3c3c3b;
    border-color: #3c3c3b;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary.focus {
    color: #fff;
    background-color: #2a2a29;
    border-color: #2a2a29;
}

.btn-secondary:not(:disabled):not(.disabled):active,
.btn-secondary:not(:disabled):not(.disabled).active,
.show > .btn-secondary.dropdown-toggle {
    color: #fff;
    background-color: #2a2a29;
    border-color: #2a2a29;
}

/* ========================================
   BOTONES - WARNING (NARANJA)
   ======================================== */
.btn-warning {
    color: #fff;
    background-color: #f45903;
    border-color: #f45903;
}

.btn-warning:hover,
.btn-warning:focus {
    color: #fff;
    background-color: #d14f03;
    border-color: #d14f03;
}

/* ========================================
   BOTONES - SUCCESS (NARANJA)
   ======================================== */
.btn-success {
    color: #fff;
    background-color: #f45903;
    border-color: #f45903;
}

.btn-success:hover,
.btn-success:focus {
    color: #fff;
    background-color: #d14f03;
    border-color: #d14f03;
}

/* ========================================
   FONDOS
   ======================================== */
.bg-primary {
    background-color: #f45903 !important;
}

a.bg-primary:hover,
a.bg-primary:focus,
button.bg-primary:hover,
button.bg-primary:focus {
    background-color: #d14f03 !important;
}

.bg-secondary {
    background-color: #3c3c3b !important;
}

a.bg-secondary:hover,
a.bg-secondary:focus,
button.bg-secondary:hover,
button.bg-secondary:focus {
    background-color: #2a2a29 !important;
}

.bg-success {
    background-color: #f45903 !important;
}

.bg-warning {
    background-color: #f45903 !important;
}

.bg-dark {
    background-color: #3c3c3b !important;
}

/* ========================================
   TEXTOS
   ======================================== */
.text-primary {
    color: #f45903 !important;
}

a.text-primary:hover,
a.text-primary:focus {
    color: #d14f03 !important;
}

.text-secondary {
    color: #3c3c3b !important;
}

a.text-secondary:hover,
a.text-secondary:focus {
    color: #2a2a29 !important;
}

.text-success {
    color: #f45903 !important;
}

.text-warning {
    color: #f45903 !important;
}

/* ========================================
   BORDES
   ======================================== */
.border-primary {
    border-color: #f45903 !important;
}

.border-secondary {
    border-color: #3c3c3b !important;
}

/* ========================================
   ICONOS Y ELEMENTOS DECORATIVOS
   ======================================== */
.btn-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-icon.bg-primary {
    background-color: #f45903 !important;
}

.btn-icon.bg-secondary {
    background-color: #3c3c3b !important;
}

.btn-icon.bg-warning {
    background-color: #f45903 !important;
}

/* ========================================
   NAVBAR Y NAVEGACIÓN
   ======================================== */
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: #f45903 !important;
}

/* ========================================
   OVERLAYS Y EFECTOS
   ======================================== */
.overlay-bottom::before,
.overlay-top::before {
    background: linear-gradient(to bottom, rgba(60, 60, 59, 0.9), rgba(60, 60, 59, 0.9));
}

/* ========================================
   CATEGORÍAS Y ITEMS DE CURSOS/PRODUCTOS
   ======================================== */
.cat-item:hover,
.cat-item.active {
    background-color: #f45903 !important;
}

.courses-item .courses-text {
    background: linear-gradient(rgba(60, 60, 59, 0.9), rgba(60, 60, 59, 0.9));
}

/* ========================================
   SECCIÓN HERO/HEADER
   ======================================== */
.jumbotron {
    background: linear-gradient(rgba(244, 89, 3, 0.5), rgba(244, 89, 3, 0.5)),
                url(../img/fondobg.png) center center no-repeat !important;
    background-size: cover !important;
}

/* Asegurar que el overlay-bottom use el naranja */
.jumbotron.overlay-bottom::before {
    background: linear-gradient(rgba(244, 89, 3, 0.5), rgba(244, 89, 3, 0.5)) !important;
}

/* ========================================
   ENLACES Y LINKS
   ======================================== */
a {
    color: #f45903;
    transition: all 0.3s;
}

a:hover {
    color: #d14f03;
    text-decoration: none;
}

/* ========================================
   BADGES Y ETIQUETAS
   ======================================== */
.badge-primary {
    background-color: #f45903;
}

.badge-secondary {
    background-color: #3c3c3b;
}

/* ========================================
   PROGRESS BARS
   ======================================== */
.progress-bar {
    background-color: #f45903;
}

/* ========================================
   ALERTS
   ======================================== */
.alert-primary {
    background-color: rgba(244, 89, 3, 0.1);
    border-color: #f45903;
    color: #f45903;
}

.alert-secondary {
    background-color: rgba(60, 60, 59, 0.1);
    border-color: #3c3c3b;
    color: #3c3c3b;
}

/* ========================================
   CARDS
   ======================================== */
.card-header.bg-primary {
    background-color: #f45903 !important;
}

.card-header.bg-secondary {
    background-color: #3c3c3b !important;
}

/* ========================================
   PAGINATION
   ======================================== */
.page-item.active .page-link {
    background-color: #f45903;
    border-color: #f45903;
}

.page-link {
    color: #f45903;
}

.page-link:hover {
    color: #d14f03;
    background-color: rgba(244, 89, 3, 0.1);
    border-color: #f45903;
}

/* ========================================
   FORMS
   ======================================== */
.form-control:focus {
    border-color: #f45903;
    box-shadow: 0 0 0 0.2rem rgba(244, 89, 3, 0.25);
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #f45903;
    border-color: #f45903;
}

.custom-select:focus {
    border-color: #f45903;
    box-shadow: 0 0 0 0.2rem rgba(244, 89, 3, 0.25);
}

/* ========================================
   SECTION TITLES
   ======================================== */
.section-title h6::before,
.section-title h6::after {
    background: #f45903;
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    background: #f45903 !important;
}

.back-to-top:hover {
    background: #d14f03 !important;
}

/* ========================================
   FOOTER
   ======================================== */
.footer .btn.btn-social {
    border-color: #f45903;
    color: #f45903;
}

.footer .btn.btn-social:hover {
    background-color: #f45903;
    color: #fff;
}

/* ========================================
   HOVER EFFECTS
   ======================================== */
.team-item img {
    transition: all 0.3s;
}

.team-item:hover img {
    filter: grayscale(0%) brightness(1.1);
}

/* ========================================
   DROPDOWN MENUS
   ======================================== */
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(244, 89, 3, 0.1);
    color: #f45903;
}

.dropdown-item.active {
    background-color: #f45903;
}

/* ========================================
   CUSTOM SCROLLBAR (WEBKIT)
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #f45903;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d14f03;
}

/* ========================================
   ANIMACIONES Y TRANSICIONES
   ======================================== */
.btn,
.form-control,
.custom-select,
a,
.nav-link {
    transition: all 0.3s ease;
}

/* ========================================
   WHATSAPP FLOATING BUTTON
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s ease;
    animation: whatsappPulse 2s ease-in-out infinite;
    padding: 0;
    overflow: hidden;
    width: 60px;
    height: 60px;
}

.whatsapp-icon {
    font-size: 30px;
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-text {
    white-space: nowrap;
    padding-right: 20px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    max-width: 0;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #fff;
    box-shadow: 2px 2px 20px rgba(37, 211, 102, 0.6);
    text-decoration: none;
    width: auto;
}

.whatsapp-float:hover .whatsapp-text {
    opacity: 1;
    max-width: 300px;
}

@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* ========================================
   HEADER LOGO FLOATING ANIMATION
   ======================================== */
.jumbotron img {
    animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ========================================
   INTERACCIONES Y ANIMACIONES ADICIONALES
   ======================================== */

/* Efecto hover en las cajas de estadísticas */
.bg-primary.p-4,
.bg-secondary.p-4,
.bg-warning.p-4 {
    transition: all 0.4s ease;
    cursor: pointer;
}

.bg-primary.p-4:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px rgba(244, 89, 3, 0.4);
}

.bg-secondary.p-4:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px rgba(60, 60, 59, 0.4);
}

.bg-warning.p-4:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px rgba(244, 89, 3, 0.4);
}

/* Efecto hover en productos del carrusel */
.courses-item {
    transition: all 0.4s ease;
}

.courses-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.courses-item img {
    transition: all 0.5s ease;
}

.courses-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Efecto hover en ventajas competitivas */
.btn-icon {
    transition: all 0.4s ease;
}

.d-flex.mb-3:hover .btn-icon {
    transform: rotate(360deg) scale(1.2);
}

.d-flex.mb-3:hover h4 {
    color: #f45903;
}

/* Animación de entrada para elementos */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    animation: fadeInUp 0.8s ease;
}

/* Efecto parallax suave en imágenes */
.position-relative img {
    transition: transform 0.3s ease;
}

.position-relative:hover img {
    transform: scale(1.05);
}

/* Efecto hover en botones del navbar */
.navbar-nav .nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #f45903;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* Efecto pulse en iconos */
@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.btn-icon i {
    animation: iconPulse 2s ease-in-out infinite;
}

/* Efecto hover en formularios */
.form-control,
.custom-select {
    transition: all 0.3s ease;
}

.form-control:hover,
.custom-select:hover {
    border-color: #f45903;
    box-shadow: 0 0 10px rgba(244, 89, 3, 0.2);
}

/* Efecto de brillo en botones */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Efecto shake en back to top */
.back-to-top {
    transition: all 0.3s ease;
}

.back-to-top:hover {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================================
   FIX MARGIN BODY Y FOOTER
   ======================================== */
body {
    margin: 0 !important;
    padding: 0 !important;
}

html {
    margin: 0 !important;
    padding: 0 !important;
}

/* Eliminar espacio blanco debajo del footer */
.container-fluid.bg-dark.text-white-50.border-top {
    margin-bottom: 0 !important;
}

footer,
.container-fluid:last-of-type {
    margin-bottom: 0 !important;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    .btn-icon {
        width: 50px;
        height: 50px;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
    }

    .whatsapp-icon {
        font-size: 24px;
        min-width: 50px;
        height: 50px;
    }

    .whatsapp-text {
        font-size: 12px;
        padding-right: 15px;
    }
}

/* ========================================
   CAROUSEL PRODUCTS NAVIGATION ARROWS
   ======================================== */
.courses-carousel {
    position: relative !important;
}

.courses-carousel .owl-nav {
    position: absolute !important;
    width: 100% !important;
    height: 0 !important;
    top: 50% !important;
    left: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    z-index: 10 !important;
    pointer-events: none !important;
    margin: 0 !important;
}

.courses-carousel .owl-nav .owl-prev,
.courses-carousel .owl-nav .owl-next {
    position: relative !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    background: #f45903 !important;
    border-radius: 50% !important;
    font-size: 22px !important;
    transition: all 0.4s ease !important;
    pointer-events: all !important;
    box-shadow: 0 4px 15px rgba(244, 89, 3, 0.4) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.courses-carousel .owl-nav .owl-prev {
    margin-left: 15px !important;
}

.courses-carousel .owl-nav .owl-next {
    margin-right: 15px !important;
}

.courses-carousel .owl-nav .owl-prev:hover,
.courses-carousel .owl-nav .owl-next:hover {
    background: #3c3c3b !important;
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(60, 60, 59, 0.5) !important;
}

@media (max-width: 576px) {
    .courses-carousel .owl-nav .owl-prev,
    .courses-carousel .owl-nav .owl-next {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
    
    .courses-carousel .owl-nav .owl-prev {
        margin-left: 10px !important;
    }
    
    .courses-carousel .owl-nav .owl-next {
        margin-right: 10px !important;
    }
}

