/* Variables CSS para los colores corporativos */
:root {
    --primary-blue: #352f62;
    --primary-orange: #e45504;
    --light-blue: #4a4374;
    --light-orange: #f76b1c;
    --dark-blue: #2a2550;
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--primary-orange) 0%, var(--light-orange) 100%);
    --gradient-hero: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-orange) 100%);
    --shadow-light: 0 4px 6px rgba(53, 47, 98, 0.1);
    --shadow-medium: 0 8px 25px rgba(53, 47, 98, 0.15);
    --shadow-heavy: 0 15px 35px rgba(53, 47, 98, 0.2);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

main {
    min-height: calc(100vh - 200px); /* Altura mínima menos header y footer */
}

/* Navbar personalizada */
.navbar-ont {
    background: linear-gradient(135deg, #352f62 0%, #352f62 100%) !important;
 box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    min-height: 70px;
    height: 76px;
}

.navbar-ont.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-heavy);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    margin: 0 0.25rem;
    padding: 0.5rem 0.75rem !important;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.navbar-text {
    color: rgba(255,255,255,0.9) !important;
    font-size: 0.85rem;
    margin-right: 0.75rem !important;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-ont-primary {
    background: var(--gradient-secondary);
    border: none;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-ont-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
    color: white;
}

/* Ajustes para navbar responsive */
@media (max-width: 1200px) {
    .navbar-nav .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem !important;
    }
    
    .navbar-text {
        font-size: 0.8rem;
        max-width: 120px;
    }
    
    .btn-ont-primary {
        font-size: 0.8rem;
        padding: 0.35rem 0.8rem;
    }
}

@media (max-width: 992px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
        text-align: center;
    }
    
    .navbar-text {
        text-align: center;
        max-width: none;
        margin: 0.5rem 0 !important;
    }
    
    .btn-ont-primary {
        margin-top: 0.5rem;
    }
}

/* Hero Section */
.hero-section {
    background: var(--gradient-hero);
    color: white;
    padding: 0;
    margin-top: 0; /* Espacio para navbar fija */
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,0 1000,0 1000,100 0,80"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 5rem 0 3rem;
        margin-top: 70px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 4rem 0 3rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
}

/* Cards mejoradas */
.card-ont {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    overflow: hidden;
    background: white;
}

.card-ont:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.card-ont .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-ont:hover .card-img-top {
    transform: scale(1.05);
}

.card-ont .card-body {
    padding: 1.5rem;
}

.card-ont .card-title {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-ont .card-footer {
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* Secciones */
.section-ont {
    padding: 4rem 0;
    position: relative;
}

.section-ont:nth-child(even) {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.section-title {
    color: var(--primary-blue);
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

/* Sobre ONT */
.about-ont {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
}

.about-ont ul {
    list-style: none;
    padding-left: 0;
}

.about-ont ul li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
}

.about-ont ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-orange);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Video container */
.video-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

/* Equipo de soporte */
.team-member {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.team-member img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-orange);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.team-member:hover img {
    border-color: var(--primary-blue);
    transform: scale(1.05);
}

.team-member h6 {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.team-member p {
    color: var(--primary-orange);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Aliados */


/* Footer */
.footer-ont {
    background: linear-gradient(135deg, #2a2550 0%, #c44a04 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-ont h5 {
    color: var(--light-orange);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-ont a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-ont a:hover {
    color: var(--light-orange);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* .fade-in-up {
    animation: fadeInUp 0.6s ease-out;
} */

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    
    
    .team-member img {
        width: 100px;
        height: 100px;
    }
}

/* Estilos para la página de noticia individual */
.noticia-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.noticia-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
}

.noticia-content img {
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
}

.btn-back {
    background: var(--gradient-secondary);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
    text-decoration: none;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mejoras adicionales para el layout */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Asegurar que el contenido no se pegue a la navbar */
body {
    padding-top: 0;
}

/* Espaciado mejorado para secciones */
.section-ont:first-of-type {
    padding-top: 2rem;
}

/* Navbar toggler personalizado */
.navbar-toggler {
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
/* Estilos para el carrusel hero */
#heroCarousel {
    width: 100%;
    height: 100%;
}

.carousel-item {
    height: 100%;
    min-height: 500px;
    background: var(--gradient-hero);
    color: white;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;

}

.carousel-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0,0,0,0.7));
    z-index: 1;
    transition: opacity 0.5s ease-in-out;
}


.carousel-caption {
    position: relative;
    z-index: 2;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,0 1000,0 1000,100 0,80"/></svg>');
    background-size: cover;
}

.carousel-indicators {
    bottom: 30px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: none;
    margin: 0 5px;
}

.carousel-indicators .active {
    background-color: white;
}

.carousel-control-prev, 
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev-icon, 
.carousel-control-next-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-size: 100% 100%;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.5));
}

@media (max-width: 768px) {
    .carousel-item {
        min-height: 450px;
        padding: 4rem 0 3rem;
    }
    
    .carousel-indicators {
        bottom: 20px;
    }
}

@media (max-width: 576px) {
    .carousel-item {
        min-height: 400px;
        padding: 3rem 0 2rem;
    }
    
    .carousel-control-prev, 
    .carousel-control-next {
        display: none;
    }
}

/* Pop-ups Styles */
.popup-overlay {
    display: none; /* oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.show {
    display: flex;  /* solo visible cuando tiene .show */
    opacity: 1;
}


.popup-content {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: popupFadeIn 0.3s ease forwards;
}

@keyframes popupFadeIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.popup-header {
    padding: 15px 20px;
    background-color: #352f62;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h5 {
    margin: 0;
    font-size: 1.2rem;
}

.popup-body {
    padding: 76px;
    overflow-y: auto;
    max-height: calc(100vh - 150px);
}

.popup-footer {
    padding: 15px 20px;
    background-color: #f8f9fa;
    text-align: right;
    border-top: 1px solid #dee2e6;
}

/* Posiciones */
.popup-centro {
    align-items: center;
    justify-content: center;
}

.popup-esquina-superior-derecha {
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
}

.popup-esquina-inferior-derecha {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
}

.popup-esquina-superior-derecha .popup-content,
.popup-esquina-inferior-derecha .popup-content {
    max-width: 400px;
}

/* Mejoras para pop-ups de video */
.video-container {
    width: 100%;
    margin-bottom: 1rem;
}

.ratio-16x9 {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.ratio-16x9 iframe,
.ratio-16x9 video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Ajustar pop-ups para videos grandes */
.popup-content {
    max-width: 90vw;
    max-height: 90vh;
}

.popup-body {
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* Para pop-ups de video, hacer más grande por defecto */
.popup-content.video-popup {
    width: 800px !important;
    max-width: 90vw;
}

/* Responsividad */
@media (max-width: 900px) {
    .popup-content {
        width: 95vw !important;
        max-width: 95vw !important;
    }
    
    .popup-content.video-popup {
        width: 95vw !important;
        height: auto !important;
    }
    
    .ratio-16x9 {
        padding-top: 56.25%; /* Mantener relación de aspecto 16:9 */
    }
}

/* Mejoras visuales para pop-ups */
.popup-header {
    background: linear-gradient(135deg, #352f62 0%, #e45504 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h5 {
    margin: 0;
    font-size: 1.2rem;
}

.popup-body {
    padding: 1.5rem;
}

.popup-footer {
    padding: 1rem;
    background-color: #f8f9fa;
    text-align: right;
    border-top: 1px solid #dee2e6;
}

.popup-text-content {
    line-height: 1.6;
    font-size: 1rem;
}

.popup-text-content img {
    max-width: 100%;
    height: auto;
}

.popup-close {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: color 0.2s;
}

.popup-close:hover {
    color: #ffcccc;
}
/* comentariops avatar usuario */
  .comentario-card {
            border-left: 4px solid #352f62;
            transition: transform 0.2s;
        }
        .comentario-card:hover {
            transform: translateX(5px);
        }
        .usuario-avatar {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, #352f62 0%, #e45504 100%);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }

