/* Variables de color - Actualizado para consistencia azul */
:root {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #1e40af;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    --bg-light-gradient: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --white-80: rgba(255, 255, 255, 0.8);
    --white-60: rgba(255, 255, 255, 0.6);
    --danger: #dc3545;
    --danger-soft: rgba(59, 130, 246, 0.1); /* Cambiado a azul */
    --danger-gradient: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%); /* Cambiado a azul */
}

/* Navbar Logo - Más grande */
.navbar-logo {
    height: 55px;
    width: auto;
}

.navbar-brand img {
    height: 55px !important;
    width: auto;
}

.logo-fallback {
    display: none !important;
}

/* Hero Section con imagen de fondo */
.hero-section {
    height: 70vh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/static/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Overlay negro más oscuro para mejor contraste */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.75) 0%, 
        rgba(0, 0, 0, 0.65) 50%, 
        rgba(0, 0, 0, 0.55) 100%);
}

/* Hero Section - Contenido más abajo (60px menos) */
.hero-content-height {
    min-height: 70vh;
    align-items: flex-end !important;
    padding-bottom: 10px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.shape-1 {
    width: 150px;
    height: 150px;
    top: 15%;
    right: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 100px;
    height: 100px;
    top: 60%;
    right: 5%;
    animation-delay: 3s;
}

.shape-3 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    left: 15%;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.4; }
    50% { transform: translateY(-15px) scale(1.02); opacity: 0.7; }
}

/* Animación para reemplazar el logo */
.hero-animation {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.pulse-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 3s ease-in-out infinite;
}

.pulse-circle.delay-1 {
    width: 100px;
    height: 100px;
    border-color: rgba(255, 255, 255, 0.4);
    animation-delay: 1s;
}

.pulse-circle.delay-2 {
    width: 140px;
    height: 140px;
    border-color: rgba(255, 255, 255, 0.2);
    animation-delay: 2s;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.3; }
}

.text-gradient {
    background: linear-gradient(135deg, #60a5fa, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-white-80 { color: var(--white-80); }
.text-white-60 { color: var(--white-60); }
.text-primary-light { color: var(--primary-light); }

.bg-gradient-primary {
    background: var(--primary-gradient);
}

.bg-primary-soft {
    background-color: rgba(59, 130, 246, 0.1);
}

.bg-danger-soft {
    background-color: var(--danger-soft);
}

.bg-light-gradient {
    background: var(--bg-light-gradient);
}

.letter-spacing {
    letter-spacing: 0.1em;
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

/* Filtros modernos */
.filter-container {
    padding: 20px;
}

.filter-wrapper {
    display: inline-flex;
    background: white;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    gap: 5px;
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
}

.filter-btn.active {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.filter-btn .count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 8px;
}

.filter-btn:hover:not(.active) {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

/* Cards de convocatorias */
.convocatoria-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.convocatoria-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-status {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.status-active {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.status-closed {
    background: rgba(107, 114, 128, 0.9);
    color: white;
}

.pulse {
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.card-content {
    padding: 30px 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header-custom {
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.area-badge {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
    flex: 1;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-item i {
    width: 18px;
    color: var(--primary);
    margin-right: 10px;
    font-size: 16px;
}

.card-footer-custom {
    padding: 0 25px 25px;
}

.btn-apply {
    width: 100%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 15px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.btn-apply:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.btn-disabled {
    width: 100%;
    background: #f8fafc;
    color: var(--text-secondary);
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Feature Cards mejoradas */
.feature-card-new {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.feature-card-new:hover::before {
    transform: translateX(0);
}

.feature-card-new:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.feature-icon-new {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

.feature-card-new:hover .feature-icon-new {
    transform: scale(1.1);
    background: var(--primary-gradient);
    color: white;
}

.feature-card-new h5 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card-new p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Sección de Principios con fondo azul suave */
.principios-section {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 80px 0;
    position: relative;
}

.principios-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 60px 60px;
}

.principio-card-premium {
    background: white;
    border-radius: 25px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.principio-card-premium.featured {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border: 2px solid rgba(59, 130, 246, 0.2);
}

.principio-card-premium:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
}

.principio-number {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-gradient);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.principio-icon-premium {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
    transition: all 0.4s ease;
}

.principio-icon-premium.large {
    width: 90px;
    height: 90px;
    font-size: 2.5rem;
}

.principio-card-premium:hover .principio-icon-premium {
    transform: scale(1.15) rotate(5deg);
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.principio-card-premium h5 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.principio-card-premium.featured h5 {
    font-size: 1.6rem;
    color: var(--primary);
}

.principio-card-premium p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.card-accent {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px 2px 0 0;
    transition: all 0.3s ease;
}

.principio-card-premium:hover .card-accent {
    width: 80px;
    height: 6px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* Títulos de sección - Mantener colores originales */
.section-title-original {
    color: var(--text-primary);
}

/* Footer con fondo azul oscuro */
.footer-premium {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    padding: 60px 0 30px;
    position: relative;
    overflow: hidden;
}

.footer-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

/* Footer logo más grande y centrado */
.footer-logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.footer-logo-large {
    max-height: 100px;
    width: auto;
}

.footer-description {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 25px;
}

.footer-social {
    justify-content: center;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-location h6 {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.footer-location p {
    font-size: 0.85rem;
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-location small {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-button:hover {
    background: #1faa55;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

@keyframes whatsappPulse {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% { 
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0);
    }
}

.footer-section h6 {
    color: #fbbf24;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #fbbf24;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact-item i {
    color: var(--danger);
    margin-right: 10px;
    width: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--danger);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        height: 60vh;
        min-height: 500px;
    }
    
    .hero-content-height {
        padding-bottom: 20px;
    }
    
    .stats-section {
        margin-top: -80px;
        padding-top: 120px;
    }
    
    .stat-card-modern {
        margin-bottom: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .display-4 {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .floating-shape {
        display: none;
    }
    
    .filter-wrapper {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .filter-btn {
        justify-content: center;
        width: 100%;
    }
    
    .hero-stats .col-4 {
        margin-bottom: 15px;
    }

    .navbar-logo, .navbar-brand img {
        height: 45px !important;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-button {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }

    .principio-card-premium {
        margin-bottom: 20px;
    }

    .footer-social {
        justify-content: center;
    }
}

/* Animation delays for cards */
.convocatoria-item:nth-child(1) { animation-delay: 0.1s; }
.convocatoria-item:nth-child(2) { animation-delay: 0.2s; }
.convocatoria-item:nth-child(3) { animation-delay: 0.3s; }
.convocatoria-item:nth-child(4) { animation-delay: 0.4s; }
.convocatoria-item:nth-child(5) { animation-delay: 0.5s; }
.convocatoria-item:nth-child(6) { animation-delay: 0.6s; }

.convocatorias-grid {
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* === ESTILOS PARA ESTADÍSTICAS === */
.stats-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    margin-top: -100px;
    position: relative;
    z-index: 10;
    padding: 140px 0 80px 0;
}

.stat-card-modern {
    background: white;
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    text-align: center;
    border: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.stat-card-modern:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 25px auto;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

/* Hero content más abajo */
.hero-content-height {
    min-height: 70vh;
    align-items: flex-end !important;
    padding-bottom: 10px;
}