/* ========================================
   ESTILOS PROFESIONALES - MÓDULOS
   ======================================== */

/* 1. GLASSMORPHISM EN TARJETAS MEJORADAS */
.glass-card {
    background: linear-gradient(135deg, rgba(31, 44, 74, 0.95) 0%, rgba(42, 63, 95, 0.9) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 166, 35, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 16px rgba(245, 166, 35, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 166, 35, 0.15), transparent);
    transition: left 0.8s;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 166, 35, 0.4);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 8px 24px rgba(245, 166, 35, 0.2);
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card-premium {
    background: linear-gradient(135deg,
        rgba(31, 44, 74, 0.98) 0%,
        rgba(42, 63, 95, 0.95) 50%,
        rgba(31, 44, 74, 0.98) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(245, 166, 35, 0.5);
    box-shadow:
        0 12px 40px rgba(245, 166, 35, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 60px rgba(245, 166, 35, 0.15);
    position: relative;
    overflow: hidden;
}

.glass-card-premium::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.12) 0%, transparent 70%);
    animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* 2. GRADIENTES ANIMADOS */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient-bg {
    background: linear-gradient(-45deg, #0D1728, #1F2C4A, #2A3F5F, #1F2C4A);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

.animated-gradient-border {
    position: relative;
    background: linear-gradient(45deg, #F5A623, #F47E3E, #F26522, #F5A623);
    background-size: 300% 300%;
    animation: gradient-shift 8s ease infinite;
    padding: 2px;
    border-radius: 1rem;
}

.animated-gradient-border::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: #1F2C4A;
    border-radius: calc(1rem - 2px);
    z-index: -1;
}

/* 3. HOVER EFFECTS 3D */
.card-3d {
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
}

.card-3d:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(2deg) translateZ(20px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(245, 166, 35, 0.3);
}

.card-3d-intense {
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-3d-intense:hover {
    transform: perspective(1000px) rotateY(-8deg) scale(1.05) translateZ(30px);
    box-shadow:
        -20px 20px 60px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(245, 166, 35, 0.4);
}

/* 4. TABS INTERACTIVOS */
.tab-container {
    background: rgba(31, 44, 74, 0.5);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
    border-radius: 1rem;
    display: inline-flex;
    gap: 0.5rem;
}

.tab-button {
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tab-button:hover::before {
    left: 100%;
}

.tab-button.active {
    background: linear-gradient(135deg, #F5A623, #F47E3E);
    color: #1F2C4A;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
    transform: translateY(-2px);
}

.tab-button:not(.active) {
    color: #94A3B8;
}

.tab-button:not(.active):hover {
    background: rgba(255, 255, 255, 0.05);
    color: #E2E8F0;
}

.tab-content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
}

.tab-content.active {
    opacity: 1;
    max-height: 10000px;
    transform: translateY(0);
}

/* 5. ACCORDION MEJORADO */
.accordion-item {
    background: rgba(31, 44, 74, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: rgba(245, 166, 35, 0.5);
    box-shadow: 0 5px 20px rgba(245, 166, 35, 0.2);
}

.accordion-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.accordion-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #F5A623, #F47E3E);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header::before {
    transform: scaleY(1);
}

.accordion-header:hover {
    background: rgba(245, 166, 35, 0.05);
}

.accordion-icon {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s ease;
    padding: 0 1.5rem;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    padding: 0 1.5rem 1.5rem;
}

/* 6. GRID LAYOUT DINÁMICO */
.dynamic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    grid-auto-flow: dense;
}

.grid-item-featured {
    grid-column: span 2;
    grid-row: span 2;
}

@media (max-width: 768px) {
    .grid-item-featured {
        grid-column: span 1;
        grid-row: span 1;
    }
}

.masonry-grid {
    column-count: 3;
    column-gap: 2rem;
}

.masonry-grid > * {
    break-inside: avoid;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .masonry-grid {
        column-count: 1;
    }
}

/* 7. ANIMACIONES ON SCROLL */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 60px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-60px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(60px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scroll-animate {
    opacity: 0;
}

.scroll-animate.animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate.fadeInUp {
    animation-name: fadeInUp;
}

.scroll-animate.fadeInLeft {
    animation-name: fadeInLeft;
}

.scroll-animate.fadeInRight {
    animation-name: fadeInRight;
}

.scroll-animate.scaleIn {
    animation-name: scaleIn;
}

/* Delays para efectos escalonados */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* 8. MICRO-INTERACCIONES */
.bounce-on-hover {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bounce-on-hover:hover {
    transform: scale(1.1);
    animation: bounce 0.6s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(245, 166, 35, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(245, 166, 35, 0.8);
    }
}

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.icon-rotate {
    transition: transform 0.3s ease;
}

.icon-rotate:hover {
    transform: rotate(360deg);
}

/* 9. COMPARACIÓN ANTES/DESPUÉS */
.comparison-container {
    position: relative;
    background: rgba(31, 44, 74, 0.5);
    border-radius: 1.5rem;
    overflow: hidden;
    padding: 3rem;
}

.comparison-side {
    flex: 1;
    padding: 2rem;
    border-radius: 1rem;
    transition: all 0.4s ease;
}

.comparison-before {
    background: linear-gradient(135deg, rgba(244, 126, 62, 0.1), rgba(242, 101, 34, 0.1));
    border: 2px solid rgba(244, 126, 62, 0.3);
}

.comparison-after {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.comparison-side:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.comparison-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
}

.comparison-before .comparison-icon {
    background: rgba(244, 126, 62, 0.2);
    color: #F47E3E;
}

.comparison-after .comparison-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

/* 10. TIMELINE DE IMPLEMENTACIÓN */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #F5A623, #F47E3E);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: row;
        padding-left: 80px;
    }
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5A623, #F47E3E);
    border: 4px solid #0D1728;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.2);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .timeline-marker {
        left: 30px;
    }
}

.timeline-marker:hover {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 0 8px rgba(245, 166, 35, 0.3);
}

.timeline-content {
    width: 45%;
    padding: 2rem;
    background: rgba(31, 44, 74, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .timeline-content {
        width: calc(100% - 80px);
    }
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
}

.timeline-content:hover {
    border-color: rgba(245, 166, 35, 0.5);
    box-shadow: 0 10px 40px rgba(245, 166, 35, 0.2);
    transform: translateY(-5px);
}

.timeline-date {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #F5A623, #F47E3E);
    color: #1F2C4A;
    font-weight: 700;
    border-radius: 2rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Efectos de partículas de fondo */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #F5A623;
    border-radius: 50%;
    animation: float 10s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* Responsive utilities */
@media (max-width: 640px) {
    .glass-card,
    .glass-card-premium {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* ========================================
   ESTILOS PROFESIONALES PARA ICONOS
   ======================================== */

/* Iconos con degradado de fondo */
.icon-gradient {
    background: linear-gradient(135deg, #F5A623 0%, #F47E3E 50%, #F26522 100%);
    padding: 1rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 24px rgba(245, 166, 35, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.icon-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.icon-gradient:hover::before {
    opacity: 1;
}

.icon-gradient:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow:
        0 16px 32px rgba(245, 166, 35, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        0 0 40px rgba(245, 166, 35, 0.3);
}

/* Iconos con borde degradado */
.icon-gradient-border {
    position: relative;
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(31, 44, 74, 0.9), rgba(42, 63, 95, 0.8));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.icon-gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #F5A623, #F47E3E, #F26522);
    border-radius: 1rem;
    z-index: -1;
    opacity: 0.8;
    transition: opacity 0.4s;
}

.icon-gradient-border:hover::before {
    opacity: 1;
    animation: rotate-gradient 3s linear infinite;
}

@keyframes rotate-gradient {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Iconos con efecto glow */
.icon-glow {
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.2), rgba(244, 126, 62, 0.2));
    border: 2px solid rgba(245, 166, 35, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 20px rgba(245, 166, 35, 0.3),
        inset 0 0 20px rgba(245, 166, 35, 0.1);
    transition: all 0.4s ease;
}

.icon-glow:hover {
    border-color: rgba(245, 166, 35, 0.8);
    box-shadow:
        0 0 40px rgba(245, 166, 35, 0.6),
        inset 0 0 30px rgba(245, 166, 35, 0.2);
    transform: scale(1.1);
}

/* Iconos con efecto shimmer continuo */
.icon-shimmer {
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(31, 44, 74, 0.95), rgba(42, 63, 95, 0.9));
    border: 2px solid rgba(245, 166, 35, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.icon-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(90deg,
        transparent,
        rgba(245, 166, 35, 0.4),
        transparent);
    animation: shimmer-continuous 3s infinite;
}

@keyframes shimmer-continuous {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Iconos con pulso de luz */
.icon-pulse {
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #F5A623, #F47E3E);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(245, 166, 35, 0.4);
    animation: icon-pulse-anim 2s ease-in-out infinite;
}

@keyframes icon-pulse-anim {
    0%, 100% {
        box-shadow:
            0 8px 24px rgba(245, 166, 35, 0.4),
            0 0 0 0 rgba(245, 166, 35, 0.7);
    }
    50% {
        box-shadow:
            0 8px 24px rgba(245, 166, 35, 0.6),
            0 0 0 15px rgba(245, 166, 35, 0);
    }
}

/* Contenedor de icono mejorado */
.icon-container {
    position: relative;
    padding: 1.25rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg,
        rgba(245, 166, 35, 0.15) 0%,
        rgba(244, 126, 62, 0.1) 50%,
        rgba(242, 101, 34, 0.15) 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.icon-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #F5A623, #F47E3E, #F26522);
    border-radius: 1.25rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
}

.icon-container:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow:
        0 12px 32px rgba(245, 166, 35, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        0 0 40px rgba(245, 166, 35, 0.2);
}

.icon-container:hover::before {
    opacity: 1;
}

/* SVG dentro de iconos */
.icon-gradient svg,
.icon-gradient-border svg,
.icon-glow svg,
.icon-shimmer svg,
.icon-pulse svg,
.icon-container svg {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.icon-gradient:hover svg,
.icon-gradient-border:hover svg,
.icon-glow:hover svg,
.icon-shimmer:hover svg,
.icon-container:hover svg {
    transform: scale(1.1) rotate(5deg);
}
