/*=============================================
            BANNER 2 SECTION - CSS INDEPENDIENTE
=============================================*/

/* Variables de color específicas del módulo */
.banner2-section {
    --banner2-primary: #2c3e50;
    --banner2-accent: #e74c3c;
    --banner2-secondary: #3498db;
    --banner2-light: #f8f9fa;
    --banner2-dark: #1a252f;
    --banner2-gradient-start: rgba(44, 62, 80, 0.95);
    --banner2-gradient-end: rgba(26, 37, 47, 0.95);
    --banner2-text-color: #ffffff;
    --banner2-line-color: #e74c3c;
    --banner2-particle-color: rgba(231, 76, 60, 0.3);
}

/* Contenedor principal */
.banner2-section {
    position: relative;
    background: linear-gradient(135deg, var(--banner2-gradient-start), var(--banner2-gradient-end));
    color: var(--banner2-text-color);
    overflow: hidden;
    font-family: 'Ubuntu', sans-serif;
    padding: 6rem 0;
}

/* Background overlay */
.banner2-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(231, 76, 60, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(46, 204, 113, 0.1) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
}

/* Background pattern */
.banner2-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 40px 40px;
    z-index: 1;
    opacity: 0.5;
    pointer-events: none;
}

/* Contenedor de contenido */
.banner2-section .container {
    position: relative;
    z-index: 2;
}

/* Texto principal */
.banner2-main-text {
    max-width: 900px;
    margin: 0 auto;
}

.banner2-title {
    font-size: 2.2rem;
    line-height: 1.3;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.banner2-title strong {
    font-weight: 700;
    color: var(--banner2-accent);
    position: relative;
    display: inline-block;
}

.banner2-title strong::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--banner2-accent), var(--banner2-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.banner2-section:hover .banner2-title strong::after {
    transform: scaleX(1);
}

/* Línea decorativa */
.banner2-line-container {
    position: relative;
    padding: 1rem 0;
}

.banner2-line {
    filter: drop-shadow(0 0 8px rgba(231, 76, 60, 0.5));
    transition: all 0.5s ease;
    max-width: 338px;
}

.banner2-line:hover {
    filter: drop-shadow(0 0 12px rgba(231, 76, 60, 0.7));
    transform: scale(1.05);
}

.banner2-line-container::before,
.banner2-line-container::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--banner2-line-color));
    opacity: 0;
    transition: opacity 0.5s ease;
}

.banner2-line-container::before {
    left: calc(50% - 220px);
    transform: translateY(-50%);
}

.banner2-line-container::after {
    right: calc(50% - 220px);
    transform: translateY(-50%) scaleX(-1);
}

.banner2-section:hover .banner2-line-container::before,
.banner2-section:hover .banner2-line-container::after {
    opacity: 1;
}

/* Texto secundario */
.banner2-secondary-text {
    max-width: 800px;
    margin: 0 auto;
}

.banner2-description {
    font-size: 1.2rem;
    line-height: 1.6;
    font-weight: 300;
    opacity: 0.9;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 0;
}

.banner2-description::first-line {
    font-weight: 400;
}

/* Partículas flotantes */
.banner2-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.banner2-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--banner2-particle-color);
    animation: particle-float linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Espaciadores */
.banner2-spacer-top,
.banner2-spacer-bottom {
    height: 2rem;
    transition: height 0.3s ease;
}

/* Animaciones de entrada */
@keyframes banner2-fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes banner2-scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes banner2-line-draw {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Aplicar animaciones */
.banner2-title {
    animation: banner2-fade-up 0.8s ease 0.2s forwards;
    opacity: 0;
}

.banner2-line {
    animation: banner2-line-draw 0.8s ease 0.5s forwards;
    opacity: 0;
    transform-origin: center;
}

.banner2-description {
    animation: banner2-fade-up 0.8s ease 0.8s forwards;
    opacity: 0;
}

/* Efectos de hover en la sección completa */
.banner2-section:hover .banner2-title {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.banner2-section:hover .banner2-description {
    opacity: 1;
}

/* Estados de carga */
.banner2-line.loading {
    background: linear-gradient(90deg, #34495e 25%, #4a657f 50%, #34495e 75%);
    background-size: 200% 100%;
    animation: banner2-loading 1.5s infinite;
    border-radius: 5px;
    height: 10px;
}

@keyframes banner2-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.banner2-line.loaded {
    background: none;
    animation: none;
}

/* Responsive */
@media (max-width: 1199px) {
    .banner2-section {
        padding: 5rem 0;
    }
    
    .banner2-title {
        font-size: 2rem;
    }
    
    .banner2-description {
        font-size: 1.1rem;
    }
}

@media (max-width: 992px) {
    .banner2-section {
        padding: 4rem 0;
    }
    
    .banner2-title {
        font-size: 1.8rem;
    }
    
    .banner2-description {
        font-size: 1.05rem;
        padding: 0 1rem;
    }
    
    .banner2-line {
        max-width: 280px;
    }
    
    .banner2-line-container::before,
    .banner2-line-container::after {
        width: 30px;
    }
    
    .banner2-line-container::before {
        left: calc(50% - 180px);
    }
    
    .banner2-line-container::after {
        right: calc(50% - 180px);
    }
}

@media (max-width: 768px) {
    .banner2-section {
        padding: 3.5rem 0;
    }
    
    .banner2-title {
        font-size: 1.6rem;
        line-height: 1.4;
        padding: 0 1rem;
    }
    
    .banner2-description {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .banner2-line {
        max-width: 250px;
    }
    
    .banner2-line-container::before,
    .banner2-line-container::after {
        display: none;
    }
    
    .banner2-pattern {
        background-size: 30px 30px;
    }
}

@media (max-width: 576px) {
    .banner2-section {
        padding: 3rem 0;
    }
    
    .banner2-title {
        font-size: 1.4rem;
        padding: 0 0.5rem;
    }
    
    .banner2-description {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }
    
    .banner2-line {
        max-width: 220px;
    }
    
    .banner2-spacer-top,
    .banner2-spacer-bottom {
        height: 1.5rem;
    }
}

@media (max-width: 400px) {
    .banner2-section {
        padding: 2.5rem 0;
    }
    
    .banner2-title {
        font-size: 1.3rem;
    }
    
    .banner2-description {
        font-size: 0.9rem;
    }
    
    .banner2-line {
        max-width: 200px;
    }
}

/* Modo oscuro (ajustes si es necesario) */
@media (prefers-color-scheme: dark) {
    .banner2-section {
        --banner2-gradient-start: rgba(26, 37, 47, 0.95);
        --banner2-gradient-end: rgba(20, 30, 40, 0.95);
        --banner2-particle-color: rgba(231, 76, 60, 0.2);
    }
    
    .banner2-pattern {
        opacity: 0.3;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .banner2-section {
        background: var(--banner2-dark);
    }
    
    .banner2-title strong {
        text-decoration: underline;
    }
    
    .banner2-title strong::after {
        display: none;
    }
    
    .banner2-line {
        filter: none;
        border: 2px solid var(--banner2-accent);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .banner2-title,
    .banner2-line,
    .banner2-description,
    .banner2-particle {
        animation: none !important;
        transition: none !important;
    }
    
    .banner2-particles {
        display: none;
    }
}

/* Hover devices only */
@media (hover: hover) and (pointer: fine) {
    .banner2-title strong:hover::after {
        transform: scaleX(1);
    }
    
    .banner2-line:hover {
        transform: scale(1.08);
    }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .banner2-title strong:active {
        color: var(--banner2-secondary);
    }
    
    .banner2-line:active {
        transform: scale(1.05);
    }
}

/* Impresión */
@media print {
    .banner2-section {
        background: white !important;
        color: black !important;
        padding: 2rem 0 !important;
    }
    
    .banner2-background-overlay,
    .banner2-pattern,
    .banner2-particles {
        display: none !important;
    }
    
    .banner2-title strong {
        color: black !important;
    }
    
    .banner2-line {
        filter: none !important;
        opacity: 1 !important;
    }
}