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

/* Optimize rendering performance */
img, button, .service-card, .hero h1, .hero h2 {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Hardware acceleration for smooth animations */
.hero, .service-card, .about-image, .mobile-menu, .chat-toggle {
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
}

/* Optimize transitions for better performance */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f3f4f6;
}

body.menu-open,
body.modal-open {
    overflow: hidden;
}

/* Header & Navegación */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1f2937;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    will-change: background-color, box-shadow;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: #1f2937;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    left: 0;
    margin-left: 0;
    padding-left: 0;
}

.logo img {
    height: 40px;
    width: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.logo:hover {
    color: #6b7280; 
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-left: auto;
    margin-right: 0;
}

.nav-menu a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #6b7280;
    transition: width 0.3s ease;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #1f2937;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, visibility;
}

.mobile-menu.active { 
    opacity: 1; 
    visibility: visible; 
}

.mobile-menu ul { 
    list-style: none; 
    text-align: center; 
}

.mobile-menu li { 
    margin: 2rem 0; 
}

.mobile-menu a {
    color: #1f2937;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mobile-menu a:hover { 
    color: #6b7280; 
}

.mobile-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: #1f2937;
    font-size: 2rem;
    cursor: pointer;
}

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

.service-hero {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.9) 0%, rgba(107, 114, 128, 0.8) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.service-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ======================================================
   ESTRUCTURA PRINCIPAL (TEXTO Y DOS IMÁGENES ALINEADAS)
   ====================================================== */
.service-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

.service-text {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.service-text h2 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.service-text h3 {
    margin-top: 2rem; 
    margin-bottom: 1rem;
}

.service-text p {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(107, 114, 128, 0.05);
    border-radius: 8px;
    border-left: 4px solid #6b7280;
    color: #374151;
}

.features-list li:last-child {
    margin-bottom: 0;
}

/* Contenedor Grid para las 2 imágenes */
.service-image {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
    height: 100%;
    min-height: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.img-box {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.img-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Call to Action */
.cta-section {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.95) 0%, rgba(107, 114, 128, 0.9) 100%);
    color: white;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
}

.cta-section h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Media Queries para Móviles */
@media (max-width: 768px) {
    .nav-menu { 
        display: none; 
    }
    .mobile-menu-btn { 
        display: block; 
        margin-right: 1.2rem;
    }
    .mobile-menu { 
        display: flex; 
    }
    .service-content { 
        grid-template-columns: 1fr; 
    }
    .service-image {
        grid-template-rows: none;
        height: auto;
    }
    .img-box {
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .service-hero h1 { 
        font-size: 2rem; 
    }
    .container { 
        padding: 1rem; 
    }
}