/* Fonts moved to HTML for better performance */

:root {
    --primary: #5E7AA1;
    --secondary: #0F4A78;
    --bg: #F1F1F1;
    --text: #1C1C1C;
    --accent: #C9D2DD;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    --glow: 0 0 40px rgba(94, 122, 161, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; font-weight: 300; }
html { scroll-behavior: smooth; background-color: var(--bg); color: var(--text); }
body { overflow-x: hidden; }

h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--secondary); margin-bottom: 1rem; }
h1 { font-size: 4.5rem; line-height: 1.1; letter-spacing: -1px; }
h2 { font-size: 3rem; position: relative; display: inline-block; }
h2::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 60px; height: 3px; background: var(--primary); border-radius: 2px; transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.visible h2::after, .reveal.visible h2::after { width: 100%; }
p { font-size: 1.1rem; line-height: 1.8; color: #4a4a4a; margin-bottom: 1.5rem; }
a { text-decoration: none; color: inherit; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 1rem 2.5rem; border-radius: 50px; font-weight: 600; font-size: 1.1rem; cursor: pointer; transition: var(--transition); border: none; outline: none; gap: 10px; position: relative; overflow: hidden; white-space: nowrap; }
.btn::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; background: rgba(255,255,255,0.2); border-radius: 50%; transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; }
.btn:hover::after { width: 300px; height: 300px; }
.btn-primary { background: linear-gradient(135deg, var(--secondary), var(--primary)); color: var(--white); box-shadow: 0 10px 20px rgba(15, 74, 120, 0.2); }
.btn-primary:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 15px 35px rgba(15, 74, 120, 0.35); }
.btn-outline { background: transparent; color: var(--secondary); border: 2px solid var(--secondary); }
.btn-outline:hover { background: var(--secondary); color: var(--white); transform: translateY(-3px) scale(1.03); }

/* Header */
header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding: 1rem 5%; display: flex; justify-content: space-between; align-items: center; background: var(--glass-bg); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border); transition: var(--transition); }
header.scrolled { padding: 0.8rem 5%; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.logo { display: flex; align-items: center; }
.logo img { max-width: 280px; object-fit: contain; transition: var(--transition); }
.header-logo { height: 40px; width: auto; }
.logo img:hover { transform: scale(1.05); }
header nav { flex: 1; display: flex; justify-content: flex-end; margin-left: 2rem; }
nav ul { list-style: none; display: flex; gap: 2.5rem; }
nav a { font-weight: 600; font-size: 1rem; position: relative; padding-bottom: 5px; color: var(--text); transition: var(--transition); }
nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--primary); transition: var(--transition); }
nav a:hover, nav a.active { color: var(--primary); }
nav a:hover::after, nav a.active::after { width: 100%; }
.mobile-menu-btn { display: none; font-size: 1.5rem; cursor: pointer; color: var(--secondary); }

/* ========== SECTION BACKGROUNDS ========== */
section { position: relative; overflow: hidden; padding: 8rem 5%; }

.bg-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.18; z-index: 0; pointer-events: none; animation: orbFloat 12s ease-in-out infinite; will-change: transform, opacity; }
.bg-orb:nth-child(2) { animation-delay: -4s; animation-duration: 16s; }
.bg-orb:nth-child(3) { animation-delay: -8s; animation-duration: 20s; }

.bg-particle { position: absolute; width: 5px; height: 5px; background: var(--primary); border-radius: 50%; opacity: 0; z-index: 0; pointer-events: none; animation: particleFloat 10s ease-in-out infinite; }

.bg-grid { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(94,122,161,0.07) 1.5px, transparent 1.5px); background-size: 35px 35px; z-index: 0; pointer-events: none; opacity: 0; animation: gridFadeIn 1s ease-out forwards; }

.bg-mesh { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.1; background: radial-gradient(ellipse at 20% 50%, var(--primary) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, var(--secondary) 0%, transparent 50%), radial-gradient(ellipse at 50% 80%, var(--accent) 0%, transparent 50%); animation: meshShift 15s ease-in-out infinite alternate; }

.bg-wave { position: absolute; bottom: 0; left: 0; width: 200%; height: 100px; z-index: 0; pointer-events: none; opacity: 0.06; }
.bg-wave svg { width: 100%; height: 100%; }

.deco-ring { position: absolute; border: 2px dashed rgba(94, 122, 161, 0.12); border-radius: 50%; pointer-events: none; z-index: 0; animation: spinSlow 60s linear infinite; }

.deco-cross { position: absolute; width: 20px; height: 20px; z-index: 0; pointer-events: none; opacity: 0.12; animation: floatCross 8s ease-in-out infinite; }
.deco-cross::before, .deco-cross::after { content: ''; position: absolute; background: var(--primary); border-radius: 2px; }
.deco-cross::before { width: 100%; height: 3px; top: 50%; transform: translateY(-50%); }
.deco-cross::after { width: 3px; height: 100%; left: 50%; transform: translateX(-50%); }

/* Glow line divider between sections */
.section-divider { position: absolute; bottom: 0; left: 10%; width: 80%; height: 1px; background: linear-gradient(90deg, transparent, var(--primary), transparent); opacity: 0.2; z-index: 1; }

/* ========== HERO ========== */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 0 5%; background: linear-gradient(135deg, var(--bg) 0%, var(--accent) 100%); }
.hero::before { content: ''; position: absolute; top: -20%; right: -10%; width: 60vw; height: 60vw; border-radius: 50%; background: radial-gradient(circle, rgba(94,122,161,0.12) 0%, transparent 70%); z-index: 0; animation: pulse 8s ease-in-out infinite; }
.hero-content { width: 50%; position: relative; z-index: 1; }
.hero-subtitle { display: inline-block; padding: 0.5rem 1.5rem; background: rgba(94,122,161,0.1); color: var(--secondary); border-radius: 50px; font-weight: 600; margin-bottom: 1.5rem; border: 1px solid rgba(94,122,161,0.2); animation: fadeUp 0.8s ease-out 0.2s both; }
.hero-content h1 { animation: fadeUp 0.8s ease-out 0.4s both; will-change: transform, opacity; }
.hero-content > p { animation: fadeUp 0.8s ease-out 0.6s both; will-change: transform, opacity; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; animation: fadeUp 0.8s ease-out 0.8s both; will-change: transform, opacity; }
.hero-image { width: 50%; position: relative; z-index: 1; display: flex; justify-content: center; animation: fadeIn 1.2s ease-out 0.5s both; }

.image-wrapper { position: relative; width: 450px; height: 550px; border-radius: 30px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,0.1); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease; will-change: transform; }
.image-wrapper:hover { transform: scale(1.03) rotate(1deg); box-shadow: 0 40px 80px rgba(15,74,120,0.2); }
.image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.image-wrapper:hover img { transform: scale(1.05); }

.experience-badge { position: absolute; bottom: 30px; left: -30px; background: var(--glass-bg); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); padding: 1.5rem; border-radius: 20px; box-shadow: 0 15px 30px rgba(0,0,0,0.1), var(--glow); border: 1px solid var(--glass-border); display: flex; align-items: center; gap: 15px; animation: fadeUp 0.8s ease-out 1s both, float 4s ease-in-out 2s infinite; }
.experience-badge h3 { font-size: 2.5rem; color: var(--primary); margin: 0; }
.experience-badge p { font-size: 0.9rem; margin: 0; line-height: 1.2; color: var(--text); font-weight: 600; }

.text-shimmer { background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 40%, #8BA7C9 60%, var(--secondary) 100%); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: shimmer 3s ease-in-out infinite; }

/* ========== SECTION HEADER ========== */
.section-header { text-align: center; margin-bottom: 5rem; position: relative; z-index: 1; }
.section-header h2::after { left: 50%; transform: translateX(-50%); }
.section-header p { max-width: 600px; margin: 1rem auto 0; }

/* ========== ABOUT ========== */
.about { display: flex; align-items: center; gap: 5rem; background: var(--white); }
.about-content { flex: 1; position: relative; z-index: 1; }
.about-content p { text-align: justify; }
.about-image { flex: 1; position: relative; z-index: 1; }
.about-image img { width: 100%; border-radius: 30px; box-shadow: 0 20px 40px rgba(0,0,0,0.08); transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease; }
.about-image:hover img { transform: scale(1.04) rotate(1deg); box-shadow: 0 35px 70px rgba(15,74,120,0.15); }
/* Decorative glow behind about image */
.about-image::before { content: ''; position: absolute; inset: 20px; border-radius: 30px; background: linear-gradient(135deg, var(--primary), var(--secondary)); opacity: 0; transition: opacity 0.6s ease; z-index: -1; filter: blur(30px); }
.about-image:hover::before { opacity: 0.15; }

.about-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-top: 3rem; }
.stat-item { background: var(--bg); padding: 2rem; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transition: var(--transition); position: relative; z-index: 1; border: 1px solid transparent; }
.stat-item:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.05); border-color: rgba(94,122,161,0.2); }
.stat-item h3 { font-size: 2.5rem; color: var(--secondary); margin-bottom: 0.5rem; text-align: center !important; }
.stat-item p { text-align: center !important; margin: 0; }


/* ========== SERVICES ========== */
.services { background: var(--bg); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; position: relative; z-index: 1; }

.service-card { position: relative; border-radius: 20px; overflow: hidden; height: 380px; background-size: cover; background-position: center; cursor: pointer; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease; z-index: 1; will-change: transform; }
.card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,74,120,0.95) 0%, rgba(15,74,120,0.4) 40%, rgba(0,0,0,0.1) 100%); transition: transform 0.5s ease, opacity 0.5s ease, box-shadow 0.3s ease; z-index: 1; }
.service-card:hover .card-overlay { background: linear-gradient(to top, rgba(15,74,120,0.98) 0%, rgba(15,74,120,0.6) 50%, rgba(0,0,0,0.2) 100%); }
.service-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 25px 50px rgba(15,74,120,0.25); }

.card-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 2rem 1.5rem; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; transform: translateY(20px); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.service-card:hover .card-content { transform: translateY(0); }

.service-card .service-icon { width: 48px; height: 48px; background: rgba(255,255,255,0.15); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--white); margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.25); transition: transform 0.4s ease, opacity 0.4s ease, background 0.3s ease, color 0.3s ease; }
.service-card:hover .service-icon { background: rgba(255,255,255,0.25); transform: scale(1.1); }

.service-card h3 { color: var(--white); font-size: 1.25rem; margin-bottom: 0.5rem; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.service-card p { color: rgba(255,255,255,0.8); font-size: 0.9rem; line-height: 1.5; margin-bottom: 0; opacity: 0; max-height: 0; transition: opacity 0.5s ease, max-height 0.5s ease; }
.service-card:hover p { opacity: 1; max-height: 100px; margin-bottom: 1rem; }

.card-link { color: var(--white); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px; opacity: 0; transform: translateY(10px); transition: all 0.4s ease 0.1s; }
.card-link i { transition: transform 0.3s ease; }
.card-link:hover i { transform: translateX(5px); }
.service-card:hover .card-link { opacity: 1; transform: translateY(0); }

/* Service Card Backgrounds — imágenes locales */
.service-obesidad              { background-image: url('image/Servicios/obesidad.jpg'); }
.service-glp1                  { background-image: url('image/Servicios/glp1.jpg'); }
.service-resistencia-insulina  { background-image: url('image/Servicios/resistencia_insulina.jpg'); }
.service-diabetes              { background-image: url('image/Servicios/diabetes.jpg'); }
.service-hipertension          { background-image: url('image/Servicios/hipertension.jpg'); }
.service-colesterol            { background-image: url('image/Servicios/colesterol.jpg'); }
.service-higado-graso          { background-image: url('image/Servicios/higado_graso.jpg'); }
.service-sindrome-metabolico   { background-image: url('image/Servicios/sindrome_metabolico.jpg'); }
.service-digestivos            { background-image: url('image/Servicios/digestivos.jpg'); }
.service-gastritis             { background-image: url('image/Servicios/gastritis.jpg'); }
.service-renal                 { background-image: url('image/Servicios/renal.jpg'); }
.service-autoinmunes           { background-image: url('image/Servicios/autoinmunes.jpg'); }
.service-hormonales            { background-image: url('image/Servicios/hormonales.jpg'); }
.service-menopausia            { background-image: url('image/Servicios/menopausia.jpg'); }
.service-adultos-mayores       { background-image: url('image/Servicios/adultos_mayores.jpg'); }
.service-postquirurgica        { background-image: url('image/Servicios/postquirurgica.jpg'); }
.service-radiofrecuencia-ter   { background-image: url('image/Servicios/radiofrecuencia_ter.jpg'); }
.service-ultrasonido           { background-image: url('image/Servicios/ultrasonido.jpg'); }
.service-recuperacion-muscular { background-image: url('image/Servicios/recuperacion_muscular.jpg'); }
.service-reduccion-medidas     { background-image: url('image/Servicios/reduccion_medidas.jpg'); }
.service-tonificacion          { background-image: url('image/Servicios/tonificacion.jpg'); }

/* Compact 7-column layout on Desktop (3 rows of 7 cards = 21 cards) */
@media (min-width: 1025px) {
    .services { padding: 6rem 2%; }
    .services-grid { grid-template-columns: repeat(7, 1fr); gap: 0.6rem; }
    
    .service-card { 
        height: 230px; 
        border-radius: 16px; 
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
        transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), 
                    box-shadow 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), 
                    border-color 0.3s ease;
    }
    
    .card-overlay { 
        background: linear-gradient(to top, rgba(15, 74, 120, 0.88) 0%, rgba(15, 74, 120, 0.4) 60%, rgba(0, 0, 0, 0.1) 100%); 
        transition: background 0.4s ease, backdrop-filter 0.4s ease;
    }
    
    .service-card:hover .card-overlay { 
        background: linear-gradient(to top, rgba(15, 74, 120, 0.96) 0%, rgba(94, 122, 161, 0.6) 100%);
        backdrop-filter: blur(4px);
    }
    
    .service-card:hover { 
        transform: translateY(-8px) scale(1.02); 
        box-shadow: 0 15px 30px rgba(15, 74, 120, 0.3), 0 0 15px rgba(94, 122, 161, 0.2); 
        border-color: rgba(255, 255, 255, 0.35);
    }
    
    .card-content { 
        position: absolute;
        inset: 0;
        padding: 1.25rem 0.6rem; 
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        transform: translateY(0);
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    
    .service-card:hover .card-content {
        transform: translateY(0);
    }
    
    .service-card .service-icon { 
        width: 44px; 
        height: 44px; 
        font-size: 1.1rem; 
        margin-bottom: 0.75rem; 
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                    background 0.3s ease, 
                    box-shadow 0.3s ease;
    }
    
    .service-card:hover .service-icon { 
        transform: scale(1.1) translateY(-2px); 
        background: rgba(255, 255, 255, 0.22);
        box-shadow: 0 6px 12px rgba(255, 255, 255, 0.15);
    }
    
    .service-card h3 { 
        font-size: 0.88rem; 
        line-height: 1.3; 
        margin-bottom: 0; 
        font-weight: 600; 
        color: var(--white);
        text-shadow: 0 2px 4px rgba(0,0,0,0.5); 
        max-width: 100%;
        word-wrap: break-word; 
        hyphens: auto;
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    
    .service-card:hover h3 {
        transform: translateY(-4px);
    }
    
    .service-card p { 
        display: none !important; 
    }
    
    .card-link { 
        font-size: 0.7rem; 
        font-weight: 600;
        gap: 4px; 
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        margin-top: 0.6rem;
        background: rgba(255, 255, 255, 0.15);
        padding: 0.3rem 0.75rem;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(2px);
    }
    
    .service-card:hover .card-link { 
        opacity: 1; 
        transform: translateY(0); 
    }
    
    .card-link:hover {
        background: var(--white);
        color: var(--secondary);
    }
}

/* ========== SERVICE MODAL ========== */
.service-modal-overlay { position: fixed; inset: 0; background: rgba(15,74,120,0.85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: transform 0.4s ease, opacity 0.4s ease, background 0.3s ease, color 0.3s ease; padding: 2rem; }
.service-modal-overlay.active { opacity: 1; visibility: visible; }
.service-modal-content { background: var(--white); width: 100%; max-width: 800px; max-height: 90vh; border-radius: 24px; overflow-y: auto; position: relative; transform: translateY(50px) scale(0.95); transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 40px 80px rgba(0,0,0,0.3); opacity: 0; }
.service-modal-overlay.active .service-modal-content { transform: translateY(0) scale(1); opacity: 1; }
.service-modal-content::-webkit-scrollbar { width: 8px; }
.service-modal-content::-webkit-scrollbar-track { background: transparent; }
.service-modal-content::-webkit-scrollbar-thumb { background: rgba(94,122,161,0.3); border-radius: 10px; }

.close-modal-btn { position: absolute; top: 1.5rem; right: 1.5rem; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.3); color: var(--white); border: 1px solid rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; cursor: pointer; z-index: 10; transition: transform 0.4s ease, opacity 0.4s ease, background 0.3s ease, color 0.3s ease; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.close-modal-btn:hover { background: var(--primary); transform: rotate(90deg); border-color: transparent; }

.modal-image { position: relative; width: 100%; height: 300px; }
.modal-image img { width: 100%; height: 100%; object-fit: cover; }
.modal-image-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,74,120,0.9) 0%, rgba(15,74,120,0.2) 100%); }
.modal-image h2 { position: absolute; bottom: 2rem; left: 2.5rem; color: var(--white); font-size: 2.2rem; margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,0.3); z-index: 2; }

.modal-body { padding: 2.5rem; }
.modal-section { margin-bottom: 2rem; }
.modal-section h3 { display: flex; align-items: center; gap: 10px; color: var(--secondary); font-size: 1.3rem; margin-bottom: 1rem; border-bottom: 2px solid rgba(94,122,161,0.1); padding-bottom: 0.5rem; }
.modal-section h3 i { color: var(--primary); }
.modal-section p { color: var(--text); line-height: 1.7; font-size: 1rem; margin: 0; text-align: justify; }

.modal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.modal-section ul { list-style: none; padding: 0; margin: 0; }
.modal-section ul li { position: relative; padding-left: 1.5rem; margin-bottom: 0.8rem; color: var(--text); line-height: 1.5; font-size: 0.95rem; text-align: justify; }
.modal-section ul li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: bold; }

.modal-longevity { background: linear-gradient(135deg, rgba(94,122,161,0.1), rgba(15,74,120,0.05)); padding: 2rem; border-radius: 16px; display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 2.5rem; border: 1px solid rgba(94,122,161,0.2); }
.modal-longevity i { font-size: 2rem; color: var(--primary); background: var(--white); width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 5px 15px rgba(15,74,120,0.1); }
.modal-longevity p { margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--secondary); text-align: justify; }
.modal-longevity strong { color: var(--primary); }

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

@media (max-width: 768px) {
    .service-modal-overlay { padding: 1rem; }
    .modal-image { height: 200px; }
    .modal-image h2 { font-size: 1.8rem; left: 1.5rem; bottom: 1.5rem; }
    .modal-body { padding: 1.5rem; }
    .modal-grid { grid-template-columns: 1fr; gap: 1rem; }
    .modal-longevity { flex-direction: column; text-align: center; align-items: center; padding: 1.5rem; }
}

/* ========== GALLERY BEFORE/AFTER ========== */
.gallery-section { background: var(--white); }

.gallery-filters { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; position: relative; z-index: 1; }
.filter-btn { padding: 0.7rem 1.8rem; border: 2px solid rgba(94,122,161,0.2); background: transparent; border-radius: 50px; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 0.95rem; color: var(--text); cursor: pointer; transition: var(--transition); }
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: linear-gradient(135deg, var(--secondary), var(--primary)); color: var(--white); border-color: transparent; box-shadow: 0 8px 20px rgba(15,74,120,0.2); }

/* Gallery grid — collapsed to 1 row by default */
.gallery-grid-wrapper { overflow: hidden; max-height: var(--gallery-row-h, 420px); transition: max-height 0.85s cubic-bezier(0.16, 1, 0.3, 1); position: relative; }
.gallery-grid-wrapper.expanded { max-height: 4000px; }
/* Fade-out gradient at the bottom edge when collapsed */
.gallery-grid-wrapper:not(.expanded)::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 80px; background: linear-gradient(to bottom, transparent, var(--white)); pointer-events: none; z-index: 2; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; position: relative; z-index: 1; }

.gallery-card { border-radius: 20px; overflow: hidden; background: var(--bg); transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); border: 1px solid rgba(0,0,0,0.05); }
.gallery-card.hidden { display: none; }
.gallery-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(15,74,120,0.12); }

.gallery-card-info { padding: 1.2rem 1.5rem; display: flex; align-items: center; gap: 1rem; }
.gallery-tag { padding: 0.3rem 0.8rem; background: rgba(94,122,161,0.1); color: var(--primary); border-radius: 50px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; border: 1px solid rgba(94,122,161,0.15); }
.gallery-card-info h3 { font-size: 1.1rem; margin: 0; font-family: 'Montserrat', sans-serif; font-weight: 600; color: var(--secondary); }

.gallery-load-more { text-align: center; margin-top: 2rem; position: relative; z-index: 1; }
.gallery-load-btn { display: inline-flex; background: var(--bg); border: 2px solid var(--primary); color: var(--secondary); }
.gallery-load-btn:hover { background: var(--primary); color: var(--white); }
.gallery-load-btn i { margin-left: 8px; transition: transform 0.3s ease; }
.gallery-load-btn.open i { transform: rotate(180deg); }

/* Before/After Slider */
.ba-slider { position: relative; width: 100%; aspect-ratio: 3/2; overflow: hidden; cursor: ew-resize; -webkit-user-select: none; user-select: none; }
.ba-image { position: absolute; inset: 0; }
.ba-image img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ba-before { position: absolute; top: 0; left: 0; width: 50%; height: 100%; overflow: hidden; z-index: 2; }
.ba-before img { width: auto; min-width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
.ba-after { z-index: 1; }

.ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: 4px; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.ba-handle-line { flex: 1; width: 3px; background: var(--white); box-shadow: 0 0 8px rgba(0,0,0,0.3); }
.ba-handle-circle { width: 42px; height: 42px; border-radius: 50%; background: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.25), 0 0 0 3px rgba(94,122,161,0.3); color: var(--secondary); font-size: 0.9rem; flex-shrink: 0; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.ba-slider:hover .ba-handle-circle { transform: scale(1.15); box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 0 4px rgba(94,122,161,0.4); }

/* Before/After Labels */
.ba-slider::before, .ba-slider::after { position: absolute; top: 12px; padding: 0.3rem 0.8rem; border-radius: 6px; font-family: 'Montserrat', sans-serif; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; z-index: 4; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.ba-slider::before { content: 'Antes'; left: 12px; background: rgba(0,0,0,0.6); color: var(--white); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ba-slider::after { content: 'Después'; right: 12px; background: rgba(15,74,120,0.8); color: var(--white); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ba-slider:hover::before, .ba-slider:hover::after { opacity: 1; }

/* ========== CONTACT SECTION ========== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; justify-content: center; position: relative; z-index: 1; }
.contact-card { background: var(--white); border-radius: 20px; padding: 2.5rem 2rem; text-align: center; width: 100%; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.02); display: flex; flex-direction: column; align-items: center; position: relative; overflow: hidden; }
.contact-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(94,122,161,0.05), rgba(15,74,120,0.02)); z-index: 0; opacity: 0; transition: opacity 0.5s ease; }
.contact-card:hover { transform: translateY(-10px); box-shadow: 0 20px 50px rgba(15,74,120,0.15); border-color: rgba(94,122,161,0.1); }
.contact-card:hover::before { opacity: 1; }
.contact-card > * { position: relative; z-index: 1; }

.contact-card.highlight { background: linear-gradient(135deg, var(--secondary), var(--primary)); color: var(--white); }
.contact-card.highlight h3, .contact-card.highlight p { color: var(--white); }
.contact-card.highlight .contact-icon { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); color: var(--white); }
.contact-card.highlight .btn-primary { background: var(--white); color: var(--primary); }
.contact-card.highlight .btn-primary:hover { background: var(--accent); color: var(--white); transform: scale(1.05); }
.contact-card.highlight:hover { box-shadow: 0 20px 50px rgba(15,74,120,0.4); }

.contact-icon { width: 70px; height: 70px; border-radius: 50%; background: rgba(94,122,161,0.1); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--primary); margin: 0 auto 1.5rem; border: 1px solid rgba(94,122,161,0.2); transition: all 0.5s ease; }
.contact-card:hover .contact-icon { transform: scale(1.1) rotate(5deg); background: var(--primary); color: var(--white); border-color: transparent; }
.contact-card.highlight:hover .contact-icon { transform: scale(1.1) rotate(5deg); background: rgba(255,255,255,0.3); }
.contact-card h3 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--secondary); font-family: 'Montserrat', sans-serif; }
.contact-card p { font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.5rem; flex-grow: 1; color: var(--text); }
.contact-link { color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: var(--transition); }
.contact-whatsapp-btn, .contact-email-btn { margin-top: 1rem; width: 100%; }
.contact-link:hover { gap: 12px; }

/* ========== TESTIMONIOS (FEED CRONOLÓGICO VERTICAL) ========== */
.testimonials { background: #f8fafc; }
.reviews-feed-container { 
  display: flex; 
  flex-direction: column; 
  gap: 1.75rem; 
  max-width: 1100px; 
  margin: 0 auto; 
  position: relative; 
  z-index: 1; 
}
.review-feed-card { 
  background: var(--white); 
  border-radius: 20px; 
  padding: 2.25rem 2.75rem; 
  box-shadow: 0 10px 30px rgba(15,74,120,0.03), 0 1px 3px rgba(0,0,0,0.01); 
  border: 1px solid rgba(94, 122, 161, 0.12); 
  display: flex; 
  flex-direction: row; 
  gap: 2.5rem;
  transition: var(--transition);
  text-align: left;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.review-feed-card:hover { 
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(15,74,120,0.08), var(--glow);
  border-color: rgba(94,122,161,0.25);
}

/* Columna 1: Información del cliente, fecha y valoración */
.review-card-col-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 250px;
  flex-shrink: 0;
}
.review-client-avatar { 
  width: 50px; 
  height: 50px; 
  border-radius: 50%; 
  overflow: hidden; 
  border: 2px solid var(--white); 
  box-shadow: 0 4px 10px rgba(15,74,120,0.12); 
  flex-shrink: 0; 
  background: var(--white);
  transition: transform 0.3s ease;
}
.review-feed-card:hover .review-client-avatar {
  transform: scale(1.06);
}
.review-client-avatar img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
.review-client-avatar.letter-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.review-client-meta { 
  display: flex; 
  flex-direction: column;
  align-items: flex-start; 
  gap: 5px; 
}
.review-client-meta .review-name { 
  font-size: 0.95rem; 
  font-weight: 700; 
  color: var(--secondary); 
  font-family: 'Montserrat', sans-serif;
  line-height: 1.25;
}
.review-verified-badge { 
  display: inline-flex; 
  align-items: center; 
  gap: 3px;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.08), rgba(39, 174, 96, 0.04)); 
  color: #27ae60; 
  border-radius: 50px; 
  font-size: 0.65rem; 
  font-weight: 600; 
  padding: 2px 9px;
  border: 1px solid rgba(46, 204, 113, 0.16);
  box-shadow: 0 2px 4px rgba(46,204,113,0.03);
}
.review-verified-badge i { 
  font-size: 0.6rem; 
}

.review-date-time { 
  font-size: 0.78rem; 
  color: #64748b; 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  font-weight: 400;
}
.review-date-time i {
  color: var(--primary);
  font-size: 0.78rem;
}

/* Fila de valoración */
.review-rating-row { 
  display: flex; 
  flex-direction: column;
  align-items: flex-start;
  gap: 5px; 
  margin-top: 0.3rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(94, 122, 161, 0.15);
}
.review-rating-stars { 
  display: flex; 
  gap: 4px; 
}
.review-rating-stars i { 
  color: #f1c40f; 
  font-size: 0.9rem; 
  text-shadow: 0 1px 2px rgba(241, 196, 15, 0.15);
}
.review-rating-score { 
  color: var(--secondary); 
  font-weight: 700; 
  font-size: 0.75rem; 
  background: rgba(94, 122, 161, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(94, 122, 161, 0.15);
  display: inline-block;
  letter-spacing: 0.5px;
}

/* Columna 2: Solo el escrito o texto de la opinión */
.review-card-col-content {
  flex-grow: 1;
  padding-left: 2.5rem;
  border-left: 1px dashed rgba(94, 122, 161, 0.2);
  align-self: stretch;
  display: flex;
  align-items: center;
  position: relative;
}
.review-card-col-content::after {
  content: '“';
  position: absolute;
  bottom: -20px;
  right: 15px;
  font-size: 9rem;
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--primary);
  opacity: 0.05;
  line-height: 1;
  pointer-events: none;
}
.review-card-content { 
  font-size: 0.96rem; 
  color: #334155; 
  line-height: 1.65; 
  text-align: justify; 
  font-weight: 400; 
  margin: 0; 
  position: relative;
  z-index: 1;
}

/* Soporte responsive para la estructura de dos columnas */
@media (max-width: 650px) {
  .review-feed-card {
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
  }
  .review-card-col-info {
    width: 100%;
    border-bottom: 1px dashed rgba(94, 122, 161, 0.15);
    padding-bottom: 1.25rem;
    gap: 0.5rem;
  }
  .review-rating-row {
    border-top: none;
    padding-top: 0;
    margin-top: 0.2rem;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .review-card-col-content {
    padding-left: 0;
    border-left: none;
    align-self: flex-start;
  }
  .review-card-col-content::after {
    font-size: 6rem;
    bottom: -20px;
    right: 5px;
  }
}

/* Contenedor y Botón Mostrar más */
.reviews-load-more-container {
  text-align: center;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}
.btn-load-more {
  background: transparent;
  color: var(--secondary);
  border: 1.5px solid var(--secondary);
  padding: 0.75rem 2.25rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-load-more:hover {
  background: var(--secondary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 74, 120, 0.15);
}

/* ========== FOOTER ========== */
footer { background: linear-gradient(to bottom, #0d2847, #071526); color: var(--white); padding: 6rem 5% 2rem; position: relative; overflow: hidden; border-top: 1px solid rgba(255,255,255,0.05); }
footer::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at top right, rgba(94,122,161,0.1), transparent 50%), radial-gradient(circle at bottom left, rgba(255,255,255,0.02), transparent 50%); pointer-events: none; }

.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; position: relative; z-index: 1; }

.footer-about { padding-right: 2rem; }
.footer-logo { margin-bottom: 1.8rem; }
.footer-logo img { filter: brightness(0) invert(1); transition: opacity 0.3s ease; }
.footer-logo-img { height: 35px; width: auto; }
.footer-logo img:hover { opacity: 0.8; }
.footer-about p { color: rgba(255,255,255,0.7); font-size: 0.95rem; line-height: 1.7; margin-bottom: 2rem; }

.social-links { display: flex; gap: 1rem; }
.social-icon { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; color: var(--white); text-decoration: none; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); border: 1px solid rgba(255,255,255,0.1); }
.social-icon:hover { background: var(--primary); transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 10px 20px rgba(15,74,120,0.4); }

.footer-links h4 { color: var(--white); font-size: 1.2rem; margin-bottom: 1.8rem; font-family: 'Montserrat', sans-serif; position: relative; display: inline-block; }
.footer-links h4::after { content: ''; position: absolute; left: 0; bottom: -8px; width: 30px; height: 2px; background: var(--primary); border-radius: 2px; transition: width 0.3s ease; }
.footer-links:hover h4::after { width: 100%; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 1rem; }
.footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.footer-links a::before { content: '\f105'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.8rem; color: var(--primary); opacity: 0; transform: translateX(-10px); transition: all 0.3s ease; }
.footer-links a:hover { color: var(--white); transform: translateX(5px); }
.footer-links a:hover::before { opacity: 1; transform: translateX(0); }

.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); font-size: 0.85rem; position: relative; z-index: 1; }
.copyright-text { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0; }
.developer-link { color: var(--primary); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.dev-logo { height: 16px; opacity: 0.5; transition: transform 0.4s ease, opacity 0.4s ease, background 0.3s ease, color 0.3s ease; }
.developer-link:hover .dev-logo { opacity: 1; filter: drop-shadow(0 0 5px rgba(255,255,255,0.5)); }

@media (max-width: 992px) {
    .footer-content { grid-template-columns: 1fr 1fr; gap: 3rem; }
    .footer-about { grid-column: 1 / -1; padding-right: 0; }
}
@media (max-width: 576px) {
    .footer-content { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1rem; }
    .footer-about { grid-column: 1 / -1; text-align: center; }
    .footer-logo { display: flex; justify-content: center; }
    .social-links { justify-content: center; }
    .footer-links h4 { font-size: 1rem; margin-bottom: 1.2rem; }
    .footer-links h4::after { left: 0; }
    .footer-links ul li { margin-bottom: 0.8rem; }
    .footer-links a { font-size: 0.85rem; align-items: flex-start; line-height: 1.4; }
    .footer-links a::before { margin-top: 2px; }
}

/* ========== SCROLL REVEALS ========== */
.reveal { opacity: 0; transform: translateY(50px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform, opacity; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left { opacity: 0; transform: translateX(-80px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right { opacity: 0; transform: translateX(80px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale { opacity: 0; transform: scale(0.8); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-scale.visible { opacity: 1; transform: scale(1); }

.stagger-children > * { opacity: 0; transform: translateY(40px); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.08s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.16s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.24s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.32s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.40s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.48s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.56s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.64s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(9) { transition-delay: 0.72s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(10) { transition-delay: 0.80s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(11) { transition-delay: 0.88s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(12) { transition-delay: 0.96s; opacity: 1; transform: translateY(0); }

/* ========== KEYFRAMES ========== */
@keyframes float { 0% { transform: translateY(0); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.1; } 50% { transform: scale(1.2); opacity: 0.25; } }
@keyframes orbFloat { 0% { transform: translate(0, 0) scale(1); } 25% { transform: translate(40px, -30px) scale(1.05); } 50% { transform: translate(-20px, -50px) scale(0.95); } 75% { transform: translate(-30px, 20px) scale(1.03); } 100% { transform: translate(0, 0) scale(1); } }
@keyframes particleFloat { 0% { transform: translateY(0) translateX(0); opacity: 0; } 15% { opacity: 0.4; } 50% { transform: translateY(-200px) translateX(40px); opacity: 0.2; } 85% { opacity: 0.4; } 100% { transform: translateY(-400px) translateX(-20px); opacity: 0; } }
@keyframes meshShift { 0% { background-position: 0% 0%, 100% 0%, 50% 100%; } 100% { background-position: 100% 100%, 0% 100%, 50% 0%; } }
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes spinSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes gridFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes floatCross { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-15px) rotate(45deg); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 20px rgba(94,122,161,0.1); } 50% { box-shadow: 0 0 40px rgba(94,122,161,0.25); } }
@keyframes borderGlow { 0%, 100% { border-color: rgba(94,122,161,0.1); } 50% { border-color: rgba(94,122,161,0.3); } }

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    h1 { font-size: 3.5rem; }
    .hero { flex-direction: column; text-align: center; padding-top: 8rem; }
    .hero-content, .hero-image { width: 100%; }
    .hero-actions { justify-content: center; }
    .hero-image { margin-top: 4rem; }
    .experience-badge { left: 50%; transform: translateX(-50%); bottom: 15px; }
    .about { flex-direction: column; }
}

@media (max-width: 768px) {
    header { padding: 1rem 5%; }
    nav { position: absolute; top: 100%; left: 0; width: 100%; background: var(--white); padding: 2rem; box-shadow: 0 10px 20px rgba(0,0,0,0.1); display: none; flex-direction: column; text-align: center; }
    nav.active { display: flex; }
    nav ul { flex-direction: column; gap: 1.5rem; }
    .mobile-menu-btn { display: block; }
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    .image-wrapper { width: 100%; max-width: 400px; height: 450px; }
    .bg-orb { opacity: 0.08; }
    .deco-cross, .deco-ring { display: none; }
}

@media (min-width: 577px) and (max-width: 1024px) {
    .services { padding: 5rem 3%; }
    .services-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.8rem; }
    .service-card { height: 230px; border-radius: 16px; }
    .card-content { 
        position: absolute;
        inset: 0;
        padding: 1.25rem 0.75rem; 
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        transform: translateY(0); 
    }
    .service-card .service-icon { width: 40px; height: 40px; font-size: 1rem; margin-bottom: 0.6rem; }
    .service-card h3 { font-size: 0.9rem; line-height: 1.3; margin-bottom: 0; font-weight: 600; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
    .service-card p { display: none !important; }
    .card-link { display: none !important; }
}

@media (max-width: 576px) {
    /* Services Grid Mobile */
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .service-card { height: 180px; border-radius: 16px; }
    .card-content { 
        position: absolute;
        inset: 0;
        padding: 1rem; 
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        transform: translateY(0); 
    }
    .service-card .service-icon { width: 32px; height: 32px; font-size: 0.9rem; margin-bottom: 0.5rem; border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; }
    .service-card h3 { font-size: 0.85rem; margin-bottom: 0; text-shadow: 0 2px 5px rgba(0,0,0,0.6); }
    .service-card p { display: none !important; }
    .card-link { display: none !important; }
    .card-overlay { background: linear-gradient(to top, rgba(15,74,120,0.95) 0%, rgba(15, 74, 120, 0.3) 60%, transparent 100%); }

    /* Gallery Grid Mobile */
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .gallery-card { border-radius: 12px; }
    .gallery-card-info { padding: 0.8rem; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .gallery-tag { font-size: 0.65rem; padding: 0.2rem 0.5rem; }
    .gallery-card-info h3 { font-size: 0.85rem; }
    .ba-handle-circle { width: 28px; height: 28px; font-size: 0.6rem; box-shadow: 0 2px 8px rgba(0,0,0,0.2), 0 0 0 2px rgba(94,122,161,0.3); }
    .ba-slider::before, .ba-slider::after { font-size: 0.55rem; padding: 0.2rem 0.4rem; top: 6px; opacity: 1; }
    .ba-slider::before { left: 6px; }
    .ba-slider::after { right: 6px; }

    /* Testimonials Mobile */
    .testimonial-grid { grid-template-columns: 1fr; gap: 1rem; }
    .testimonial-card { padding: 1rem; }
    .fb-recommend-text { font-size: 0.82rem; }
    .fb-content p { font-size: 0.88rem; }
    .fb-btn { font-size: 0.78rem; padding: 0.4rem; gap: 4px; }

    /* Contact Grid Mobile - 3 columns */
    .contact-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .contact-card { padding: 1rem 0.5rem; border-radius: 12px; }
    .contact-card p { display: none; }
    .contact-icon { width: 40px; height: 40px; font-size: 1.2rem; margin-bottom: 0.5rem; }
    .contact-card h3 { font-size: 0.75rem; line-height: 1.2; margin-bottom: 0.5rem; text-align: center; word-wrap: break-word; }
    .contact-card .btn, .contact-card .contact-link { padding: 0.4rem; font-size: 0.65rem; border-radius: 8px; width: 100% !important; justify-content: center; margin-top: auto; }
    .contact-card .contact-link i { display: none; }
}

@media (max-width: 480px) {
    section { padding: 5rem 5%; }
    .btn { width: 100%; justify-content: center; padding: 0.8rem 1.5rem; font-size: 1rem; }
    .hero-actions { flex-direction: column; }
    .gallery-filters { flex-direction: column; align-items: stretch; }
    .filter-btn { width: 100%; margin-bottom: 0.5rem; }
}

/* ========== AI ASSISTANT ========== */
.ai-assistant-wrapper { position: fixed; bottom: 30px; right: 30px; z-index: 1000; display: flex; flex-direction: column; align-items: flex-end; }
.ai-bubble-btn { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--secondary), var(--primary)); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--white); box-shadow: 0 10px 25px rgba(15,74,120,0.4); position: relative; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); outline: none; }
.ai-bubble-btn::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--primary); opacity: 0; transform: scale(0.8); transition: transform 0.4s ease, opacity 0.4s ease, background 0.3s ease, color 0.3s ease; pointer-events: none; }
.ai-bubble-btn:hover { transform: scale(1.05) translateY(-5px); box-shadow: 0 15px 35px rgba(15,74,120,0.6); }
.ai-bubble-icon { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.ai-bot-svg { transform: translateY(2px); }
.ai-sparkle-icon { position: absolute; top: 10px; right: 10px; font-size: 0.6rem; color: #fff; animation: pulse 2s infinite; }
.ai-bubble-btn:hover::before { opacity: 1; transform: scale(1.1); animation: pulse-border 2s infinite; }
.ai-tooltip { position: absolute; right: 75px; background: var(--white); color: var(--secondary); padding: 12px; border-radius: 12px; font-size: 0.85rem; font-weight: 600; white-space: normal; text-align: left; width: 200px; line-height: 1.4; box-shadow: 0 5px 15px rgba(0,0,0,0.1); opacity: 0; transform: translateX(10px); pointer-events: none; transition: transform 0.4s ease, opacity 0.4s ease, background 0.3s ease, color 0.3s ease; }
.ai-tooltip::after { content: ''; position: absolute; top: 50%; right: -6px; transform: translateY(-50%); border-width: 6px 0 6px 6px; border-style: solid; border-color: transparent transparent transparent var(--white); }
.ai-bubble-btn:hover .ai-tooltip { opacity: 1; transform: translateX(0); }

@keyframes pulse-border { 0% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

.ai-chat-window { position: absolute; bottom: 80px; right: 0; width: 350px; background: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.15); border: 1px solid rgba(255,255,255,0.5); display: flex; flex-direction: column; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.95); transform-origin: bottom right; transition: transform 0.4s ease, opacity 0.4s ease, background 0.3s ease, color 0.3s ease; }
.ai-chat-window.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.ai-chat-header { background: linear-gradient(135deg, var(--secondary), var(--primary)); padding: 1.2rem; display: flex; align-items: center; gap: 12px; position: relative; }
.ai-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 1.2rem; border: 1px solid rgba(255,255,255,0.3); }
.ai-avatar-style { background: var(--white); color: var(--primary); border: none; }
.ai-header-info h4 { color: var(--white); margin: 0 0 2px 0; font-size: 1rem; font-family: 'Montserrat', sans-serif; display: flex; align-items: center; }
.ai-badge { background: rgba(255,255,255,0.2); padding: 2px 6px; border-radius: 4px; font-size: 0.65rem; margin-left: 5px; }
.ai-header-info p { color: rgba(255,255,255,0.8); margin: 0; font-size: 0.75rem; display: flex; align-items: center; gap: 5px; }
.ai-close-btn { position: absolute; top: 1.2rem; right: 1.2rem; background: none; border: none; color: rgba(255,255,255,0.6); font-size: 1.2rem; cursor: pointer; transition: color 0.3s ease; }
.ai-close-btn:hover { color: var(--white); }

.ai-chat-body { padding: 1.5rem; height: 350px; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.ai-chat-body::-webkit-scrollbar { width: 5px; }
.ai-chat-body::-webkit-scrollbar-track { background: transparent; }
.ai-chat-body::-webkit-scrollbar-thumb { background: rgba(94,122,161,0.2); border-radius: 10px; }

.ai-msg { max-width: 85%; padding: 12px 16px; border-radius: 15px; font-size: 0.9rem; line-height: 1.5; animation: ai-msg-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; opacity: 0; transform: translateY(10px); }
@keyframes ai-msg-pop { to { opacity: 1; transform: translateY(0); } }
.ai-msg.bot { background: rgba(94,122,161,0.1); color: var(--secondary); align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-msg.user { background: var(--primary); color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px; box-shadow: 0 5px 15px rgba(15,74,120,0.2); }

.ai-chat-input { padding: 1rem; border-top: 1px solid rgba(0,0,0,0.05); display: flex; gap: 10px; background: rgba(255,255,255,0.5); }
.ai-chat-input input { flex: 1; border: 1px solid rgba(94,122,161,0.2); border-radius: 30px; padding: 10px 15px; font-family: 'Montserrat', sans-serif; font-size: 0.9rem; outline: none; transition: border-color 0.3s ease; }
.ai-chat-input input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,74,120,0.1); }
.ai-chat-input button { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--white); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: all 0.3s ease; }
.ai-chat-input button:hover { background: var(--secondary); transform: scale(1.05); }

.typing-indicator { display: flex; gap: 4px; padding: 5px 0; }
.typing-indicator span { width: 6px; height: 6px; background: rgba(94,122,161,0.5); border-radius: 50%; animation: typing 1.4s infinite ease-in-out; }
.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

@media (max-width: 480px) {
    .ai-assistant-wrapper { bottom: 20px; right: 20px; }
    .ai-chat-window { width: 320px; bottom: 70px; right: -10px; }
}

/* ========== FOOTER ADDITIONS ========== */
.admin-lock-link { color: rgba(255,255,255,0.4); text-decoration: none; margin-left: 10px; transition: color 0.3s ease; }
.admin-lock-link:hover { color: rgba(255,255,255,0.8); }
.admin-lock-icon { font-size: 0.8rem; }

/* ========== SEO TAGS / PILLS (SERVICIOS Y GALERÍA) ========== */
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.4s ease;
}
.service-card:hover .service-tags {
  opacity: 1;
  max-height: 60px;
}
.service-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  letter-spacing: 0.3px;
}

.gallery-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.gallery-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  background: rgba(94,122,161,0.08);
  border: 1px solid rgba(94,122,161,0.18);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  transition: background 0.3s ease, color 0.3s ease;
}
.gallery-card:hover .gallery-tag-pill {
  background: rgba(15,74,120,0.10);
  color: var(--secondary);
}

/* Mobile: tags simplificados */
@media (max-width: 576px) {
  .service-tags, .gallery-tags { display: none; }
}
