/* Custom Fonts */

/* Visby CF for Headlines and Logos */
@font-face {
    font-family: 'Visby CF';
    src: url('../fonts/Visby/VisbyHeavy.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Visby CF';
    src: url('../fonts/Visby/VisbyExtrabold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Visby CF';
    src: url('../fonts/Visby/VisbyBold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Visby CF';
    src: url('../fonts/Visby/VisbyRegular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Galano Grotesque for Body Text */
@font-face {
    font-family: 'Galano Grotesque';
    src: url('../fonts/Galano/GalanoGrotesqueRegular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Galano Grotesque';
    src: url('../fonts/Galano/GalanoGrotesqueItalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Galano Grotesque';
    src: url('../fonts/Galano/GalanoGrotesqueMedium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Galano Grotesque';
    src: url('../fonts/Galano/GalanoGrotesqueMediumItalic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Galano Grotesque';
    src: url('../fonts/Galano/GalanoGrotesqueBold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Galano Grotesque';
    src: url('../fonts/Galano/GalanoGrotesqueBoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* ESTUDIO REYNA - CSS PRINCIPAL */
/* Optimizado para producción */

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

/* Performance optimizations */
html {
    scroll-behavior: smooth;
    margin: 0 !important;
    padding: 0 !important;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* GPU acceleration for better performance */
.service-card,
.team-member,
.nav-link,
.hero-cta {
    will-change: transform;
    transform: translateZ(0);
}

/* Lazy loading enhancements */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([src]) {
    opacity: 1;
}

:root {
    --primary: #000000;
    --accent: #0A3D33;
    --secondary-accent: #6E9C66;
    --light: #F4F3F0;
    --gray: #666666;
}

body {
    font-family: 'Galano Grotesque', sans-serif;
    background: var(--light);
    color: var(--primary);
    overflow-x: hidden;
    cursor: default;
    margin: 0 !important;
    padding: 0 !important;
}

/* Instagram Banner */
.instagram-banner {
    position: relative;
    width: 100%;
    height: 50px;
    background: linear-gradient(45deg, var(--accent), var(--secondary-accent));
    overflow: hidden;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.instagram-banner:hover {
    opacity: 1;
}

.banner-content {
    display: flex;
    height: 100%;
    align-items: center;
    animation: scroll-banner-smooth 30s linear infinite;
    white-space: nowrap;
}

.instagram-banner:hover .banner-content {
    animation-play-state: paused;
}

.banner-text {
    color: var(--light);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.05em;
    display: inline-block;
}

@keyframes scroll-banner-smooth {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Navigation */
nav, #navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(0);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 2rem 0;
}

nav.scrolled, #navbar.scrolled {
    background: rgba(244, 243, 240, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    height: 45px;
    width: auto;
    transition: all 0.3s ease;
    filter: brightness(0) invert(1);
}

nav.scrolled .nav-logo, #navbar.scrolled .nav-logo {
    filter: none;
    height: 40px;
}

.nav-right-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
}

nav.scrolled .nav-link, #navbar.scrolled .nav-link {
    color: var(--primary);
}

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

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

.nav-cta {
    background: var(--accent);
    color: var(--light);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    background-color: var(--secondary-accent);
    box-shadow: 0 5px 20px rgba(10, 61, 51, 0.2);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-switcher span {
    color: var(--light);
    opacity: 0.5;
    transition: color 0.3s ease;
}

nav.scrolled .lang-switcher span {
    color: var(--primary);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.7;
    transition: all 0.3s ease;
}

nav.scrolled .lang-btn {
    color: var(--primary);
}

.lang-btn.active {
    opacity: 1;
    font-weight: 600;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

nav.scrolled .mobile-menu-toggle {
    color: var(--primary);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s ease;
}

.mobile-menu.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu .nav-link {
    color: var(--light);
    font-size: 1.8rem;
    font-weight: 400;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.mobile-menu .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-accent);
}

.mobile-menu.active .nav-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu .nav-cta {
    background: var(--secondary-accent);
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.3s ease;
}

.mobile-menu.active .nav-cta {
    opacity: 1;
    transform: translateY(0);
}

.mobile-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--light);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section - ENHANCED VERSION */
.hero {
    height: 100vh;
    min-height: 700px;
    background: url('../img/Fondo06.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light);
    position: relative;
    overflow: visible;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.hero-content {
    max-width: 1000px;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    display: block !important;
    visibility: visible !important;
}

/* Ensure elements are visible by default - CRITICAL */
.hero .hero-badge, 
.hero .hero-title-line, 
.hero .hero-subtitle, 
.hero .hero-description, 
.hero .hero-cta {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.hero-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--light);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hero-badge:hover::before {
    left: 100%;
}

.hero-title {
    font-family: 'Visby CF', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-title-line {
    display: block;
    position: relative;
    overflow: hidden;
}

.hero-title-line span {
    display: inline-block;
}

.hero-title-1 { color: var(--light); }
.hero-title-2 { 
    color: var(--secondary-accent);
    background: linear-gradient(45deg, var(--secondary-accent), #8FBC85);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-title-3 { color: var(--light); }

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--secondary-accent);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.hero-description {
    font-size: 1rem;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
    opacity: 0.9;
}

.hero-ctas {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
    margin-top: 2rem;
}

.hero-cta {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    display: inline-block;
    text-align: center;
}

.hero-cta-primary {
    background: var(--accent);
    color: var(--light);
    border: 2px solid var(--accent);
}

.hero-cta-primary:hover {
    background: var(--light);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(10, 61, 51, 0.3);
}

.hero-cta-secondary {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--light);
}

.hero-cta-secondary:hover {
    background: var(--light);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Banner Section - Minimalista */
.banner-section {
    width: 100%;
    margin: 2rem 0;
    padding: 0;
    display: block;
    text-align: center;
    background: transparent;
}

.banner-image {
    width: 100%;
    max-width: 1200px;
    height: auto;
    display: block;
    object-fit: cover;
    margin: 0 auto;
    border-radius: 8px;
    transition: opacity 0.4s ease-in-out, transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

/* Estados de visibilidad según idioma */
html[lang="es"] .banner-spanish {
    display: block;
}

html[lang="es"] .banner-english {
    display: none;
}

html[lang="en"] .banner-spanish {
    display: none;
}

html[lang="en"] .banner-english {
    display: block;
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-text {
    color: var(--light);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    animation: fadeInUp 1s ease;
}

.loader-logo {
    width: 250px;
    height: auto;
    margin-bottom: 1rem;
    opacity: 0;
    animation: logoFadeIn 1.2s ease forwards;
    filter: brightness(0) invert(1); /* Convierte la imagen a blanco */
}

.loader-year {
    color: var(--accent);
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-top: 1rem;
    letter-spacing: 0.3em;
    animation: fadeInUp 1s ease 0.3s both;
}

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

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    60% {
        opacity: 0.8;
        transform: scale(1.05) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-label {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-title {
    font-family: 'Visby CF', sans-serif;
    font-size: 3.5rem;
    font-weight: 300;
}

/* Dynamic title underline effect */
.title-dynamic-part {
    position: relative;
    display: inline-block;
}

.title-dynamic-part::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 0;
    width: 100%;
    height: 8px;
    background: #00ff88;
    border-radius: 4px;
    opacity: 1;
    transition: all 0.3s ease;
}

.title-dynamic-part:hover::after {
    opacity: 1;
    height: 10px;
    bottom: -20px;
    background: #00ff88;
    transform: scaleX(1.05);
}

/* About Section */
.about {
    padding: 8rem 0;
    background: var(--light);
    color: var(--primary);
    position: relative;
    overflow: hidden;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-content h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--primary);
}

.about-title-1 { color: var(--primary); }
.about-title-2 { 
    color: var(--accent);
    display: block;
}
.about-title-3 { 
    color: var(--secondary-accent);
    display: block;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray);
    margin-bottom: 3rem;
}

.about-visual {
    position: relative;
    height: 500px;
    background: var(--accent);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 3px solid var(--secondary-accent);
    backdrop-filter: none;
}

.about-visual::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
}

.about-visual-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 17px;
}

.about-visual-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem;
    text-align: center;
    z-index: 2;
}

.about-visual-content {
    text-align: center;
    z-index: 2;
}

.about-visual-year {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    color: var(--light);
}

.about-visual-text {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.8;
    color: var(--light);
}

/* Services Section */
.services {
    padding: 8rem 0;
    background: var(--primary);
    color: var(--light);
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.services .section-title {
    color: var(--light);
    font-size: 3.5rem;
    margin-bottom: 2rem;
}

.services .section-label {
    color: var(--secondary-accent);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

.services-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0.75rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--light);
    font-size: 1rem;
    padding: 0.75rem 2rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 50px;
    font-weight: 600;
}

.tab-btn.active {
    background-color: var(--accent);
    color: var(--light);
    box-shadow: 0 4px 15px rgba(10, 61, 51, 0.4);
}

/* Grid más equilibrado para ambas secciones */
.services-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.services-grid.active {
    display: grid;
}

/* Layout específico para 10 tarjetas (empresas) */
.services-grid.services-10 {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1000px;
    margin: 0 auto;
}

/* Centrar las últimas 2 tarjetas de la tercera fila */
@media (min-width: 900px) {
    .services-grid.services-10.active {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, auto);
    }
    
    /* Posicionar las últimas 2 tarjetas centradas */
    .services-grid.services-10 .service-card:nth-child(9) {
        grid-column: 2 / 3;
        grid-row: 3;
    }
    
    .services-grid.services-10 .service-card:nth-child(10) {
        grid-column: 3 / 4;
        grid-row: 3;
    }
}

/* Layout para tablets */
@media (max-width: 899px) and (min-width: 600px) {
    .services-grid.services-10 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-grid.services-10 .service-card:nth-child(10) {
        grid-column: 2 / 3;
    }
}

/* Adaptive grid for different service counts */
.services-grid.services-7 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    justify-content: center;
}

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

.service-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 1.6rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transform: translateZ(0);
    max-width: 350px;
    margin: 0 auto;
    width: 100%;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    backface-visibility: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent), var(--secondary-accent));
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 0;
    will-change: transform;
}

.service-card:hover::before {
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary-accent);
}
    transform: translateY(-5px);
    border-color: var(--secondary-accent);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.service-card:hover * {
    color: var(--light) !important;
}

.service-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-number {
    font-size: 1.8rem;
    color: var(--secondary-accent);
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
    font-weight: 700;
    opacity: 0.8;
    display: block;
    line-height: 1;
}

.service-card:hover .service-number {
    color: var(--light);
    opacity: 1;
}

.service-title {
    font-size: 1.3rem;
    margin: 0;
    font-weight: 600;
    transition: color 0.3s ease;
    color: var(--light);
    line-height: 1.3;
    text-align: center;
}
}

.service-desc {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.7;
    transition: all 0.3s ease;
    color: var(--light);
}

/* Destacar "antes" en el título de About */
.highlight-antes {
    color: var(--secondary-accent);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--secondary-accent);
    text-underline-offset: 4px;
}

/* Language-specific visibility */
.lang-es, .lang-en {
    display: none;
}

html[lang="es"] .lang-es {
    display: inline;
}

html[lang="en"] .lang-en {
    display: inline;
}

/* CTA Service Card - Clean & Contrastante */
.service-card-cta {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary);
    color: var(--primary);
}

.service-card-cta::before {
    background: var(--primary);
}

.service-card-cta .service-number {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.service-card-cta .service-title {
    color: var(--primary);
    font-weight: 600;
}

.service-card-cta .service-desc {
    color: var(--primary);
    opacity: 0.8;
}

.service-card-cta:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.service-card-cta:hover .service-number,
.service-card-cta:hover .service-title,
.service-card-cta:hover .service-desc {
    color: white !important;
    opacity: 1;
}

/* Team Section */
.team {
    padding: 8rem 0;
    background: url('../img/Fondo01.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* Changed from fixed for better performance */
    color: var(--light);
    position: relative;
    overflow: hidden;
    /* Better performance with GPU acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.team::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.team .section-title,
.team .section-label {
    color: var(--light);
    position: relative;
    z-index: 2;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    margin-top: 5rem;
    padding: 0;
}

.team-member {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px;
    flex: 0 1 380px;
}

.team-member:hover {
    border-color: var(--secondary-accent);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.team-image {
    width: 100%;
    aspect-ratio: 3/4;
    background: #e0e0e0;
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: 8px;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.4s ease;
    display: block;
}

/* Ajustes específicos para imágenes que se cortan */
.team-image img.adjust-top {
    object-position: center 25%;
}

/* Ajuste específico para Carlos Alejandro - tarjeta 1 */
.team-member:nth-child(1) .team-image img {
    object-position: center 35%;
}

/* Ajuste específico para Ramiro - tarjeta 3 */
.team-member:nth-child(3) .team-image img {
    object-position: center 25%;
}

/* Ajuste específico para Laura - tarjeta 4 */
.team-member:nth-child(4) .team-image img {
    object-position: center 35%;
}

/* Ajuste específico para Frank - tarjeta 5 */
.team-member:nth-child(5) .team-image img {
    object-position: center 30%;
}

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

.team-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.9) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.team-member:hover .team-image::before {
    opacity: 1;
}

.team-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    z-index: 2;
}

.team-member:hover .team-info {
    transform: translateY(0);
}

.team-name {
    font-family: 'Visby CF', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.team-role {
    font-size: 0.9rem;
    color: var(--secondary-accent);
    letter-spacing: 0.1em;
}

.team-bio {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--light);
    opacity: 0.8;
    line-height: 1.6;
}

/* Blog CTA Section */
.blog-cta-section {
    background-color: var(--accent);
    color: var(--light);
    padding: 6rem 0;
    text-align: center;
}

.blog-cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.blog-cta-section .cta-button {
    background: var(--light);
    color: var(--accent);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.blog-cta-section .cta-button:hover {
    background: transparent;
    color: var(--light);
    border-color: var(--light);
    transform: translateY(-3px);
}

/* Temporary hide section */
.hidden-section {
    display: none !important;
}

/* Contact Section */
.contact {
    padding: 8rem 0;
    background: var(--primary);
    color: var(--light);
    position: relative;
    overflow: hidden;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-label {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--secondary-accent);
    margin-bottom: 1rem;
}

.contact-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.contact-subtitle {
    font-size: 1.3rem;
    color: var(--secondary-accent);
    margin-bottom: 1rem;
    font-weight: 300;
}

.contact-desc {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--secondary-accent);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-icon {
    width: 24px;
    height: 24px;
    fill: var(--secondary-accent);
    flex-shrink: 0;
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--secondary-accent);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-submit {
    width: 100%;
    padding: 1.2rem 2rem;
    background: var(--secondary-accent);
    color: var(--primary);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-submit:hover {
    background: var(--light);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.form-submit:active {
    transform: translateY(-1px);
}

.form-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.form-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.form-message.error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

/* Footer */
.site-footer {
    background-color: var(--primary);
    color: var(--light);
    padding: 3rem 0;
    font-size: 0.9rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-logo {
    height: 70px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.footer-social-links {
    display: flex;
    gap: 1.5rem;
}

.footer-social-links a {
    color: var(--light);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-social-links a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.footer-social-links svg {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
    opacity: 0.5;
    font-size: 0.85rem;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    padding: 1rem;
}

.modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--light);
    color: var(--primary);
    width: 90%;
    max-width: 750px;
    max-height: 90vh;
    position: relative;
    border-radius: 16px;
    border: 1px solid var(--accent);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    transform: scale(0.95);
    animation: modalSlideIn 0.3s ease forwards;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--accent), var(--secondary-accent));
    color: var(--light);
    padding: 2rem 2.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.modal-header .modal-title {
    font-family: 'Visby CF', sans-serif;
    font-size: 1.6rem;
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    padding-right: 1rem;
}

.modal-close {
    color: var(--light);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body-container {
    padding: 2.5rem;
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
}

/* Custom scrollbar for modal */
.modal-body-container::-webkit-scrollbar {
    width: 6px;
}

.modal-body-container::-webkit-scrollbar-track {
    background: var(--light);
}

.modal-body-container::-webkit-scrollbar-thumb {
    background: var(--secondary-accent);
    border-radius: 3px;
}

.modal-number {
    font-size: 4rem;
    color: var(--secondary-accent);
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0.7;
    line-height: 1;
}

.modal-subtitle {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 2rem;
    font-weight: 600;
    line-height: 1.4;
}

.modal-body {
    line-height: 1.7;
}

.modal-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
    color: var(--primary);
    font-size: 1rem;
}

.modal-body ul {
    list-style-position: outside;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    background: rgba(110, 156, 102, 0.05);
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-accent);
}

.modal-body li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--gray);
    font-size: 0.95rem;
}

.modal-body li::marker {
    color: var(--secondary-accent);
}

.modal-body h3 {
    color: var(--accent);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.modal-body h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--secondary-accent);
}

.modal-cta {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--secondary-accent));
    color: var(--light);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 2rem;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(10, 61, 51, 0.3);
    border: none;
    cursor: pointer;
}

.modal-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 61, 51, 0.4);
    filter: brightness(1.1);
}

/* Keyframes for animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .services-grid,
    .services-grid.services-7,
    .services-grid.services-8 {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
        padding: 0 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

@media (max-width: 768px) {
    .services-grid,
    .services-grid.services-7,
    .services-grid.services-8 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-right-container {
        gap: 1rem;
    }

    .hero, .team {
        background-attachment: scroll;
    }

    .hero {
        background-position: center center;
        height: 80vh;
        min-height: 600px;
    }

    .team {
        background-position: center center;
    }

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

    .team-grid .team-member {
        padding: 8px;
        margin: 0;
        box-sizing: border-box;
    }
    
    /* Hero section mobile improvements */
    .hero {
        padding: 4rem 0 2rem 0;
        min-height: 80vh;
        display: flex;
        align-items: center;
    }

    .hero-content {
        padding: 0 1rem;
        text-align: center;
        width: 100%;
    }

    .hero-title {
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        margin-bottom: 1.5rem;
    }

    .hero-description {
        margin-bottom: 2rem;
        font-size: 0.95rem;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        margin-bottom: 2rem;
        margin-top: 2rem;
    }
    
    .hero-cta {
        width: 280px;
        text-align: center;
        padding: 1.2rem 2rem;
        font-size: 1rem;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        z-index: 10 !important;
    }

    .hero-cta-primary {
        background: var(--accent) !important;
        color: var(--light) !important;
        border: 2px solid var(--accent) !important;
    }

    .hero-cta-secondary {
        background: transparent !important;
        color: var(--light) !important;
        border: 2px solid var(--light) !important;
    }

    /* Services tabs responsive */
    .services-tabs {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        width: 100%;
        max-width: 320px;
        background-color: transparent;
        border: none;
    }

    .tab-btn {
        padding: 1.2rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
    }

    .tab-btn.active {
        background: linear-gradient(135deg, var(--accent), var(--secondary-accent));
        border-color: var(--secondary-accent);
        transform: scale(1.02);
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .container {
        padding: 0 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    /* Modal optimizations for small screens */
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 95vh;
    }

    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .modal-header .modal-title {
        font-size: 1.3rem;
    }

    .modal-body-container {
        padding: 1.5rem;
        max-height: 70vh;
    }

    .modal-number {
        font-size: 3rem;
    }

    .modal-subtitle {
        font-size: 1.1rem;
    }

    .modal-body h3 {
        font-size: 1.1rem;
    }

    .modal-cta {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
        margin-top: 1.5rem;
    }

    /* Services section improvements */
    .services {
        padding: 6rem 0;
    }

    /* Dynamic title responsive */
    .title-dynamic-part::after {
        height: 6px;
        bottom: -14px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    }
    
    .title-dynamic-part:hover::after {
        height: 8px;
        bottom: -16px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
        transform: scaleX(1.05);
    }

    /* Instagram banner mobile */
    .instagram-banner {
        height: 40px;
    }

    .banner-text {
        font-size: 0.7rem;
    }

    .services-tabs {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
        background-color: transparent;
        border: none;
    }

    .tab-btn {
        padding: 1rem 1.2rem;
        font-size: 0.95rem;
        width: 100%;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
    }

    .tab-btn.active {
        background: linear-gradient(135deg, var(--accent), var(--secondary-accent));
        border-color: var(--secondary-accent);
        transform: scale(1.02);
    }

    /* About section mobile */
    .about {
        padding: 4rem 0;
    }

    .about-container {
        padding: 0 1rem;
        text-align: center;
    }

    /* Team section mobile */
    .team {
        padding: 4rem 0;
    }

    /* Contact section mobile */
    .contact {
        padding: 4rem 0;
    }

    .contact-container {
        padding: 0 1rem;
    }

    /* Footer responsive ajustado */
    .footer-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

/* EMERGENCY FIX - Forzar visibilidad del hero */
#hero, .hero {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#hero .hero-content, .hero .hero-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#hero .hero-title, #hero .hero-subtitle, #hero .hero-description, #hero .hero-cta,
.hero .hero-title, .hero .hero-subtitle, .hero .hero-description, .hero .hero-cta {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
}

.whatsapp-float.show {
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    color: white;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-float a {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}
