/* Variables y estilos base */
:root {
    --primary: #0056b3;
    --primary-dark: #003d82;
    --secondary: #333;
    --accent: #e63946;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --blue-accent: #00BFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Navbar mejorada */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 15px 5%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 100%;
    height: auto;
    position: fixed;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    left: 0;
    right: 0;
}

.logo-container {
    height: 100%;
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    width: auto;
    max-width: 150px;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links li {
    margin: 0 10px;
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: color 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
    padding: 8px 5px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary);
}

.contact-link i {
    margin-right: 5px;
    font-size: 16px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--dark);
}

/* Hero Video Section */
.video-wrapper {
    width: 100%;
    max-width: 100%;
    margin-top: 80px;
    background-color: #000;
    overflow: hidden;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 5;
    min-height: 30vh;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 70vh;
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    width: 90%;
    max-width: 1200px;
    padding: 20px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content .blue {
    color: var(--blue-accent);
}

.btn {
    display: inline-block;
    background: var(--blue-accent);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1.5rem;
}

.btn:hover {
    background: #0077B6;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Stats Section */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 4rem 5%;
    background: #ffffff;
    max-width: 100%;
}

.stat-box {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    flex: 1;
}

.stat-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.stat-box i {
    font-size: 2.5rem;
    color: var(--blue-accent);
    margin-bottom: 1rem;
}

.stat-box h3 {
    font-size: 2rem;
    margin: 0;
    color: var(--primary-dark);
}

.stat-box p {
    font-size: 1rem;
    color: var(--gray);
    margin: 0.5rem 0 0;
}

/* Image Cards Section */
.image-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 4rem 5%;
    background-color: var(--light-gray);
    max-width: 100%;
    overflow: hidden;
}

.image-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    aspect-ratio: 4/3;
}

.image-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.image-card:hover img {
    transform: scale(1.05);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.card-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.card-content p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.card-button {
    display: inline-block;
    background-color: var(--blue-accent);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.card-button:hover {
    background-color: #0077B6;
    transform: translateY(-2px);
}

/* Alternate Sections */
.alternate-section {
    padding: 4rem 5%;
    max-width: 100%;
    overflow: hidden;
}

.alternate-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
    width: 100%;
}

.alternate-content {
    padding: 1rem;
}

.alternate-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.alternate-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

.alternate-image:hover img {
    transform: scale(1.03);
}

.alternate-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.alternate-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.content-button {
    display: inline-flex;
    align-items: center;
    background-color: var(--blue-accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.content-button:hover {
    background-color: #0077B6;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.content-button i {
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.content-button:hover i {
    transform: translateX(3px);
}

/* Logos Section - Versión Compacta */
.logos-section {
    background-color: var(--light-gray);
    padding: 3rem 5%;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}

.logos-title {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    position: relative;
}

.logos-title:after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--blue-accent);
    margin: 1rem auto;
}

.logos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-item {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    flex: 1;
    min-width: 120px;
    max-width: 160px;
}

.logo-item img {
    max-width: 100%;
    max-height: 50px;
    width: auto;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s;
}

.logo-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Media Queries para Logos */
@media (max-width: 992px) {
    .logo-item {
        height: 70px;
        min-width: 100px;
        padding: 0.8rem;
    }
    
    .logo-item img {
        max-height: 40px;
    }
}

@media (max-width: 768px) {
    .logos-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .logo-item {
        height: 80px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .logos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .logo-item {
        height: 70px;
    }
    
    .logo-item img {
        max-height: 35px;
    }
}

/* News Section */
.news-section {
    padding: 4rem 5%;
    background-color: white;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}

.news-header {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.news-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.news-subtitle {
    font-size: 1rem;
    color: var(--gray);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-align: left;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-content {
    padding: 1.5rem;
}

.news-card-category {
    display: inline-block;
    background-color: var(--blue-accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.news-card-title {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-card-date {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 1rem;
    display: flex;
    align-items: center;
}

.news-card-date i {
    margin-right: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 4rem 5% 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.footer-logo {
    max-width: 120px;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

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

.social-icon:hover {
    background: var(--blue-accent);
    transform: translateY(-3px);
}

.footer-contact {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.footer-contact i {
    margin-right: 0.5rem;
    color: var(--blue-accent);
    font-size: 1rem;
    min-width: 20px;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
    display: inline-block;
    padding: 0.25rem 0;
}

.footer-links a:hover {
    color: var(--blue-accent);
}

.footer-certificate {
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.footer-bottom {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright, .footer-powered {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Media Queries */
@media (max-width: 1200px) {
    .navbar {
        padding: 15px 4%;
    }
}

@media (max-width: 992px) {
    .navbar {
        padding: 15px 3%;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        padding: 15px 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 10px 0;
        width: 100%;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .video-container {
        aspect-ratio: 16 / 9;
    }
    
    .hero {
        height: 60vh;
    }
    
    .alternate-block {
        grid-template-columns: 1fr;
    }
    
    .image-right .alternate-content {
        order: 0;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 50vh;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .image-cards {
        grid-template-columns: 1fr;
    }
    
    .logos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-section {
        flex: 100%;
        text-align: center;
    }
    
    .footer-social, .footer-contact {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 10px 3%;
    }
    
    .logo {
        height: 40px;
    }
    
    .hero {
        height: 40vh;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .logos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Animaciones para los contadores */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-box {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.stat-box:nth-child(1) { animation-delay: 0.1s; }
.stat-box:nth-child(2) { animation-delay: 0.2s; }
.stat-box:nth-child(3) { animation-delay: 0.3s; }
.stat-box:nth-child(4) { animation-delay: 0.4s; }