/* ========================================
   MicroClean - COMPLETE CSS - PRODUCTION READY
   ======================================== */

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --blue-1: #0077B6;
    --blue-2: #0965C6;
    --blue-accent: #00B4D8;
    --whatsapp: #25D366;
    --whatsapp-hover: #1DA851;
    
    --white: #FFFFFF;
    --gray-50: #F8F9FB;
    --gray-100: #F1F3F5;
    --gray-200: #E5E8EC;
    --gray-300: #D1D6DD;
    --gray-400: #98A2B3;
    --gray-500: #6B7280;
    --gray-600: #475467;
    --gray-700: #344054;
    --gray-800: #1D2939;
    --gray-900: #101828;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--white);
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-xl);
    }
}

/* ==================== TYPOGRAPHY ==================== */
h1 {
    font-size: clamp(1.875rem, 5vw, 3rem);
    line-height: 1.2;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-lg);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    line-height: 1.2;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    line-height: 1.3;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

h4 {
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

p {
    color: var(--gray-600);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

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

/* ==================== IMAGES ==================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
    background: var(--gray-100);
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==================== HEADER ==================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    border-bottom-color: var(--gray-200);
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    min-height: 72px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: transform 0.2s;
    z-index: 1001;
}

.logo-link:hover {
    transform: translateY(-2px);
}

.logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--blue-2);
}

/* ==================== NAVIGATION ==================== */
.nav-menu {
    display: none;
    align-items: center;
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--gray-800);
    padding: var(--space-xs) 0;
    transition: color 0.2s;
    white-space: nowrap;
}

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

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

.btn-whatsapp-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--whatsapp);
    color: var(--white);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-whatsapp-header:hover {
    background: var(--whatsapp-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==================== MENU TOGGLE ==================== */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    padding: 0;
    z-index: 1001;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-800);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== MOBILE NAV ==================== */
.mobile-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav a {
    display: block;
    padding: 1.25rem 1.5rem;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-200);
    transition: background 0.2s;
    font-size: 1.125rem;
    font-weight: 500;
}

.mobile-nav a:hover,
.mobile-nav a:active {
    background: var(--gray-50);
}

.mobile-nav-whatsapp {
    background: var(--whatsapp) !important;
    color: white !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600 !important;
    margin: 1rem;
    border-radius: var(--radius-md);
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding: calc(80px + var(--space-3xl)) 0 var(--space-3xl);
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue-1) 0%, var(--blue-2) 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: var(--white) !important;
}

.hero p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--whatsapp);
    color: var(--white);
    font-size: 1.0625rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--whatsapp-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-whatsapp-hero {
    background: var(--whatsapp);
}

/* ==================== SECTIONS ==================== */
.about,
.services,
.gallery,
.contact {
    padding: var(--space-3xl) 0;
}

.about {
    background: var(--white);
}

.services {
    background: var(--gray-50);
}

.gallery {
    background: var(--white);
}

.contact {
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* ==================== ABOUT ==================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.125rem;
    line-height: 1.8;
}

/* ==================== SERVICES ==================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: var(--space-xl);
}

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

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

.service-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    will-change: transform;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-md);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: var(--shadow-xl);
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.15), 0 8px 16px -4px rgba(9, 101, 198, 0.1);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:active {
    transform: translateY(-4px) scale(1.01);
}

.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    position: relative;
}

.service-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(9, 101, 198, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-card:hover .service-image::after {
    opacity: 1;
}

.service-content {
    padding: var(--space-lg);
    transition: background 0.3s ease;
}

.service-card:hover .service-content {
    background: linear-gradient(to bottom, rgba(9, 101, 198, 0.02), transparent);
}

.service-content h3 {
    color: var(--blue-2);
    margin-bottom: var(--space-sm);
    transition: color 0.3s ease;
}

.service-card:hover .service-content h3 {
    color: var(--blue-1);
}

.service-content > p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.service-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.3s ease;
}

.service-card.expanded .service-details {
    max-height: 600px;
    opacity: 1;
    padding: var(--space-md) 0;
}

.service-details p {
    margin-bottom: var(--space-md);
    font-size: 0.9375rem;
}

.service-details ul {
    list-style: none;
    padding: 0;
}

.service-details li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.service-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--blue-accent);
    font-weight: bold;
    font-size: 1.125rem;
}

.service-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-200);
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blue-1);
}

.service-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--blue-2);
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--blue-2);
    border-radius: var(--radius-sm);
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--blue-2);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: var(--radius-sm);
}

.service-link:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 101, 198, 0.3);
}

.service-link:hover::before {
    left: 0;
}

/* ==================== GALLERY (BEFORE/AFTER) - BIGGER & CLEARER ==================== */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3xl);
    }
}

.before-after-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.before-after-container:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.before-after-container h3 {
    padding: var(--space-lg) var(--space-xl);
    background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
    color: var(--white);
    text-align: center;
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    user-select: none;
    touch-action: pan-y;
    cursor: ew-resize;
}

.image-pair {
    position: relative;
    width: 100%;
    min-height: 300px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Portrait mobile - taller aspect ratio */
@media (max-width: 767px) and (orientation: portrait) {
    .image-pair {
        aspect-ratio: 4 / 3;
        min-height: 250px;
    }
}

/* Landscape mobile - wider aspect ratio */
@media (max-width: 767px) and (orientation: landscape) {
    .image-pair {
        aspect-ratio: 21 / 9;
        min-height: 200px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .image-pair {
        aspect-ratio: 16 / 9;
        min-height: 350px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .image-pair {
        aspect-ratio: 21 / 9;
        min-height: 400px;
    }
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.before-image img,
.after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    pointer-events: none;
    user-select: none;
    opacity: 1 !important;
    transition: none;
}

/* AFTER image starts completely hidden */
.after-image {
    clip-path: inset(0 100% 0 0);
    z-index: 2;
    transition: clip-path 0.05s ease-out;
    will-change: clip-path;
}

.label {
    position: absolute;
    top: var(--space-lg);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(9, 101, 198, 0.95);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.before-image .label {
    left: var(--space-lg);
    transition: opacity 0.2s ease;
}

.after-image .label {
    right: var(--space-lg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0%;
    width: 60px;
    margin-left: -30px;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    touch-action: none;
}

.handle-line {
    position: absolute;
    width: 4px;
    height: 100%;
    background: var(--white);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
}

.handle-button {
    width: 56px;
    height: 56px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1;
    transition: transform 0.2s ease;
}

.slider-handle:hover .handle-button,
.slider-handle:active .handle-button {
    transform: scale(1.15);
}

.handle-button svg {
    color: var(--blue-2);
    width: 32px;
    height: 32px;
}

/* ==================== CONTACT ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    margin-top: var(--space-2xl);
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.info-item {
    padding: var(--space-lg);
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.info-item:hover {
    box-shadow: var(--shadow-md);
}

.info-item h3 {
    color: var(--blue-2);
    margin-bottom: var(--space-md);
}

.info-item p {
    margin-bottom: var(--space-sm);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-xl);
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: var(--space-md);
    background: var(--gray-50);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    width: 100%;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--blue-2);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(9, 101, 198, 0.1);
}

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

.btn-submit {
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==================== FOOTER ==================== */
footer {
    background: var(--blue-2);
    color: var(--white);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-logo {
    height: 80px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    background: white;
    padding: 10px;
    border-radius: var(--radius-sm);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.85);
}

.footer-services,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-services h4,
.footer-contact h4 {
    color: var(--white);
    margin-bottom: var(--space-md);
}

.footer-services a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.footer-services a:hover,
.footer-contact a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.footer-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
}

/* ==================== WHATSAPP FAB ==================== */
.whatsapp-fab {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 60px;
    height: 60px;
    background: var(--whatsapp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
}

.whatsapp-fab:hover {
    background: var(--whatsapp-hover);
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}

/* ==================== COTIZADOR PAGE ==================== */
.cotizador-container {
    min-height: calc(100vh - 72px);
    padding-top: 72px;
    background: var(--gray-50);
}

.cotizador-header {
    background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
    padding: var(--space-3xl) 0;
    text-align: center;
    color: var(--white);
}

.cotizador-header h1 {
    color: var(--white);
    margin-bottom: var(--space-md);
}

.cotizador-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
}

.cotizador-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
    align-items: start;
}

/* Mobile: Show Cotización (carrito) first */
@media (max-width: 1023px) {
    .cotizador-grid {
        display: flex;
        flex-direction: column;
    }

    .servicios-panel {
        order: 2; /* Services panel appears second on mobile */
    }

    .carrito-wrapper {
        order: 1; /* Tu Cotización appears first on mobile */
        margin-bottom: var(--space-md); /* Add some spacing */
    }
}

@media (min-width: 1024px) {
    .cotizador-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

/* ==================== SERVICIOS PANEL ==================== */
.servicios-panel {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.servicios-panel > h2 {
    color: var(--blue-2);
    margin-bottom: var(--space-xl);
    font-size: 1.75rem;
}

/* ==================== ACORDEONES - ULTRA DYNAMIC ==================== */
.categoria-servicios {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: visible; /* Changed from hidden to visible */
    transition: all 0.3s ease;
}

.categoria-servicios:hover {
    border-color: var(--blue-accent);
}

.categoria-servicios.open {
    border-color: var(--blue-2);
    box-shadow: var(--shadow-md);
}

.categoria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    cursor: pointer;
    user-select: none;
    background: var(--gray-50);
    transition: background 0.2s ease;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
}

.categoria-header:hover {
    background: var(--gray-100);
}

.categoria-servicios.open .categoria-header {
    background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.categoria-titulo {
    flex: 1;
}

.categoria-servicios.open .categoria-titulo h3,
.categoria-servicios.open .categoria-titulo p {
    color: var(--white);
}

.categoria-titulo h3 {
    color: var(--blue-2);
    margin-bottom: var(--space-xs);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.categoria-titulo p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

.badge-nuevo {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--whatsapp);
    color: var(--white);
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accordion-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    stroke: var(--gray-600);
}

.categoria-servicios.open .accordion-icon {
    transform: rotate(180deg);
    stroke: var(--white);
}

.categoria-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.categoria-servicios.open .categoria-content {
    border-top: 1px solid var(--gray-200);
    overflow: visible; /* Allow dynamic expansion */
}

/* ==================== SERVICIO ITEMS - ULTRA DYNAMIC ==================== */
.servicio-item {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    background: var(--white);
    position: relative;
}

.servicio-item:last-child {
    border-bottom: none;
}

.servicio-item:hover {
    background: var(--gray-50);
}

.servicio-item.seleccionado {
    background: linear-gradient(to right, rgba(0, 180, 216, 0.05), rgba(9, 101, 198, 0.05));
    border-left: 4px solid var(--blue-2);
    padding-left: calc(var(--space-lg) - 4px);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.servicio-item.seleccionado .servicio-controles {
    max-height: 500px; /* Increased for better dynamic expansion */
    opacity: 1;
    margin-top: var(--space-lg);
}

.servicio-header-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: var(--space-sm) 0;
    gap: var(--space-md);
}

.servicio-nombre {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 1rem;
}

.servicio-precio {
    font-weight: 700;
    color: var(--blue-2);
    font-size: 1rem;
    white-space: nowrap;
}

.servicio-descripcion {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: var(--space-xs);
    line-height: 1.5;
}

/* ==================== CONTROLES - ULTRA DYNAMIC ==================== */
.servicio-controles {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-control {
    margin-bottom: var(--space-lg);
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
}

.slider-label span:first-child {
    color: var(--gray-700);
    font-weight: 500;
}

.slider-value {
    font-weight: 700;
    color: var(--blue-2);
    font-size: 1rem;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-200);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--blue-2);
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--blue-2);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--blue-1);
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb:hover {
    background: var(--blue-1);
    transform: scale(1.2);
}

.btn-agregar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: var(--space-md);
    overflow: hidden;
    position: relative;
}

.btn-agregar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(7, 119, 182, 0.4), 0 4px 8px -2px rgba(9, 101, 198, 0.3);
}

.btn-agregar:active {
    transform: translateY(0);
}

.feedback-agregado {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--whatsapp);
    color: var(--white);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    animation: fadeInOut 1.5s ease;
    z-index: 100;
    pointer-events: none;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ==================== CARRITO PANEL ==================== */
.carrito-wrapper {
    position: relative;
}

/* Mobile: Make Tu Cotización more prominent at the top */
@media (max-width: 1023px) {
    .carrito-wrapper {
        animation: slideDown 0.3s ease-out;
        /* Normal positioning - appears at top but scrolls with content */
        position: relative;
        background: var(--white);
        border-radius: var(--radius-md);
    }

    .carrito-panel {
        background: linear-gradient(135deg, var(--white) 0%, rgba(9, 101, 198, 0.03) 100%);
        border: 2px solid var(--blue-2);
        box-shadow: 0 4px 20px rgba(9, 101, 198, 0.15);
        transition: all 0.3s ease;
    }
}

@media (min-width: 1024px) {
    .carrito-wrapper {
        position: sticky;
        top: 92px;
    }
}

.carrito-panel {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--blue-2);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carrito-panel h2 {
    color: var(--blue-2);
    margin-bottom: var(--space-lg);
    font-size: 1.5rem;
}

/* Mobile: Add emphasis to Tu Cotización heading */
@media (max-width: 1023px) {
    .carrito-panel h2 {
        font-size: 1.75rem;
        display: flex;
        align-items: center;
        gap: var(--space-sm);
    }

    .carrito-panel h2::before {
        content: "📋";
        font-size: 1.5rem;
        animation: bounce 2s infinite;
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.carrito-vacio {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: var(--gray-500);
}

.carrito-vacio svg {
    margin: 0 auto var(--space-lg);
    color: var(--gray-300);
}

.carrito-vacio p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.carrito-item {
    padding: var(--space-lg);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    border-left: 4px solid var(--blue-accent);
}

.carrito-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
    gap: var(--space-md);
}

.carrito-item-header strong {
    color: var(--gray-900);
    font-size: 1rem;
    flex: 1;
}

.btn-eliminar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-eliminar:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.carrito-item-detalles {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: var(--space-sm);
}

.carrito-item-subtotal {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--blue-2);
}

.carrito-totales {
    border-top: 2px solid var(--gray-200);
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
}

.total-linea {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    font-size: 1rem;
}

.total-linea span:first-child {
    color: var(--gray-700);
}

.total-linea span:last-child {
    font-weight: 700;
    color: var(--gray-900);
}

.total-linea.minimo {
    color: var(--whatsapp);
}

.total-linea.minimo span {
    color: var(--whatsapp);
    font-weight: 600;
}

.total-linea.destacado {
    font-size: 1.25rem;
    padding: var(--space-md) 0;
    border-top: 2px solid var(--gray-300);
    margin-top: var(--space-sm);
}

.total-linea.destacado span:last-child {
    color: var(--blue-2);
    font-size: 1.5rem;
}

.minimo-nota {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: var(--space-md);
    font-style: italic;
}

/* ==================== FORMULARIO CLIENTE ==================== */
.formulario-cliente {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    margin-top: var(--space-xl);
}

.formulario-cliente h2 {
    color: var(--blue-2);
    margin-bottom: var(--space-sm);
}

.form-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: var(--space-xl);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
    font-size: 0.9375rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue-2);
    box-shadow: 0 0 0 3px rgba(9, 101, 198, 0.1);
}

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

.btn-enviar-cotizacion {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--whatsapp);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: var(--space-md);
}

.btn-enviar-cotizacion:hover {
    background: var(--whatsapp-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.tooltip-wrapper {
    position: relative;
}

.btn-enviar-email {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--gray-300);
    color: var(--gray-600);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1.125rem;
    cursor: not-allowed;
    position: relative;
}

.badge-pronto {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f59e0b;
    color: var(--white);
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: var(--space-sm);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--gray-900);
}

.tooltip-wrapper:hover .tooltip {
    opacity: 1;
}

.mensaje-exito {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--whatsapp);
    color: var(--white);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.mensaje-exito.hide {
    animation: slideOutRight 0.3s ease;
}

/* ==================== ANIMATIONS ==================== */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

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

/* ==================== RESPONSIVE: MOBILE ==================== */
@media (max-width: 767px) {
    .header-content {
        padding: 0.75rem 0;
        min-height: 64px;
    }
    
    .logo {
        height: 45px;
    }
    
    .logo-text {
        font-size: 1.125rem;
    }
    
    .hero {
        min-height: 500px;
        padding: calc(64px + 2rem) 0 2rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .services,
    .gallery,
    .contact,
    .about {
        padding: 2.5rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .slider-handle {
        width: 50px;
        margin-left: -25px;
    }
    
    .handle-button {
        width: 48px;
        height: 48px;
    }
    
    .handle-button svg {
        width: 26px;
        height: 26px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .whatsapp-fab {
        width: 56px;
        height: 56px;
        bottom: 1.25rem;
        right: 1.25rem;
    }
    
    .service-link,
    .btn-submit,
    button {
        min-height: 44px;
    }

    /* Mobile-optimized service cards */
    .service-card {
        transition: all 0.2s ease;
    }

    .service-card:active {
        transform: translateY(-2px) scale(0.99);
    }

    .service-image img {
        transition: transform 0.4s ease;
    }
    
    /* Cotizador mobile */
    .cotizador-header {
        padding: 2rem 0;
    }
    
    .cotizador-header h1 {
        font-size: 1.75rem;
    }
    
    .servicios-panel,
    .carrito-panel,
    .formulario-cliente {
        padding: var(--space-lg);
    }
    
    .servicio-header-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    
    .servicio-precio {
        font-size: 0.9375rem;
    }
    
    .categoria-header {
        padding: var(--space-md);
    }
    
    .categoria-titulo h3 {
        font-size: 1.125rem;
    }
}

@media (max-width: 374px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9375rem;
    }
    
    .btn-primary {
        font-size: 0.9375rem;
        padding: 0.875rem 1.25rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 375px) and (max-width: 767px) {
    .container {
        padding: 0 1.25rem;
    }
}

/* ==================== ACCESSIBILITY ==================== */
:focus-visible {
    outline: 2px solid var(--blue-2);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

@media (hover: none) {
    .btn-primary:active,
    .service-link:active,
    .btn-submit:active,
    .whatsapp-fab:active {
        transform: scale(0.97);
    }
}

@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: calc(100vh - 72px);
    }
}

@media print {
    .whatsapp-fab,
    .menu-toggle,
    .mobile-nav,
    header {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .hero-bg {
        opacity: 0.3;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
/* ========================================
   MICROCLEAN - UI/UX GOD MODE ENHANCEMENTS
   Modern, Premium, Buttery-Smooth Interactions
   ======================================== */

/* ==================== SMOOTH SCROLL & PAGE TRANSITIONS ==================== */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Page Load Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

/* ==================== HEADER ENHANCEMENTS ==================== */
#header {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 0 rgba(9, 101, 198, 0.1), 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 0 rgba(9, 101, 198, 0.15), 0 12px 48px rgba(0, 0, 0, 0.1);
}

.logo-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-link:hover {
    transform: scale(1.05) translateY(-2px);
}

.logo {
    filter: drop-shadow(0 2px 4px rgba(9, 101, 198, 0.1));
    transition: filter 0.3s ease;
}

.logo-link:hover .logo {
    filter: drop-shadow(0 4px 8px rgba(9, 101, 198, 0.2));
}

.nav-link {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-1), var(--blue-2));
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-link:hover {
    color: var(--blue-1);
    transform: translateY(-2px);
}

/* ==================== HERO SECTION ENHANCEMENTS ==================== */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 180, 216, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(9, 101, 198, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, rgba(9, 101, 198, 0.03) 0%, rgba(0, 180, 216, 0.03) 100%);
    animation: float 20s ease-in-out infinite;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(9, 101, 198, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 18s ease-in-out infinite reverse;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-content h1 {
    color: var(--white) !important;
    animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.hero-content h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    animation: slideInLeft 0.3s 0.1s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.hero-content p {
    animation: fadeInUp 0.4s 0.1s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.hero-buttons {
    animation: fadeInUp 0.4s 0.2s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

/* ==================== BUTTON ENHANCEMENTS ==================== */
.btn-primary,
.btn-whatsapp-hero {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(9, 101, 198, 0.2);
}

.btn-primary::before {
    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.3s ease, height 0.3s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover,
.btn-whatsapp-hero:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(9, 101, 198, 0.35);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

/* Ripple Effect on Click */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-primary,
.btn-submit,
.service-link {
    position: relative;
    overflow: hidden;
}

/* ==================== SERVICE CARDS PREMIUM ENHANCEMENTS ==================== */
.service-card {
    animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    background: var(--white);
    position: relative;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-1), var(--blue-accent), var(--blue-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-card:nth-child(1) { animation-delay: 0s; }
.service-card:nth-child(2) { animation-delay: 0.05s; }
.service-card:nth-child(3) { animation-delay: 0.1s; }
.service-card:nth-child(4) { animation-delay: 0.15s; }
.service-card:nth-child(5) { animation-delay: 0.2s; }

/* Glassmorphism Effect on Hover */
.service-card:hover {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Image Zoom with Smooth Overlay */
.service-image {
    position: relative;
}

.service-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(9, 101, 198, 0.85) 0%, rgba(0, 180, 216, 0.85) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.service-card:hover .service-image::before {
    opacity: 0.9;
}

/* Removed Ver más overlay - entire card is now clickable */

/* Service Details Expand */
.service-details {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card.expanded .service-details {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-details li {
    animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.service-details li:nth-child(1) { animation-delay: 0.1s; }
.service-details li:nth-child(2) { animation-delay: 0.2s; }
.service-details li:nth-child(3) { animation-delay: 0.3s; }
.service-details li:nth-child(4) { animation-delay: 0.4s; }

/* Price Highlight */
.price {
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.price::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-1), var(--blue-accent));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .price::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* ==================== GALLERY/SLIDER ENHANCEMENTS ==================== */
.before-after-container {
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    position: relative;
}

.before-after-container:nth-child(1) { animation-delay: 0.1s; }
.before-after-container:nth-child(2) { animation-delay: 0.2s; }
.before-after-container:nth-child(3) { animation-delay: 0.3s; }
.before-after-container:nth-child(4) { animation-delay: 0.4s; }
.before-after-container:nth-child(5) { animation-delay: 0.5s; }

.before-after-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, var(--blue-1), var(--blue-accent), var(--blue-2));
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.before-after-container:hover::before {
    opacity: 0.2;
}

.slider-handle {
    transition: all 0.2s ease;
}

.handle-button {
    background: var(--white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.handle-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(9, 101, 198, 0.4);
}

.handle-button svg {
    transition: transform 0.3s ease;
}

.handle-button:hover svg {
    transform: scale(1.2);
}

/* Label Animations */
.label {
    animation: fadeIn 0.4s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ==================== WHATSAPP FAB ENHANCEMENTS ==================== */
.whatsapp-fab {
    animation: scaleIn 0.6s 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

.whatsapp-fab:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}

.whatsapp-fab:active {
    transform: scale(0.95);
}

/* ==================== CONTACT FORM ENHANCEMENTS ==================== */
.contact-form input,
.contact-form select,
.contact-form textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--gray-200);
    background: var(--white);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--blue-1);
    box-shadow: 0 0 0 4px rgba(9, 101, 198, 0.1);
    transform: translateY(-2px);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    transition: all 0.3s ease;
}

.contact-form input:focus::placeholder,
.contact-form textarea:focus::placeholder {
    transform: translateX(10px);
    opacity: 0.5;
}

/* ==================== SECTION HEADERS ==================== */
.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-1), var(--blue-accent));
    border-radius: 2px;
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== SCROLL REVEAL ANIMATIONS ==================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== FOOTER ENHANCEMENTS ==================== */
footer {
    background: linear-gradient(135deg, var(--blue-2) 0%, var(--blue-1) 100%);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

footer::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.footer-logo {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-logo:hover {
    transform: scale(1.05) rotate(2deg);
}

footer a {
    transition: all 0.3s ease;
    position: relative;
}

footer a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: white;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

footer a:hover::before {
    width: 100%;
}

footer a:hover {
    transform: translateX(5px);
}

/* ==================== LOADING STATES ==================== */
@keyframes skeleton {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 0px, var(--gray-200) 40px, var(--gray-100) 80px);
    background-size: 200px 100%;
    animation: skeleton 1.2s ease-in-out infinite;
}

/* ==================== TOOLTIPS ==================== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 8px 12px;
    background: var(--gray-900);
    color: white;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--gray-900);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== MOBILE OPTIMIZATIONS ==================== */
@media (max-width: 768px) {
    .hero::before,
    .hero::after {
        display: none;
    }

    .service-image::after {
        font-size: 0.875rem;
    }
}

/* ==================== ACCESSIBILITY & REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== SELECTION STYLING ==================== */
::selection {
    background: var(--blue-1);
    color: white;
}

::-moz-selection {
    background: var(--blue-1);
    color: white;
}

/* ==================== SMOOTH FOCUS INDICATORS ==================== */
:focus-visible {
    outline: 2px solid var(--blue-1);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

/* ==================== CURSOR ENHANCEMENTS ==================== */
.btn-primary,
.btn-submit,
.service-link,
.whatsapp-fab,
button {
    cursor: pointer;
    user-select: none;
}

.btn-primary:active,
.btn-submit:active,
.service-link:active {
    transform: scale(0.95);
}
/* ========================================
   MICROCLEAN - BROWSER FALLBACKS
   Support for older browsers and missing features
   ======================================== */

/* ==================== ASPECT-RATIO FALLBACK ==================== */
/* For browsers that don't support aspect-ratio property */
.no-aspectRatio .image-pair {
    aspect-ratio: auto !important;
    padding-bottom: 56.25%; /* Fallback to padding-bottom hack */
    height: 0;
}

.no-aspectRatio .image-pair.portrait-mobile {
    padding-bottom: 75%; /* 4:3 */
}

.no-aspectRatio .image-pair.landscape-mobile {
    padding-bottom: 42.86%; /* 21:9 */
}

/* ==================== BACKDROP-FILTER FALLBACK ==================== */
/* For browsers that don't support backdrop-filter */
.no-backdropFilter #header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.98) !important;
}

.no-backdropFilter .service-card:hover {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--white) !important;
}

.no-backdropFilter .label {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(9, 101, 198, 0.95) !important;
}

/* ==================== POINTER EVENTS FALLBACK ==================== */
/* For browsers without pointer events support */
.no-pointerEvents .slider-wrapper {
    touch-action: pan-y !important;
}

/* ==================== OBJECT-FIT FALLBACK ==================== */
/* For IE11 and older browsers */
@supports not (object-fit: cover) {
    .service-image img,
    .before-image img,
    .after-image img {
        /* Fallback positioning */
        width: 100%;
        height: 100%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* ==================== CSS GRID FALLBACK ==================== */
/* For browsers without grid support */
@supports not (display: grid) {
    .services-grid,
    .gallery-grid {
        display: flex;
        flex-wrap: wrap;
        margin: -1rem;
    }

    .service-card,
    .before-after-container {
        flex: 1 1 calc(33.333% - 2rem);
        margin: 1rem;
        min-width: 280px;
    }

    @media (max-width: 1024px) {
        .service-card,
        .before-after-container {
            flex: 1 1 calc(50% - 2rem);
        }
    }

    @media (max-width: 768px) {
        .service-card,
        .before-after-container {
            flex: 1 1 100%;
        }
    }
}

/* ==================== CLIP-PATH FALLBACK ==================== */
/* For browsers without clip-path support */
@supports not (clip-path: inset(0)) {
    .after-image {
        clip-path: none !important;
        /* Use overflow instead */
        overflow: hidden;
        width: 0%;
        transition: width 0.05s ease-out;
    }

    /* This would need JS support to update width instead of clip-path */
    .after-image[data-position] {
        width: var(--slider-position, 0%);
    }
}

/* ==================== CUSTOM PROPERTIES FALLBACK ==================== */
/* For browsers without CSS custom properties */
@supports not (--custom: property) {
    :root {
        /* Define fallback colors directly */
    }

    /* Fallback color values */
    .btn-primary {
        background: linear-gradient(135deg, #0777B6, #0965C6) !important;
        color: white !important;
    }

    #header {
        background: rgba(255, 255, 255, 0.95) !important;
    }

    footer {
        background: linear-gradient(135deg, #0965C6, #0777B6) !important;
    }
}

/* ==================== FLEXBOX FALLBACK FOR OLDER FLEXBOX ==================== */
/* Fix for older flexbox implementations */
.hero-buttons {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;

    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;

    gap: 1rem;
}

/* Gap fallback for flexbox */
@supports not (gap: 1rem) {
    .hero-buttons > * {
        margin-right: 1rem;
    }

    .hero-buttons > *:last-child {
        margin-right: 0;
    }
}

/* ==================== TRANSFORM FALLBACK ==================== */
/* For very old browsers */
@supports not (transform: translateY(-4px)) {
    .service-card:hover,
    .btn-primary:hover {
        margin-top: -4px;
        margin-bottom: 4px;
    }
}

/* ==================== FILTER FALLBACK ==================== */
/* For browsers without filter support */
@supports not (filter: blur(10px)) {
    .footer-logo {
        filter: none !important;
        /* Just show the logo as-is */
        mix-blend-mode: normal !important;
    }
}

/* ==================== POSITION STICKY FALLBACK ==================== */
/* For browsers without sticky support */
@supports not (position: sticky) {
    .carrito-panel {
        position: static !important;
    }
}

/* ==================== SCROLL-BEHAVIOR FALLBACK ==================== */
/* Handled by JavaScript */
@supports not (scroll-behavior: smooth) {
    html {
        /* JavaScript will handle smooth scrolling */
        scroll-behavior: auto;
    }
}

/* ==================== MIN/MAX/CLAMP FALLBACK ==================== */
@supports not (width: clamp(1rem, 5vw, 3rem)) {
    /* Use fixed values instead of fluid typography */
    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }

    @media (max-width: 768px) {
        h1 {
            font-size: 1.75rem !important;
        }

        h2 {
            font-size: 1.5rem !important;
        }
    }
}

/* ==================== INTERSECTION OBSERVER FALLBACK ==================== */
/* For browsers without IntersectionObserver */
.no-intersectionObserver .scroll-reveal {
    /* Show everything immediately */
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ==================== MOBILE SAFARI FIXES ==================== */
/* Fix for iOS Safari viewport height issue */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
}

/* Fix for iOS rubber band scrolling */
body {
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    /* Hide unnecessary elements when printing */
    .whatsapp-fab,
    .menu-toggle,
    .btn-whatsapp-header,
    .slider-handle {
        display: none !important;
    }

    /* Show full images */
    .after-image {
        clip-path: none !important;
    }

    /* Remove animations */
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ==================== REDUCED MOTION SUPPORT (IMPROVED) ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-bg,
    .hero::before,
    .hero::after {
        animation: none !important;
    }
}

/* ==================== HIGH CONTRAST MODE ==================== */
@media (prefers-contrast: high) {
    /* Increase contrast for better visibility */
    .btn-primary,
    .service-link {
        border-width: 3px !important;
    }

    .service-card {
        border: 2px solid currentColor !important;
    }
}

/* ==================== DARK MODE SUPPORT (FUTURE-PROOFING) ==================== */
@media (prefers-color-scheme: dark) {
    /* Placeholder for future dark mode implementation */
    /* Currently maintaining light theme only */
}

/* ==================== FORCED COLORS MODE (Windows High Contrast) ==================== */
@media (forced-colors: active) {
    .btn-primary,
    .service-link {
        border: 2px solid ButtonText;
    }

    .whatsapp-fab {
        border: 2px solid ButtonText;
        forced-color-adjust: none;
    }
}
