﻿/* =============================================
   ECONITIDA - ESTILOS PERSONALIZADOS v2
   Colores del logo: Azul #2362a2 | Verde #438330
   ============================================= */

/* ---- VARIABLES CSS ---- */
:root {
  --color-brand: #2362a2;
  --color-brand-light: #2d7bc7;
  --color-brand-dark: #1a4a7a;
   --color-sun: #2362a2;
   --color-sun-light: #2d7bc7;
   --color-sun-dark: #1a4a7a;
  --color-eco: #438330;
  --color-eco-light: #5aa345;
  --color-eco-dark: #336625;
  --color-navy: #1a2e4a;
  --color-navy-light: #16213E;
  --color-white: #FFFFFF;
  --color-gray-50: #FAFAFA;
  --color-gray-100: #F5F5F5;
  --color-gray-200: #EEEEEE;
  --color-gray-300: #E0E0E0;
  --color-gray-600: #757575;
  --color-gray-800: #424242;
  --color-overlay: rgba(26, 46, 74, 0.75);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
   --shadow-glow: 0 0 40px rgba(35, 98, 162, 0.3);
  --transition-fast: 0.2s ease;
  --transition-base: 0.4s ease;
  --transition-slow: 0.6s ease;
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ---- RESET Y BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font-main); color: var(--color-navy); background: var(--color-white); overflow-x: clip; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =============================================
   TRANSICIONES Y ANIMACIONES
   ============================================= */
.reveal { opacity: 0; transform: translateY(50px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

.reveal-left { opacity: 0; transform: translateX(-60px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-left.active { opacity: 1; transform: translateX(0); }

.reveal-right { opacity: 0; transform: translateX(60px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-right.active { opacity: 1; transform: translateX(0); }

.reveal-scale { opacity: 0; transform: scale(0.85); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-scale.active { opacity: 1; transform: scale(1); }

@keyframes heroFadeUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroScale { from { opacity: 0; transform: scale(1.1); } to { opacity: 1; transform: scale(1); } }

.hero-bg, .hero-carousel { animation: heroScale 1.5s ease forwards; }
.instalacion-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease; }
.instalacion-slide.active { opacity: 1; position: relative; }
.instalaciones-carousel { position: relative; }
.instalaciones-carousel .instalacion-slide:not(.active) { pointer-events: none; }
.hero-title { animation: heroFadeUp 1s ease 0.3s both; }
.hero-subtitle { animation: heroFadeUp 1s ease 0.5s both; }
.hero-cta { animation: heroFadeUp 1s ease 0.7s both; }
.hero-scroll { animation: heroFadeUp 1s ease 0.9s both; }

@keyframes sunPulse { 0%, 100% { box-shadow: 0 0 20px rgba(35, 98, 162, 0.4); } 50% { box-shadow: 0 0 50px rgba(35, 98, 162, 0.7), 0 0 80px rgba(35, 98, 162, 0.3); } }
.sun-glow { animation: sunPulse 3s ease-in-out infinite; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.float-animation { animation: float 4s ease-in-out infinite; }

@keyframes countPulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
.stat-number.counted { animation: countPulse 0.4s ease; }

@keyframes scrollMouse { 0%, 100% { top: 6px; opacity: 1; } 50% { top: 18px; opacity: 0.3; } }

/* =============================================
   NAVEGACION
   ============================================= */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; transition: all var(--transition-base); background: transparent; backdrop-filter: none; }
.navbar.scrolled { background: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-sm); }
.navbar.scrolled .nav-link { color: var(--color-navy); }
.navbar.scrolled .logo-text { color: var(--color-navy); }

.nav-link { position: relative; color: var(--color-white); font-weight: 500; font-size: 0.95rem; padding: 0.5rem 0; transition: color var(--transition-fast); }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--color-sun); transition: width var(--transition-base); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--color-sun); }

.mobile-menu { position: fixed; top: 0; right: -100%; width: 80%; max-width: 400px; height: 100vh; background: var(--color-brand); z-index: 1001; transition: right var(--transition-base); padding: 2rem; overflow-y: auto; }
.mobile-menu.open { right: 0; }
.mobile-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); z-index: 1000; opacity: 0; visibility: hidden; transition: all var(--transition-base); }
.mobile-overlay.open { opacity: 1; visibility: visible; }

.lang-btn { padding: 0.35rem 0.75rem; border-radius: 0.375rem; font-size: 0.8rem; font-weight: 600; transition: all var(--transition-fast); border: 1px solid; }
.lang-btn.active { background: var(--color-sun); border-color: var(--color-sun); color: white; }
.lang-btn:not(.active) { background: transparent; border-color: rgba(255,255,255,0.4); color: rgba(255,255,255,0.8); }
.navbar.scrolled .lang-btn:not(.active) { border-color: rgba(0,0,0,0.2); color: var(--color-navy); }
.navbar.scrolled .hamburger { color: var(--color-navy); }

/* =============================================
   BOTONES
   ============================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 2rem; font-weight: 600; font-size: 0.95rem; border-radius: 0.5rem; transition: all var(--transition-base); cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--color-sun); color: var(--color-white); border-color: var(--color-sun); }
.btn-primary:hover { background: var(--color-sun-dark); border-color: var(--color-sun-dark); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.btn-outline { background: transparent; color: var(--color-white); border-color: var(--color-white); }
.btn-outline:hover { background: var(--color-white); color: var(--color-navy); transform: translateY(-3px); }
.btn-eco { background: var(--color-eco); color: var(--color-white); border-color: var(--color-eco); }
.btn-eco:hover { background: var(--color-eco-dark); border-color: var(--color-eco-dark); transform: translateY(-3px); box-shadow: 0 0 40px rgba(67, 131, 48, 0.3); }
.btn-sm { padding: 0.625rem 1.5rem; font-size: 0.85rem; }

/* =============================================
   TARJETAS DE SERVICIO
   ============================================= */
.service-card { position: relative; background: var(--color-white); border-radius: 1rem; overflow: hidden; transition: all var(--transition-base); box-shadow: var(--shadow-sm); }
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.service-card .card-image { overflow: hidden; height: 220px; }
.service-card .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.service-card:hover .card-image img { transform: scale(1.1); }
.service-card .card-content { padding: 1.5rem; }
.card-icon { width: 56px; height: 56px; border-radius: 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1rem; transition: all var(--transition-base); }
.service-card:hover .card-icon { transform: scale(1.1) rotate(-5deg); }

.feature-card { padding: 2rem; border-radius: 1rem; transition: all var(--transition-base); }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.feature-icon { width: 64px; height: 64px; border-radius: 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; margin-bottom: 1.25rem; }

/* =============================================
   HERO SECTION
   ============================================= */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-carousel { position: absolute; inset: 0; z-index: 0; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.5s ease; }
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26, 46, 74, 0.88) 0%, rgba(26, 46, 74, 0.65) 50%, rgba(26, 46, 74, 0.45) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; text-align: center; padding: 2rem; max-width: 900px; }
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; color: var(--color-white); line-height: 1.1; margin-bottom: 1.5rem; }
.hero-title span { color: var(--color-sun); }
.hero-subtitle { font-size: clamp(1rem, 2.5vw, 1.35rem); color: rgba(255, 255, 255, 0.9); max-width: 700px; margin: 0 auto 2.5rem; }

.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2; text-align: center; }
.scroll-indicator span { display: block; width: 24px; height: 40px; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 12px; margin: 0 auto 0.5rem; position: relative; }
.scroll-indicator span::after { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; background: var(--color-sun); border-radius: 2px; animation: scrollMouse 2s ease-in-out infinite; }

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-label { display: inline-block; padding: 0.5rem 1.25rem; background: rgba(35, 98, 162, 0.12); color: var(--color-sun-dark); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; border-radius: 2rem; margin-bottom: 1rem; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; color: var(--color-navy); line-height: 1.2; margin-bottom: 1rem; }
.section-title span { color: var(--color-sun); }
.section-subtitle { font-size: 1.1rem; color: var(--color-gray-600); max-width: 600px; }

/* =============================================
   STATS COUNTER
   ============================================= */
.stat-card { text-align: center; padding: 2rem 1rem; }
.stat-number { font-size: 3rem; font-weight: 800; color: var(--color-white); line-height: 1; margin-bottom: 0.5rem; }
.stat-label { font-size: 0.9rem; font-weight: 500; }

/* =============================================
   TESTIMONIALS CAROUSEL
   ============================================= */
.testimonials-carousel { position: relative; overflow: hidden; }
.testimonials-track { display: flex; transition: transform 0.5s ease; }
.testimonial-slide { min-width: 100%; padding: 0 1rem; }
.testimonial-card { background: var(--color-white); border-radius: 1rem; padding: 2rem; box-shadow: var(--shadow-sm); transition: all var(--transition-base); height: 100%; }
.testimonial-card:hover { box-shadow: var(--shadow-md); transform: translateY(-5px); }
.testimonial-stars { color: var(--color-sun); margin-bottom: 1rem; }
.testimonial-text { font-style: italic; color: var(--color-gray-800); margin-bottom: 1.5rem; line-height: 1.7; }
.testimonial-author { display: flex; align-items: center; gap: 1rem; }
.testimonial-avatar { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--color-sun), var(--color-eco)); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1.1rem; }

.carousel-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-gray-300); cursor: pointer; transition: all var(--transition-fast); border: none; }
.carousel-dot.active { background: var(--color-sun); width: 28px; border-radius: 5px; }

/* =============================================
   PROCESS STEPS
   ============================================= */
.step-card { position: relative; text-align: center; padding: 2rem 1rem; }
.step-number { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--color-sun), var(--color-sun-dark)); color: white; font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; position: relative; z-index: 2; }
.step-connector { position: absolute; top: 60px; left: 50%; width: 100%; height: 2px; background: linear-gradient(90deg, var(--color-sun), var(--color-eco)); z-index: 1; }
.step-card:last-child .step-connector { display: none; }

/* =============================================
   COOKIE POPUP
   ============================================= */
.cookie-popup { position: fixed; bottom: -100%; left: 0; right: 0; background: var(--color-navy); color: var(--color-white); padding: 1.5rem 2rem; z-index: 9999; transition: bottom var(--transition-slow); box-shadow: 0 -10px 40px rgba(0,0,0,0.3); }
.cookie-popup.show { bottom: 0; }
.cookie-popup p { font-size: 0.9rem; line-height: 1.6; }
.cookie-popup a { color: var(--color-sun); text-decoration: underline; }
.cookie-btn { padding: 0.625rem 1.5rem; border-radius: 0.5rem; font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: all var(--transition-fast); border: none; }
.cookie-btn-accept { background: var(--color-sun); color: white; }
.cookie-btn-accept:hover { background: var(--color-sun-dark); }
.cookie-btn-reject { background: transparent; color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.3); }
.cookie-btn-reject:hover { background: rgba(255,255,255,0.1); }

/* =============================================
   FAQ ACCORDION
   ============================================= */
.faq-item { border-bottom: 1px solid var(--color-gray-200); overflow: hidden; }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 0; font-weight: 600; font-size: 1.05rem; color: var(--color-navy); cursor: pointer; background: none; border: none; text-align: left; transition: color var(--transition-fast); }
.faq-question:hover { color: var(--color-sun); }
.faq-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--color-gray-100); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: all var(--transition-base); flex-shrink: 0; margin-left: 1rem; }
.faq-item.active .faq-icon { background: var(--color-sun); color: white; transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--transition-slow), padding var(--transition-slow); }
.faq-item.active .faq-answer { max-height: 300px; padding-bottom: 1.25rem; }
.faq-answer p { color: var(--color-gray-600); line-height: 1.7; }

/* =============================================
   CERTIFICATES & LEGALIZATIONS
   ============================================= */
.cert-card { background: var(--color-white); border-radius: 1rem; padding: 2rem; box-shadow: var(--shadow-sm); border: 1px solid var(--color-gray-200); transition: all var(--transition-base); text-align: center; }
.cert-card:hover { border-color: var(--color-eco); transform: translateY(-8px); box-shadow: var(--shadow-md); }
.cert-icon { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 1.25rem; }

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact-info-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem; border-radius: 0.75rem; transition: all var(--transition-fast); }
.contact-info-item:hover { background: var(--color-gray-50); }
.contact-icon { width: 48px; height: 48px; border-radius: 0.75rem; background: rgba(35, 98, 162, 0.1); color: var(--color-sun); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }

.form-input { width: 100%; padding: 0.875rem 1rem; border: 1px solid var(--color-gray-300); border-radius: 0.5rem; font-family: inherit; font-size: 0.95rem; transition: all var(--transition-fast); background: var(--color-white); }
.form-input:focus { outline: none; border-color: var(--color-sun); box-shadow: 0 0 0 3px rgba(35, 98, 162, 0.15); }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--color-navy); margin-bottom: 0.5rem; }

/* =============================================
   CALCULADORA TEJADO
   ============================================= */
.roof-canvas-container { background: var(--color-gray-50); border-radius: 1rem; border: 2px solid var(--color-gray-200); overflow: hidden; position: relative; min-height: 280px; }
.roof-canvas-container canvas { display: block; max-width: 100%; width: 100%; }
.calculator-input { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--color-gray-300); border-radius: 0.5rem; font-family: inherit; font-size: 0.95rem; transition: all var(--transition-fast); }
.calculator-input:focus { outline: none; border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(35, 98, 162, 0.15); }
.calc-result { background: linear-gradient(135deg, rgba(35, 98, 162, 0.1), rgba(67, 131, 48, 0.1)); border: 1px solid rgba(35, 98, 162, 0.3); border-radius: 0.75rem; padding: 1rem; }

/* =============================================
   WHATSAPP BUTTON
   ============================================= */
.whatsapp-btn { position: fixed; bottom: 1.5rem; left: 1.5rem; width: 60px; height: 60px; border-radius: 50%; background: #25D366; color: white; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; z-index: 900; box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); transition: all var(--transition-base); border: none; cursor: pointer; }
.whatsapp-btn:hover { transform: scale(1.1) rotate(-5deg); box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6); }
@keyframes whatsappPulse { 0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); } 50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7), 0 0 0 8px rgba(37, 211, 102, 0.1); } }
.whatsapp-btn { animation: whatsappPulse 2s ease-in-out infinite; }

.whatsapp-badge { position: absolute; top: -4px; right: -4px; width: 22px; height: 22px; border-radius: 50%; background: #e53e3e; color: white; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; transform: scale(0); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.whatsapp-btn.has-badge .whatsapp-badge { transform: scale(1); }
.whatsapp-btn.has-badge { animation: whatsappBadgePulse 0.6s ease-in-out 2; }
@keyframes whatsappBadgePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* =============================================
   FOOTER
   ============================================= */
.footer { background: var(--color-brand); color: rgba(255, 255, 255, 0.85); }
.footer-link { display: block; padding: 0.35rem 0; color: rgba(255, 255, 255, 0.75); transition: color var(--transition-fast); }
.footer-link:hover { color: var(--color-sun); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 2rem; margin-top: 2rem; }
.social-link { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.85); transition: all var(--transition-fast); }
.social-link:hover { background: var(--color-sun); color: white; transform: translateY(-3px); }

/* =============================================
   UTILITIES
   ============================================= */
:focus-visible { outline: 2px solid var(--color-sun); outline-offset: 2px; }
.gradient-sun { background: linear-gradient(135deg, var(--color-sun), var(--color-sun-dark)); }
.gradient-eco { background: linear-gradient(135deg, var(--color-eco), var(--color-eco-dark)); }
.gradient-brand { background: linear-gradient(135deg, var(--color-brand), var(--color-brand-dark)); }
.gradient-text { background: linear-gradient(135deg, var(--color-sun), var(--color-eco)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-sun { color: var(--color-sun); }
.text-eco { color: var(--color-eco); }
.text-brand { color: var(--color-brand); }
.bg-brand { background: var(--color-brand); }
.bg-navy { background: var(--color-navy); }
.bg-gray-50 { background: var(--color-gray-50); }
.bg-gray-100 { background: var(--color-gray-100); }

.hamburger { width: 28px; height: 20px; position: relative; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; background: none; border: none; padding: 0; }
.hamburger span { display: block; width: 100%; height: 2px; background: currentColor; transition: all var(--transition-fast); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.875rem; border-radius: 2rem; font-size: 0.8rem; font-weight: 600; }
.badge-sun { background: rgba(35, 98, 162, 0.12); color: var(--color-sun-dark); }
.badge-eco { background: rgba(67, 131, 48, 0.12); color: var(--color-eco-dark); }

.back-to-top { position: fixed; bottom: 1.5rem; right: 1.5rem; width: 50px; height: 50px; border-radius: 50%; background: var(--color-sun); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: all var(--transition-base); z-index: 900; box-shadow: var(--shadow-md); border: none; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--color-sun-dark); transform: translateY(-5px); box-shadow: var(--shadow-glow); }

.img-zoom { overflow: hidden; }
.img-zoom img { transition: transform var(--transition-slow); }
.img-zoom:hover img { transform: scale(1.08); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal, .reveal-left, .reveal-right { opacity: 1; transform: none; }
  .hero-carousel, .hero-bg { animation: none; }
  .counter { opacity: 1; }
  .float-animation { animation: none; }
}

/* Tablet */
@media (max-width: 1024px) {
  .section-subtitle { font-size: 1rem; max-width: 500px; }
  .hero-content { padding: 1.5rem; }
  .btn { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
  .cookie-popup { padding: 1rem 1.5rem; }
}

/* Evitar overflow en grids de 2 columnas (min-width: auto causa desborde) */
.grid-cols-2 > * { min-width: 0; overflow-wrap: break-word; }

/* Movil horizontal / tablets pequenas */
@media (max-width: 768px) {
  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-content { padding: 1rem; }
  .stat-number { font-size: 2.2rem; }
  .step-connector { display: none; }
  .whatsapp-btn { width: 52px; height: 52px; font-size: 1.5rem; }
  .back-to-top { width: 44px; height: 44px; }
  .service-card .card-image { height: 180px; }
  .section-title { font-size: 1.8rem; }
  .section-subtitle { font-size: 0.95rem; }
  .cookie-popup { padding: 1rem; }
  .cookie-popup p { font-size: 0.82rem; }
  .navbar { padding: 0 0.5rem; }
  .nav-link { font-size: 0.85rem; }
  .footer .grid { gap: 2rem; }
  .testimonial-card { padding: 1.5rem; }
  .testimonial-text { font-size: 0.9rem; }
  .contact-info-item { padding: 1rem; }
  .form-label { font-size: 0.8rem; }
  .form-input { padding: 0.75rem; font-size: 0.9rem; }
  .cert-card { padding: 1.5rem; }
  .feature-card { padding: 1.5rem; }
  .step-card { padding: 1.5rem 0.75rem; }
}

/* Desactivar translateX en reveal-right en movil para evitar artefactos visuales */
@media (max-width: 640px) {
  .reveal-right { transform: translateX(0); }
}

/* Movil */
@media (max-width: 480px) {
  .hero { min-height: 90vh; }
  .hero-title { font-size: 1.8rem; }
  .hero-subtitle { font-size: 0.9rem; }
  .hero-cta { flex-direction: column; gap: 0.75rem; }
  .hero-cta .btn { width: 100%; }
  .hero-content { padding: 0.75rem; }
  .hero .mb-6 { margin-bottom: 1rem; }
  .section-title { font-size: 1.55rem; }
  .section-subtitle { font-size: 0.9rem; }
  .section-label { font-size: 0.7rem; padding: 0.35rem 0.875rem; }
  .service-card .card-image { height: 160px; }
  .service-card .card-content { padding: 1rem; }
  .card-icon { width: 44px; height: 44px; font-size: 1.25rem; }
  .stat-number { font-size: 1.8rem; }
  .stat-card { padding: 1.5rem 0.5rem; }
  .stat-label { font-size: 0.78rem; }
  .btn-mobile-full { width: 100%; }
  .btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
  .cookie-popup .flex { flex-direction: column; text-align: center; }
  .cookie-buttons { justify-content: center; }
  .whatsapp-btn { width: 44px; height: 44px; font-size: 1.35rem; bottom: 1rem; left: 1rem; }
  .back-to-top { width: 38px; height: 38px; bottom: 1rem; right: 1rem; }
  .testimonial-card { padding: 1.25rem; }
  .testimonial-text { font-size: 0.85rem; }
  .contact-info-item { flex-direction: column; gap: 0.5rem; }
  .form-input { padding: 0.7rem 0.85rem; font-size: 0.85rem; }
  .cert-card { padding: 1.25rem; }
  .cert-icon { width: 56px; height: 56px; font-size: 1.5rem; }
  .feature-card { padding: 1.25rem; }
  .feature-icon { width: 48px; height: 48px; font-size: 1.4rem; }
  .step-number { width: 48px; height: 48px; font-size: 1.25rem; }
  .step-card { padding: 1.25rem 0.5rem; }
  .footer .grid { gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 1rem; }
  .footer { padding: 3rem 0; }
  .faq-question { font-size: 0.95rem; padding: 1rem 0; }
  .stats-overlay { left: 0.75rem !important; right: 0.75rem !important; bottom: 0.5rem !important; padding: 0.75rem !important; }
  .stats-overlay-item { min-width: 30%; text-align: center; }
  /* Ajustes overlays/badges para que no se salgan */
  .float-animation[class*="-bottom-6"] { bottom: 0.25rem !important; right: 0.25rem !important; }
  .float-animation[class*="-bottom-6"] .w-12 { width: 2.5rem; height: 2.5rem; }
  .float-animation[class*="-bottom-6"] .text-lg { font-size: 0.9rem; }
  .float-animation[class*="-bottom-6"] p { font-size: 0.65rem; }
}

/* Ajuste cookie popup + botones flotantes */
.cookie-popup.show ~ .whatsapp-btn { bottom: 6rem; transition: bottom var(--transition-base); }
.cookie-popup.show ~ .back-to-top { bottom: 6rem; transition: bottom var(--transition-base); }

@media (max-width: 640px) {
  .cookie-popup.show ~ .whatsapp-btn { bottom: 7rem; }
  .cookie-popup.show ~ .back-to-top { bottom: 7rem; }
}

/* Movil muy pequeno */
@media (max-width: 360px) {
  .hero-title { font-size: 1.5rem; }
  .hero-subtitle { font-size: 0.82rem; }
  .hero .px-4 { padding-left: 0.75rem; padding-right: 0.75rem; }
  .hero .text-sm { font-size: 0.7rem; }
  .section-title { font-size: 1.35rem; }
  .section-subtitle { font-size: 0.82rem; }
  .stat-number { font-size: 1.5rem; }
  .stat-label { font-size: 0.7rem; }
  .stat-card { padding: 1rem 0.25rem; }
  .service-card .card-image { height: 140px; }
  .card-icon { width: 38px; height: 38px; font-size: 1.1rem; }
  .btn { padding: 0.6rem 1rem; font-size: 0.8rem; }
  .cookie-popup { padding: 0.75rem 1rem; }
  .cookie-popup p { font-size: 0.75rem; }
  .whatsapp-btn { width: 40px; height: 40px; font-size: 1.2rem; bottom: 0.75rem; left: 0.75rem; }
  .back-to-top { width: 34px; height: 34px; bottom: 0.75rem; right: 0.75rem; }
  .cookie-btn { padding: 0.5rem 1rem; font-size: 0.75rem; }
}
