/* Variables CSS */
:root {
    --primary-color: #1a5fb4;
    --primary-light: #3584e4;
    --primary-dark: #1c71d8;
    --secondary-color: #2ec27e;
    --accent-color: #f5c211;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666;
    --white: #ffffff;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

/* 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: var(--text-color);
    background-color: var(--white) !important;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 15px;
    color: var(--primary-dark);
    font-weight: 600;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.6rem;
}

h4 {
    font-size: 1.3rem;
}

p {
    margin-bottom: 15px;
}

/* Botones mejorados */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    z-index: -1;
    transition: var(--transition);
    transform: scaleX(0);
    transform-origin: left;
}

.btn:hover::before {
    transform: scaleX(1);
}

.btn.primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(26, 95, 180, 0.3);
}

.btn.primary:hover {
    color: var(--white);
    box-shadow: 0 6px 20px rgba(26, 95, 180, 0.4);
}

.btn.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn.secondary:hover {
    color: var(--white);
    border-color: transparent;
}

.btn.small {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn.large {
    padding: 18px 36px;
    font-size: 1.1rem;
}

/* Header animado */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    padding: 5px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    animation: fadeInDown 1s ease;
}

.logo img {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

header.scrolled .logo img {
    height: 50px;
}

nav ul {
    display: flex;
    animation: fadeIn 1.5s ease;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

nav ul li {
    margin-left: 25px;
    position: relative;
}

nav ul li a {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 5px 0;
}

nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav.active {
    background-color: var(--white) !important;
}

.overlay,
.lightbox,
.page-transition {
    transition: all 0.3s ease !important;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Page Header con animación */
.page-header {
    background: var(--gradient);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    opacity: 0.3;
    animation: moveBackground 20s linear infinite;
}

.page-header h1 {
    color: var(--white);
    font-size: 2.8rem;
    margin-bottom: 15px;
    animation: fadeInUp 1s ease;
}

.page-header p {
    color: var(--white);
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

/* Hero Section con efectos avanzados */
.hero {
    background: linear-gradient(rgba(26, 95, 180, 0.85), rgba(26, 95, 180, 0.9)), url('https://picsum.photos/seed/hero-bg/1600/800.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding: 150px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 25px;
    animation: fadeInUp 1s ease;
}

.hero p {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.3s;
    animation-fill-mode: both;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    animation: fadeInUp 1s ease 0.6s;
    animation-fill-mode: both;
}

/* Water Wave Animation */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,133.3C960,128,1056,96,1152,90.7C1248,85,1344,107,1392,117.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    animation: wave 10s linear infinite;
}

/* Features Section con animaciones */
.features {
    padding: 100px 0;
    background-color: var(--light-gray);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
}

.features h2 {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.features h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Forzar 4 columnas iguales */
    gap: 20px;
    /* Reducir el espacio entre las cards */
}

.feature-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    color: var(--primary-light);
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px 15px;
    /* Reducir el padding para que quepan mejor */
    height: 100%;
    /* Asegurar que todas las cards tengan la misma altura */
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    min-height: 2.4rem;
    /* Altura mínima para los títulos */
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Services Preview con animaciones mejoradas */
.services-preview {
    padding: 100px 0;
    position: relative;
}

.services-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="2" fill="rgba(26, 95, 180, 0.1)"/></svg>');
    opacity: 0.5;
    z-index: -1;
}

.services-preview h2 {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.services-preview h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.service-card {
    background-color: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(26, 95, 180, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.service-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-10px);
    border-color: transparent;
}

.service-card:hover::after {
    opacity: 1;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.service-card:hover .service-icon {
    transform: translateY(-10px);
    color: var(--primary-light);
}

.text-center {
    text-align: center;
}

/* Testimonials Section con carrusel mejorado */
.testimonials {
    padding: 100px 0;
    background-color: var(--light-gray);
    position: relative;
    overflow: hidden;
}

.testimonials::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 15rem;
    color: rgba(26, 95, 180, 0.05);
    font-family: Georgia, serif;
    z-index: 0;
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.testimonials h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.testimonials-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
}

.testimonials-slider {
    overflow: hidden;
    border-radius: 15px;
}

.testimonial {
    background-color: var(--white);
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: var(--transition);
    opacity: 0;
    transform: translateX(100px);
    display: none;
}

.testimonial.active {
    opacity: 1;
    transform: translateX(0);
    display: block;
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 25px;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.8;
}

.testimonial-content::before {
    content: '"';
    font-size: 5rem;
    color: var(--primary-light);
    position: absolute;
    top: -30px;
    left: -15px;
    opacity: 0.2;
    font-family: Georgia, serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author h4 {
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.testimonial-author p {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.testimonial-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--medium-gray);
    cursor: pointer;
    transition: var(--transition);
}

.testimonial-control.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* CTA Section con animación */
.cta {
    background: var(--gradient);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,50 Q25,25 50,50 T100,50" stroke="rgba(255,255,255,0.1)" stroke-width="2" fill="none"/></svg>');
    opacity: 0.3;
    animation: moveBackground 20s linear infinite;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta h2 {
    color: var(--white);
    margin-bottom: 25px;
    animation: pulse 2s infinite;
}

.cta p {
    color: var(--white);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.2rem;
}

.cta .btn {
    background-color: var(--white);
    color: var(--primary-color);
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cta .btn:hover {
    background-color: var(--light-gray);
    color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Footer con animaciones */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 80px 0 20px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.footer-about p {
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-logo {
    height: 60px;
    margin-bottom: 25px;
    transition: var(--transition);
}

.footer-logo:hover {
    transform: scale(1.05);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px) rotate(360deg);
}

.footer-links h3,
.footer-services h3,
.footer-contact h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.footer-links h3::after,
.footer-services h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
}

.footer-links ul li,
.footer-services ul li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 20px;
    transition: var(--transition);
}

.footer-links ul li::before,
.footer-services ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    transition: var(--transition);
}

.footer-links ul li:hover::before,
.footer-services ul li:hover::before {
    left: 10px;
}

.footer-links ul li a,
.footer-services ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links ul li a:hover,
.footer-services ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact ul li {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.footer-contact ul li i {
    margin-right: 15px;
    color: var(--secondary-color);
    margin-top: 5px;
    font-size: 1.2rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 10px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 10px;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--white);
}

/* Animaciones personalizadas */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes wave {
    0% {
        background-position-x: 0;
    }

    100% {
        background-position-x: 1000px;
    }
}

@keyframes moveBackground {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100px 100px;
    }
}

/* Clases para animaciones al hacer scroll */
.animate {
    opacity: 0;
    transition: all 0.8s ease;
}

.animate.fade-in {
    animation: fadeIn 1s ease forwards;
}

.animate.fade-in-down {
    animation: fadeInDown 1s ease forwards;
}

.animate.fade-in-up {
    animation: fadeInUp 1s ease forwards;
}

.animate.slide-in-left {
    animation: slideInLeft 1s ease forwards;
}

.animate.slide-in-right {
    animation: slideInRight 1s ease forwards;
}

/* About Page Styles */
.about-story {
    padding: 100px 0;
}

.about-content {
    display: flex;
    gap: 60px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.about-image img {
    transition: var(--transition);
}

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

/* Values Section */
.values {
    padding: 100px 0;
    background-color: var(--light-gray);
}

.values h2 {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.values h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Forzar 4 columnas iguales */
    gap: 20px;
    /* Reducir el espacio entre las cards */
}

.value-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    padding: 25px 15px;
    /* Reducir el padding para que quepan mejor */
    height: 100%;
    /* Asegurar que todas las cards tengan la misma altura */
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
}

.value-card:hover::before {
    transform: scaleX(1);
}

.value-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: var(--transition);
}

.value-card:hover .value-icon {
    transform: scale(1.1);
    color: var(--primary-light);
}

.value-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    min-height: 2.4rem;
    /* Altura mínima para los títulos */
}

.value-card p {
    font-size: 0.95rem;
    line-height: 1.4;
    flex-grow: 1;
    /* Permitir que el párrafo crezca para llenar el espacio */
}

/* Team Section */
.team {
    padding: 100px 0;
}

.team h2 {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.team h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.team-member {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
}

.member-photo {
    height: 300px;
    overflow: hidden;
    position: relative;
}

.member-photo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: var(--transition);
}

.team-member:hover .member-photo::after {
    opacity: 1;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.team-member:hover .member-photo img {
    transform: scale(1.1);
}

.team-member h3 {
    text-align: center;
    margin-top: 25px;
}

.team-member p {
    text-align: center;
    color: var(--dark-gray);
    margin-bottom: 15px;
}

.team-member>p {
    padding: 0 20px 25px;
    text-align: center;
}

/* Facilities Section */
.facilities {
    padding: 100px 0;
    background-color: var(--light-gray);
}

.facilities h2 {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.facilities h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.facilities-content {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.facilities-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 95, 180, 0.7);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.facilities-text {
    flex: 1;
}

.facilities-text h3 {
    margin-bottom: 25px;
}

.facilities-text ul {
    margin-left: 20px;
    margin-bottom: 25px;
}

.facilities-text ul li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 25px;
}

.facilities-text ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Services Page Styles */
.services-intro {
    padding: 100px 0;
}

.intro-content {
    display: flex;
    gap: 60px;
    align-items: center;
}

.intro-text {
    flex: 1;
}

.intro-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.intro-image img {
    transition: var(--transition);
}

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

/* Services List Section */
.services-list {
    padding: 100px 0;
    background-color: var(--light-gray);
}

.services-list h2 {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.services-list h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.service-card {
    background-color: var(--white);
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(26, 95, 180, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
}

.service-card:hover::after {
    opacity: 1;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.service-card:hover .service-icon {
    transform: translateY(-10px);
    color: var(--primary-light);
}

.service-card ul {
    margin-left: 20px;
    margin-bottom: 25px;
}

.service-card ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
}

.service-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Process Section */
.process {
    padding: 100px 0;
}

.process h2 {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.process h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    position: relative;
}

.process-steps::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 50px;
    right: 50px;
    height: 4px;
    background: var(--medium-gray);
    z-index: 0;
}

.step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 auto 25px;
    box-shadow: 0 10px 20px rgba(26, 95, 180, 0.2);
    transition: var(--transition);
}

.step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(26, 95, 180, 0.3);
}

.step h3 {
    margin-bottom: 15px;
}

/* Service Detail Page Styles */
.service-detail {
    padding: 100px 0;
}

.service-detail-content {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.service-detail-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.service-detail-image img {
    transition: var(--transition);
}

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

.service-detail-text {
    flex: 1;
}

.service-features,
.service-benefits {
    margin: 40px 0;
}

.service-features h3,
.service-benefits h3 {
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
}

.service-features h3::before,
.service-benefits h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: var(--gradient);
    border-radius: 3px;
}

.service-features ul,
.service-benefits ul {
    margin-left: 20px;
}

.service-features ul li,
.service-benefits ul li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 25px;
}

.service-features ul li::before,
.service-benefits ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.service-cta {
    margin-top: 40px;
    display: flex;
    gap: 20px;
}

/* Service Gallery Section */
.service-gallery {
    padding: 100px 0;
    background-color: var(--light-gray);
}

.service-gallery h2 {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.service-gallery h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 95, 180, 0.7);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Contact Page Styles */
.contact {
    padding: 100px 0;
}

.contact-content {
    display: flex;
    gap: 60px;
}

.contact-info {
    flex: 1;
}

.contact-form {
    flex: 1;
}

.contact-item {
    display: flex;
    margin-bottom: 35px;
    padding: 25px;
    background-color: var(--light-gray);
    border-radius: 15px;
    transition: var(--transition);
}

.contact-item:hover {
    background-color: var(--medium-gray);
    transform: translateY(-5px);
}

.contact-icon {
    margin-right: 20px;
    color: var(--primary-color);
    font-size: 1.8rem;
    width: 50px;
    text-align: center;
    transition: var(--transition);
}

.contact-item:hover .contact-icon {
    color: var(--primary-light);
    transform: scale(1.1);
}

.contact-text h3 {
    margin-bottom: 8px;
}

.social-links h3 {
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-light);
    transform: translateY(-5px) rotate(360deg);
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: var(--dark-gray);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1;
}

.form-group.focused label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:not(:placeholder-shown)~label,
.form-group select~label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    color: var(--primary-color);
    background-color: var(--white);
    padding: 0 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.2);
}

.form-message {
    margin-top: 25px;
}

.success-message {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 18px;
    border-radius: 8px;
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

/* Map Section */
.map {
    padding: 100px 0;
    background-color: var(--light-gray);
}

.map h2 {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.map h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.map-container:hover {
    box-shadow: var(--shadow-hover);
}

.map-container iframe {
    width: 100%;
    height: 500px;
    border: none;
}

/* FAQ Page Styles */
.faq {
    padding: 100px 0;
    background-color: var(--white) !important;
}

.faq-content {
    display: flex;
    gap: 60px;
}

.faq-categories {
    flex: 0 0 280px;
    background-color: var(--light-gray) !important;
}

.faq-categories h2 {
    margin-bottom: 25px;
}

.faq-categories ul {
    background-color: var(--light-gray);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.faq-categories ul li {
    border-bottom: 1px solid var(--medium-gray);
    transition: var(--transition);
}

.faq-categories ul li:last-child {
    border-bottom: none;
}

.faq-categories ul li:hover {
    background-color: var(--medium-gray);
}

.faq-categories ul li a {
    display: block;
    padding: 18px 25px;
    color: var(--text-color);
    transition: var(--transition);
    font-weight: 500;
}

.faq-categories ul li a:hover,
.faq-categories ul li a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.faq-items {
    flex: 1;
}

.faq-category {
    margin-bottom: 60px;
}

.faq-category h2 {
    margin-bottom: 35px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--medium-gray);
}

.faq-item {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--medium-gray);
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-hover);
}

.faq-question {
    padding: 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(26, 95, 180, 0.05);
}

.faq-question h3 {
    margin-bottom: 0;
    font-size: 1.2rem;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background-color: rgba(255, 255, 255, 0.5);
}

.faq-answer.active {
    padding: 0 25px 25px;
    max-height: 500px;
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Styles */
@media (max-width: 992px) {

    .about-content,
    .intro-content,
    .service-detail-content,
    .contact-content,
    .facilities-content {
        flex-direction: column;
    }

    .about-image,
    .intro-image,
    .service-detail-image {
        order: -1;
    }

    .process-steps {
        justify-content: center;
    }

    .step {
        flex: 0 0 45%;
    }

    .process-steps::before {
        display: none;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columnas en tablets */
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columnas en tablets */
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        box-shadow: var(--shadow);
        transition: var(--transition);
        z-index: 999;
        overflow-y: auto;
    }

    nav.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        padding: 20px;
    }

    nav ul li {
        margin: 0 0 20px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .faq-content {
        flex-direction: column;
    }

    .faq-categories {
        flex: 0 0 auto;
        width: 100%;
    }

    .step {
        flex: 0 0 100%;
    }

    .service-cta {
        flex-direction: column;
    }

    .contact-content {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .page-header p {
        font-size: 1.1rem;
    }

    .hero {
        padding: 100px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .features,
    .services-preview,
    .testimonials,
    .about-story,
    .values,
    .team,
    .facilities,
    .services-intro,
    .services-list,
    .process,
    .service-detail,
    .service-gallery,
    .contact,
    .map,
    .faq {
        padding: 80px 0;
    }

    .cta {
        padding: 80px 0;
    }

    footer {
        padding: 60px 0 20px;
    }

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

    .testimonial-content {
        font-size: 1rem;
    }

    .testimonial-content::before {
        font-size: 4rem;
        top: -20px;
        left: -10px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        /* 1 columna en móviles */
    }

    .values-grid {
        grid-template-columns: 1fr;
        /* 1 columna en móviles */
    }
}

/* Dropdown Menu Styles */
nav ul li .dropdown {
    display: block;
    /* Override flex from parent ul */
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 10px 0;
    margin-top: 10px;
    z-index: 1000;
}

nav ul li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

nav ul li .dropdown li {
    display: block;
    margin: 0;
    /* Override margin-left from parent li */
    padding: 0;
    width: 100%;
}

nav ul li .dropdown li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-align: left;
    white-space: nowrap;
}

nav ul li .dropdown li a::after {
    display: none;
}

nav ul li .dropdown li a:hover {
    background: var(--primary-light);
    color: white;
    padding-left: 25px;
}

nav ul li>a i.fa-chevron-down {
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

nav ul li:hover>a i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Mobile Dropdown Support - Added for Fix */
@media (max-width: 768px) {
    nav ul li .dropdown {
        position: static;
        visibility: visible;
        opacity: 1;
        display: none;
        transform: none;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.03);
        width: 100%;
        margin-top: 5px;
        padding: 0;
    }

    nav ul li.dropdown-open .dropdown {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    nav ul li.dropdown-open>a {
        color: var(--primary-color);
    }

    /* Improved touch target for mobile */
    nav ul li>a i.fa-chevron-down {
        margin-left: 20px;
        padding: 10px 15px;
        background-color: rgba(0, 0, 0, 0.03);
        border-radius: 4px;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }

    nav ul li.dropdown-open>a i.fa-chevron-down {
        transform: rotate(180deg);
        background-color: var(--primary-color);
        color: white;
    }

    nav ul li .dropdown li a {
        padding-left: 40px;
    }
}