/* ============================================
   1. RESET Y VARIABLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Truco para ocultar el branding de HubSpot */
.hs-featured-image-wrapper + .hs-richtext, 
.hs-form-footer, 
.hs-back-link {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    padding: 0 !important;
}

/* Este es el que suele funcionar con el link de "Crea tus propios..." */
a[href*="hubspot.com/products/marketing/forms"] {
    display: none !important;
}

:root {
    /* Colores principales */
    --color-primary: #2c3e50;
    --color-primary-dark: #1a252f;
    --color-secondary: #34495e;
    --color-accent: #e67e22;
    --color-accent-hover: #d35400;
    --color-light: #ecf0f1;
    --color-white: #ffffff;
    
    /* Escala de grises */
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f4;
    --gray-200: #e8eaed;
    --gray-300: #dadce0;
    --gray-400: #bdc1c6;
    --gray-500: #9aa0a6;
    --gray-600: #80868b;
    --gray-700: #5f6368;
    --gray-800: #3c4043;
    --gray-900: #202124;
    
    /* Tipografía */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Layout */
    --header-height: 80px;
    --header-height-mobile: 70px;
    --max-width: 1200px;
    --border-radius: 10px;
    --border-radius-lg: 15px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --shadow-accent: 0 4px 15px rgba(230, 126, 34, 0.4);
    
    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   2. BASE
   ============================================ */
body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--gray-800);
    overflow-x: hidden;
    background-color: var(--gray-50);
    padding-top: var(--header-height);
}

/* ============================================
   3. HEADER
   ============================================ */
header {
    background: var(--color-white);
    box-shadow: var(--shadow-md);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: height var(--transition-base), 
                box-shadow var(--transition-base),
                background-color var(--transition-base);
}

header.scrolled {
    height: var(--header-height-mobile);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
}

.logo span {
    color: var(--color-accent);
}

.logo-img {
    height: 60px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-accent);
}

.nav-links > li > a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.nav-links > li > a:hover::after,
.nav-links > li > a.active::after {
    width: 100%;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown > a::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform var(--transition-base);
    display: inline-block;
}

.dropdown.active > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--color-white);
    min-width: 220px;
    box-shadow: var(--shadow-xl);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    list-style: none;
    border: 1px solid var(--gray-100);
    z-index: 1001;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--color-white);
    border-left: 1px solid var(--gray-100);
    border-top: 1px solid var(--gray-100);
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--color-secondary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.dropdown-menu a::after {
    display: none !important;
}

.dropdown-menu a:hover {
    background: var(--gray-50);
    color: var(--color-accent);
    border-left-color: var(--color-accent);
    padding-left: 1.8rem;
}

/* Menú móvil */
.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    z-index: 1001;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Skip link para accesibilidad */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 8px;
    text-decoration: none;
    z-index: 101;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* ============================================
4. HERO
   ============================================ */
.hero {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                url('../fotos/imagenInicio.png') center/cover no-repeat;
    color: var(--color-white);
    padding: 8rem 2rem 6rem;
    text-align: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--color-accent);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-accent);
}

.cta-button:hover {
    transform: translateY(-2px);
    background: var(--color-accent-hover);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.6);
}

/* ============================================
   5. NEWSLETTER
   ============================================ */
.newsletter {
    background: var(--color-primary);
    padding: 5rem 2rem;
    color: var(--color-white);
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.newsletter p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 2rem auto;
}

.newsletter-form input {
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: box-shadow var(--transition-fast);
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.3);
}

.newsletter-form button {
    padding: 1rem 2rem;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.newsletter-form button:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
}

/* ============================================
   6. INTRO
   ============================================ */
.intro {
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.intro h2 {
    color: var(--color-primary);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.intro p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--gray-600);
    line-height: 1.8;
}

/* ============================================
   7. SERVICES
   ============================================ */
.services {
    background: var(--color-primary);
    padding: 5rem 2rem;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.services h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    color: white;
    margin-bottom: 1rem;
}

.services > .container > p {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    font-size: 1.2rem;
    opacity: 0.9;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base);
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.service-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover .service-image::after {
    opacity: 1;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    will-change: transform;
}

.service-card:hover .service-image img {
    transform: scale(1.08);
}

.service-content {
    padding: 2rem;
}

.service-content h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-content p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* ============================================
   8. ABOUT
   ============================================ */
.about {
    padding: 5rem 2rem;
    background: var(--color-white);
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    color: var(--color-primary);
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.about-text p strong {
    color: var(--color-primary);
    font-size: 1.2rem;
}

.about-image {
    height: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.about-image:hover img {
    transform: scale(1.05);
}

/* ============================================
   9. REVIEWS
   ============================================ */
.reviews {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: var(--color-white);
    padding: 5rem 2rem;
    text-align: center;
}

.reviews-header {
    margin-bottom: 3rem;
}

.reviews-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.google-badge {
    display: inline-block;
    margin-bottom: 2rem;
}

.badge-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.badge-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.badge-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.google-icon {
    width: 32px;
    height: 32px;
}

.badge-text {
    text-align: left;
    color: var(--gray-800);
}

.rating-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.rating-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.badge-text .stars {
    color: #f1c40f;
    font-size: 1.1rem;
    letter-spacing: -2px;
}

.review-count {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-left: 0.5rem;
}

.badge-label {
    font-size: 0.85rem;
    color: #4285F4;
    font-weight: 600;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: var(--max-width);
    margin: 0 auto 3rem auto;
}

.review-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: left;
    transition: transform var(--transition-base), background var(--transition-base);
}

.review-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
}

.review-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.review-author {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-white);
}

.review-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.google-logo-small {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.review-item .stars {
    color: #f1c40f;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.review-text {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.review-text::before {
    content: '"';
    font-size: 2rem;
    color: var(--color-accent);
    line-height: 1;
    margin-right: 0.2rem;
    vertical-align: middle;
}

.reviews-footer {
    margin-top: 1rem;
}

.google-cta {
    background: #4285F4 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.google-cta:hover {
    background: #3367D6 !important;
    transform: translateY(-2px);
}

.update-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* ============================================
   10. FOOTER
   ============================================ */
footer {
    background: var(--color-primary);
    color: var(--color-light);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.footer-section h3 {
    color: var(--color-accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-section p, 
.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    line-height: 1.8;
    margin-bottom: 0.5rem;
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid var(--color-secondary);
    padding-top: 2rem;
    color: #95a5a6;
    font-size: 0.9rem;
    text-align: center;
}

/* ============================================
   11. WHATSAPP FLOAT
   ============================================ */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background: #25d366;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    animation: none;
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6); }
}

/* ============================================
   12. ANIMACIONES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   13. UTILIDADES
   ============================================ */
.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;
}

/* ============================================
   14. RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .nav-links {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--color-white);
        flex-direction: column;
        padding: 2rem;
        gap: 0;
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        animation: slideDown 0.3s ease;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-menu {
        display: flex;
    }
    
    .dropdown {
        width: 100%;
        border-bottom: 1px solid var(--gray-200);
        padding: 0.5rem 0;
    }
    
    .dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        transition: max-height 0.3s ease, padding 0.3s;
        background: var(--gray-50);
        border-radius: 0;
        margin: 0.5rem -2rem 0 -2rem;
        width: calc(100% + 4rem);
        padding: 0;
        border: none;
    }
    
    .dropdown.active .dropdown-menu {
        visibility: visible;
        max-height: 300px;
        padding: 0.5rem 0;
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .dropdown-menu a {
        padding-left: 3rem;
    }
    
    .dropdown-menu a:hover {
        padding-left: 3.5rem;
    }
    
    .hero {
        padding: 6rem 1.5rem 4rem;
        min-height: 400px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        height: 300px;
        order: -1;
    }
    
    .footer-content {
        text-align: center;
    }
    
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .badge-content {
        padding: 0.8rem 1.2rem;
    }
    
    .google-icon {
        width: 24px;
        height: 24px;
    }
    
    .rating-number {
        font-size: 1.2rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float img {
        width: 30px;
        height: 30px;
    }
}

@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;
    }
    
    .whatsapp-float {
        animation: none;
    }
}

/* 1. Prepara la tarjeta para recibir la capa invisible */
.service-card {
    position: relative; 
}

/* 2. Crea la capa invisible que hace clic */
.enlace-fantasma {
    position: absolute; /* Flota encima */
    top: 0;
    left: 0;
    width: 100%;        /* Cubre todo el ancho */
    height: 100%;       /* Cubre todo el alto */
    z-index: 5;         /* Se asegura de estar encima */
}

.card-link {
    text-decoration: none;  
    color: inherit;         
    display: block;         
    height: 100%;           
}


.card-link:hover .service-content h3 {
    color: #007bff; 
}


.card-link:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}