/* Base Styles */
:root {
    /* Colores aqua/teal */
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;
    
    /* Colores azul marino */
    --navy-50: #f0f4f8;
    --navy-100: #d9e2ec;
    --navy-200: #bcccdc;
    --navy-300: #9fb3c8;
    --navy-400: #829ab1;
    --navy-500: #627d98;
    --navy-600: #486581;
    --navy-700: #334e68;
    --navy-800: #243b53;
    --navy-900: #102a43;
    
    /* Grises */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --white: #ffffff;
    --black: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--navy-700);
    line-height: 1.5;
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--navy-800);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

/* Línea estática y sutil debajo de los títulos */
h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--teal-400), transparent);
    transition: width 0.6s ease;
}

/* Línea centrada para la sección de filosofía */
.philosophy h2::after {
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    background: linear-gradient(90deg, transparent, var(--teal-400), transparent);
}

section h2 {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

section {
    padding: 5rem 0;
}

.section-subtitle {
    font-size: 1.25rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    color: var(--navy-600);
}

.section-subtitle.light {
    color: var(--teal-100);
}

/* Buttons */
button {
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    border: none;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.primary-button {
    background-color: var(--navy-700);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.primary-button:hover {
    background-color: var(--navy-800);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.primary-button i {
    margin-left: 0.5rem;
}

.outline-button {
    background-color: transparent;
    color: var(--navy-700);
    border: 1px solid var(--navy-700);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.outline-button:hover {
    background-color: var(--navy-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgb(255, 255, 255);
    transition: all 0.3s ease;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 70px;
    width: auto;
}

.desktop-nav {
    display: none;
}

.nav-link {
    margin: 0 1rem;
    color: var(--navy-700);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--teal-500);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--teal-600);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-button {
    background: none;
    border: none;
    color: var(--navy-700);
    font-size: 1.5rem;
}

.mobile-nav {
    display: none;
    background-color: var(--white);
    border-top: 1px solid var(--gray-200);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.mobile-nav-links .nav-link {
    padding: 0.5rem 0;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 5rem;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 1;
    animation: fadeIn 1.5s ease-out;
}

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

.hero h1 {
    color: var(--white);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* About Section */
.about {
    background-color: var(--white);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.about-image {
    flex: 1;
    position: relative;
    height: 400px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.about-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.15), 0 15px 15px -5px rgba(0, 0, 0, 0.08);
}

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

/* Services Section */
.services {
    background-color: var(--teal-50);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to bottom, rgba(16, 42, 67, 0.06), transparent 50%),
        linear-gradient(to right, rgba(16, 42, 67, 0.06), transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.services .container {
    position: relative;
    z-index: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.5s ease;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.service-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
}

.service-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--navy-100);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background-color: var(--navy-200);
    transform: scale(1.1);
}

.service-icon i {
    color: var(--navy-700);
}

.service-card h3 {
    margin-bottom: 0.5rem;
    color: var(--navy-800);
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: var(--navy-700);
}

.service-card p {
    color: var(--navy-600);
}

/* Locations Section */
.locations {
    background-color: var(--white);
    text-align: center;
}

.tabs-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-button {
    padding: 1rem;
    background-color: var(--gray-100);
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--navy-700);
}

.tab-button.active {
    background-color: var(--navy-700);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab-button:hover:not(.active) {
    background-color: var(--gray-200);
    transform: translateY(-2px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

.location-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: left;
}

.location-image {
    flex: 1;
    position: relative;
    height: 400px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: transform 0.5s ease;
}

.location-image:hover {
    transform: scale(1.02);
}

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

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

.location-info {
    flex: 1;
}

.location-title {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.location-title i {
    color: var(--teal-600);
    margin-right: 0.5rem;
}

.location-title h3 {
    margin-bottom: 0;
    color: var(--navy-800);
}

.location-info p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--navy-700);
}

.location-features {
    margin-bottom: 2rem;
}

.location-features li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.location-features i {
    color: var(--teal-600);
    margin-right: 0.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.location-features span {
    color: var(--navy-700);
}

/* Philosophy Section */
.philosophy {
    background-color: var(--navy-800);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.philosophy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(13, 148, 136, 0) 100%);
    z-index: 0;
}

.philosophy .container {
    position: relative;
    z-index: 1;
}

.philosophy h2 {
    color: var(--white);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.philosophy-card {
    background-color: var(--navy-700);
    border-radius: 0.5rem;
    padding: 0 0 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.philosophy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Espacio para imágenes en las tarjetas de filosofía */
.philosophy-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

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

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

.philosophy-card h3 {
    color: var(--white);
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

/* Línea centrada y sutil debajo de los títulos de las tarjetas */
.philosophy-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--teal-400), transparent);
    transition: width 0.3s ease;
}

.philosophy-card:hover h3::after {
    width: 60px;
}

.philosophy-card p {
    color: var(--teal-100);
    padding: 0 1.5rem;
}

/* Footer */
.footer {
    background-color: var(--navy-900);
    color: var(--white);
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-column h3 {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 1px;
    background-color: var(--teal-500);
    transition: width 0.3s ease;
}

.footer-column h3:hover::after {
    width: 100%;
}

.footer-column p {
    color: var(--gray-400);
}

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

.footer-links a {
    color: var(--gray-400);
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-links a::before {
    content: '›';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--teal-400);
    padding-left: 15px;
}

.footer-links a:hover::before {
    opacity: 1;
    left: 0;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--navy-800);
    text-align: center;
    color: var(--gray-500);
}

/* Media Queries */
@media (min-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .desktop-nav {
        display: flex;
    }

    .mobile-menu-button {
        display: none;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .philosophy-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        flex-direction: row;
    }

    .location-content {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}