
:root {
    --primary-color: #0d47a1;
    --primary-darker-color: #0b3c8a;
    --secondary-color: #1976d2;
    --dark-color: #212121;
    --light-color: #f5f5f5;
    --white-color: #fff;
    --box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    --font-family: 'Roboto', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    color: var(--dark-color);
    line-height: 1.6;
    background-color: #f0f2f5;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.3s ease-in-out;
    box-sizing: border-box;
}

#header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: var(--box-shadow);
}

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    overflow: hidden;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
}

.hero-text {
    position: relative;
    z-index: 1;
    padding: 0 1rem;
}

.hero-text h1 {
    color: var(--white-color);
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    font-size: 3rem;
    margin: 0 0 1rem 0;
    animation: fadeInUp 1s ease-out forwards;
}

.hero-text p {
    color: #000080; /* Navy Blue */
    text-shadow: 1px 1px 3px rgba(255,255,255,0.7);
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

main > section:not(#hero):not(#about) {
    padding: 4rem 1rem;
    margin: 2rem auto;
    border-radius: 8px;
    max-width: 1200px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.1);
    background-color: var(--white-color);
}

#about {
    position: relative;
    height: 100vh; /* Ajustado a 100vh */
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

#about-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
}

.about-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.about-text-content {
    position: relative;
    z-index: 3;
    color: var(--white-color);
    padding: 3rem;
    max-width: 1100px; /* Ajustado a 1100px */
    text-align: center;
}

.about-text-content > h3,
.about-text-content > p,
.about-text-content ul li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

#filosofia {
    padding: 0;
    background-color: transparent;
    box-shadow: none;
}

.about-flex-container {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    box-shadow: var(--box-shadow);
}

.about-image {
    flex: 1 1 50%;
    min-width: 50%;
    position: relative; /* Para el carrusel */
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-text-content-filosofia {
    flex: 1 1 50%;
    box-sizing: border-box;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.filosofia-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

#filosofia .about-text-content h3 {
    color: var(--white-color);
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

#about .about-text-content ul,
#filosofia .about-text-content ul {
    list-style: none;
    padding: 0;
}

#about .about-text-content ul li {
    margin-bottom: 1.5rem;
}

#about .about-text-content ul li strong {
    font-size: 1.2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.about-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
}

h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    color: var(--primary-color);
}

.services-grid, .affiliation-logos, .contact-container, .footer-content {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.service-card { background-color: var(--white-color); border-radius: 8px; padding: 2rem; text-align: center; box-shadow: var(--box-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 12px 20px rgba(0,0,0,0.15); }
.service-card i { font-size: 3.5rem; color: var(--secondary-color); margin-bottom: 1.5rem; }
.service-card h3 { color: var(--primary-color); font-size: 1.5rem; margin-bottom: 1rem; }
.service-card ul { list-style: none; padding: 0; text-align: left; }
.service-card li { margin-bottom: 0.75rem; color: var(--dark-color); position: relative; padding-left: 1.5rem; }
.service-card li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; color: var(--secondary-color); }

.clients-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: flex-start;
}

.client-card {
    background-color: var(--light-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    height: 100%;
}

.client-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.client-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 2rem;
}

.client-card li {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.client-card li.highlighted {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px; /* Adjust as needed */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.carousel-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-container img.active {
    opacity: 1;
}


.affiliation-logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; align-items: center; }
.logo-item { display: flex; justify-content: center; align-items: center; background: var(--white-color); padding: 1.5rem; border-radius: 8px; box-shadow: var(--box-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.logo-item:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.logo-item img { max-width: 100%; height: auto; filter: grayscale(100%); transition: filter 0.3s ease; }
.logo-item:hover img { filter: grayscale(0%); }

.contact-container { display: flex; gap: 3rem; }
.contact-info, .contact-form { flex: 1; }
.contact-info h3, .contact-form h3 { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--primary-color); }
.contact-info p { display: flex; align-items: center; margin-bottom: 1rem; font-size: 1.1rem; }
.contact-info i { color: var(--secondary-color); margin-right: 1rem; font-size: 1.5rem; }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 700; color: var(--dark-color); }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.8rem; border: 1px solid #ccc; border-radius: 5px; font-family: var(--font-family); font-size: 1rem; box-sizing: border-box; }
.contact-form button { width: 100%; padding: 1rem; background-color: var(--primary-color); color: var(--white-color); border: none; border-radius: 5px; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: background-color 0.3s ease; }
.contact-form button:hover { background-color: var(--secondary-color); }

footer { background-color: var(--dark-color); color: var(--light-color); padding: 2rem 1rem; text-align: center; margin-top: 2rem; }
.footer-content { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.footer-links a { color: var(--light-color); text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--secondary-color); }

.nav-toggle { display: none; cursor: pointer; border: 0; background: transparent; padding: 0; z-index: 2000; width: 30px; height: 30px; }
.hamburger { display: block; position: relative; width: 100%; height: 3px; background: var(--white-color); transition: transform 0.3s ease-in-out; }
#header.scrolled .hamburger { background: var(--dark-color); }
.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; width: 100%; height: 3px; background: inherit; transition: top 0.3s 0.3s, transform 0.3s; }
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }
.nav-toggle.is-active .hamburger { transform: rotate(45deg); background: var(--white-color); }
.nav-toggle.is-active .hamburger::before { top: 0; transform: rotate(-90deg); }
.nav-toggle.is-active .hamburger::after { top: 0; transform: rotate(0deg); opacity: 0; }

.nav { display: none; }

@media (min-width: 769px) {
    .nav { display: block; all: unset; flex: 1; }
    .nav__list { display: flex; flex-direction: row; justify-content: flex-end; list-style: none; margin: 0; padding: 0; }
    .nav__item { margin: 0 0 0 2rem; }
    .nav__link { font-size: 1rem; color: var(--white-color); text-shadow: 0 1px 3px rgba(0,0,0,0.4); text-decoration: none; }
    #header.scrolled .nav__link { color: var(--dark-color); text-shadow: none; }
    .nav__link:hover { color: var(--secondary-color); }
}

@media (max-width: 992px) {
    .affiliation-logos { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
    .clients-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: rgba(13, 71, 161, 0.98); transform: translateX(100%); transition: transform 0.3s ease-in-out; z-index: 1999; }
    .nav.is-active { transform: translateX(0); }
    .nav__list { height: 100%; flex-direction: column; justify-content: center; align-items: center; }
    .nav__item { margin: 1.5rem 0; }
    .nav__link { font-size: 1.5rem; font-weight: 700; }

    .about-flex-container, .contact-container, .footer-content, .services-grid, .affiliation-logos {
        flex-direction: column;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .services-grid, .affiliation-logos { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
    .footer-links { flex-direction: column; gap: 1rem; }
    #filosofia .about-flex-container .about-text-content {
        order: 0;
    }
}

@media (max-width: 576px) {
    .affiliation-logos { grid-template-columns: 1fr; }
    .client-card ul { columns: 1; }
    .about-text-content { padding: 2rem; } /* Menos padding en pantallas muy pequeñas */
}
