/* ===========================
   Variables y Reset
   =========================== */
:root {
    --azul-principal: #1976d2;
    --azul-oscuro: #0d47a1;
    --azul-claro: #42a5f5;
    --naranja-principal: #ff6f00;
    --naranja-claro: #ff8f00;
    --naranja-oscuro: #e65100;
    --blanco: #ffffff;
    --gris-claro: #f8f9fa;
    --gris-medio: #e0e0e0;
    --gris-oscuro: #333333;
    --texto-oscuro: #212121;
    --sombra: rgba(0, 0, 0, 0.08);
    --sombra-hover: rgba(0, 0, 0, 0.15);
    --sombra-intensa: rgba(0, 0, 0, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--texto-oscuro);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--blanco);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===========================
   Header
   =========================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.98), rgba(13, 71, 161, 0.98));
    padding: 18px 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 12px 0;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.95), rgba(13, 71, 161, 0.95));
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px 0 20px;
    max-width: 1600px;
}

/* Estilo base del logo */
.header .logo-img {
  filter: 
    brightness(1.25)
    contrast(1.2)
    saturate(1.15)
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.5))
    drop-shadow(0 0 4px rgba(255, 111, 0, 0.3));
  transition: transform 0.4s ease, filter 0.4s ease;
  transform: scale(1);
}

/* Efecto al pasar el cursor (para PC) */
.header .logo:hover .logo-img {
  filter: 
    brightness(1.4)
    contrast(1.3)
    saturate(1.3)
    drop-shadow(0 0 22px rgba(255, 255, 255, 0.85))
    drop-shadow(0 0 8px rgba(255, 111, 0, 0.6));
  transform: scale(1.08);
}

/* 🔹 Efecto visible también en móviles */
@media (hover: none) and (pointer: coarse) {
  .header .logo-img {
    animation: resplandorMovil 2.5s ease-in-out infinite alternate;
  }
}

/* Animación para móviles */
@keyframes resplandorMovil {
  0% {
    filter: brightness(1.25) contrast(1.2) saturate(1.15) drop-shadow(0 0 12px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 4px rgba(255, 111, 0, 0.3));
    transform: scale(1);
  }
  100% {
    filter: brightness(1.4) contrast(1.3) saturate(1.3) drop-shadow(0 0 22px rgba(255, 255, 255, 0.85)) drop-shadow(0 0 8px rgba(255, 111, 0, 0.6));
    transform: scale(1.05);
  }
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    padding-left: 40px;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 170px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    transition: filter 0.3s ease;
}

.logo:hover .logo-img {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.nav {
    margin-left: 50px;
    margin-right: 40px;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    row-gap: 15px;
}

.nav ul li a {
    color: var(--blanco);
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.9rem, 1.2vw, 1.3rem);
    position: relative;
    padding: 6px 12px;
    transition: all 0.3s ease;
    border-radius: 8px;
    white-space: nowrap;
}

.nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--naranja-principal);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav ul li a:hover::before {
    width: 80%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 8px;
    position: relative;
    z-index: 1100;
}

.menu-toggle:focus {
    outline: 2px solid var(--naranja-principal);
    outline-offset: 2px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--blanco);
    border-radius: 3px;
    transition: all 0.3s ease;
}

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

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

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

/* ===========================
   Hero Section
   =========================== */
.hero {
    position: relative;
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1504328345606-18bbc8c9d7d1?w=1920&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.7), rgba(0, 0, 0, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--blanco);
    max-width: 800px;
    padding: 140px 20px 0;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 35px;
    font-weight: 300;
    animation: fadeInUp 1.2s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.btn-primary {
    display: inline-block;
    padding: 16px 48px;
    background: linear-gradient(135deg, var(--naranja-principal), var(--naranja-claro));
    color: var(--blanco);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(255, 111, 0, 0.4);
    animation: fadeInUp 1.4s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 111, 0, 0.5);
}

.btn-primary:active {
    transform: translateY(-2px) scale(1.02);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: var(--blanco);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    animation: fadeInUp 1.6s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-whatsapp::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-whatsapp:hover::before {
    left: 100%;
}

.btn-whatsapp:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

.btn-whatsapp:active {
    transform: translateY(-2px) scale(1.02);
}

.btn-whatsapp svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   Animaciones de Scroll Reveal
   =========================== */
.scroll-hidden {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.25s ease-out,
                transform 0.25s ease-out;
}

.scroll-hidden.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   Sections General
   =========================== */
section {
    padding: 100px 0;
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--azul-principal);
    margin-bottom: 15px;
    position: relative;
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--naranja-principal), var(--naranja-claro));
    margin: 20px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.15rem;
    color: var(--gris-oscuro);
    margin-bottom: 60px;
    font-weight: 400;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* ===========================
   Páginas Legales (Política de Privacidad, etc.)
   =========================== */
.legal-page {
    padding-top: 130px; /* Compensa el header fijo */
    padding-bottom: 80px;
    background: linear-gradient(180deg, #f5f7fb 0%, #ffffff 100%);
}

.legal-section {
    max-width: 900px;
    margin: 0 auto;
}

.legal-content {
    margin-top: 40px;
    background: var(--blanco);
    border-radius: 24px;
    padding: 40px 35px;
    box-shadow: 0 18px 45px rgba(13, 71, 161, 0.12);
    border: 1px solid rgba(25, 118, 210, 0.08);
}

.legal-content h2 {
    font-size: 1.3rem;
    margin-top: 28px;
    margin-bottom: 10px;
    color: var(--azul-principal);
}

.legal-content p {
    margin-bottom: 14px;
    font-size: 0.98rem;
    color: var(--texto-oscuro);
}

.legal-content ul {
    margin: 0 0 14px 18px;
    padding-left: 0;
}

.legal-content ul li {
    margin-bottom: 6px;
    font-size: 0.96rem;
}

.legal-content a {
    color: var(--azul-principal);
    font-weight: 500;
    text-decoration: underline;
}

.legal-content a:hover {
    color: var(--naranja-principal);
}

@media (max-width: 768px) {
    .legal-page {
        padding-top: 110px;
        padding-bottom: 60px;
    }

    .legal-content {
        padding: 25px 20px;
        border-radius: 18px;
    }
}

/* ===========================
   Servicios Section
   =========================== */
.servicios {
    background: linear-gradient(180deg, #ffffff 0%, var(--gris-claro) 50%, #ffffff 100%);
    position: relative;
}

.servicios::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gris-medio), transparent);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

.servicio-card {
    background: var(--blanco);
    padding: 45px 35px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 10px 30px var(--sombra), 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.servicio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--naranja-principal), var(--naranja-claro));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.servicio-card:hover::before {
    transform: scaleX(1);
}

.servicio-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 50px var(--sombra-intensa);
}

.servicio-icon {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s ease;
}

.servicio-card:hover .servicio-icon {
    transform: scale(1.1) rotate(5deg);
}

.servicio-icon svg {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 4px 8px rgba(255, 111, 0, 0.2));
}

.servicio-card h3 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--azul-principal), var(--azul-oscuro));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-weight: 600;
}

.servicio-card p {
    color: var(--gris-oscuro);
    line-height: 1.8;
}

/* ===========================
   Calderas, Gas, Aire Acondicionado - Con Imágenes
   =========================== */
.calderas {
    background: #2c3e50;
}

.calderas .section-title {
    color: var(--blanco);
}

.calderas .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.gas {
    background: var(--blanco);
}

.aire-acondicionado {
    background: #2c3e50;
}

.aire-acondicionado .section-title {
    color: var(--blanco);
}

.aire-acondicionado .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.servicios-grid-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.servicios-grid-images-2x2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.servicio-image-card {
    background: var(--blanco);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 35px var(--sombra);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.servicio-image-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, var(--naranja-principal), var(--azul-principal));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.servicio-image-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px var(--sombra-intensa);
}

.servicio-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.servicio-image h3 {
    color: var(--blanco);
    font-size: 1.6rem;
    font-weight: 600;
    z-index: 1;
    text-align: center;
    padding: 0 20px;
}

.servicio-content {
    padding: 25px;
}

.servicio-content p {
    color: var(--gris-oscuro);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ===========================
   Aerotermia Section
   =========================== */
.aerotermia {
    background: linear-gradient(135deg, var(--azul-principal), var(--azul-oscuro));
    color: var(--blanco);
}

.aerotermia .section-title {
    color: var(--blanco);
}

.aerotermia .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* ===========================
   Suelo Radiante Section
   =========================== */
.suelo-radiante {
    background: #f8f9fa;
    padding: 80px 0;
}

.suelo-radiante .section-title {
    color: var(--azul-principal);
}

.suelo-radiante .section-subtitle {
    color: var(--gris-oscuro);
}

.beneficios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.beneficio-card {
    background: var(--blanco);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.beneficio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.1), rgba(255, 111, 0, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

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

.beneficio-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.beneficio-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease;
}

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

.beneficio-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(25, 118, 210, 0.2) 0%, rgba(13, 71, 161, 0.5) 100%);
    transition: opacity 0.4s ease;
}

.beneficio-card:hover .beneficio-image::after {
    opacity: 0.7;
}

.beneficio-content {
    padding: 25px;
    text-align: center;
}

.beneficio-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--azul-principal);
}

.beneficio-content p {
    line-height: 1.6;
    color: var(--gris-oscuro);
    font-size: 0.95rem;
}

/* ===========================
   Marcas Section
   =========================== */
.marcas {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.marcas::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--azul-principal), transparent);
    opacity: 0.3;
}

.marcas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.marca-card {
    background: var(--blanco);
    padding: 35px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.marca-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(25, 118, 210, 0.05), transparent);
    transition: left 0.5s;
}

.marca-card:hover::before {
    left: 100%;
}

.marca-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(25, 118, 210, 0.15);
    border-color: var(--azul-principal);
}

.marca-logo {
    width: 100%;
    max-width: 180px;
    opacity: 0.85;
    transition: all 0.4s ease;
    filter: grayscale(20%);
}

.marca-card:hover .marca-logo {
    opacity: 1;
    transform: scale(1.08);
    filter: grayscale(0%);
}

.marca-logo svg {
    width: 100%;
    height: auto;
}

.marca-logo img {
    width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

/* ===========================
   Contacto Section
   =========================== */
.contacto {
    background: var(--gris-claro);
}

.contacto-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: stretch;
}

/* Hacer que la tarjeta de la derecha (CTA) ocupe toda la altura de su columna */
.contacto-wrapper > .servicio-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contacto-card {
    background: var(--blanco);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 3px 10px var(--sombra);
    transition: all 0.3s ease;
}

.contacto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--sombra-hover);
}

.contacto-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contacto-card h3 {
    font-size: 1.2rem;
    color: var(--azul-principal);
    margin-bottom: 10px;
    font-weight: 600;
}

.contacto-card a {
    color: var(--gris-oscuro);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contacto-card a:hover {
    color: var(--naranja-principal);
}

.contacto-form {
    background: var(--blanco);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 15px var(--sombra);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--gris-medio);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--azul-principal);
}

.form-group textarea {
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--azul-principal);
    color: var(--blanco);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--azul-oscuro);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(25, 118, 210, 0.3);
}

.form-mensaje {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-mensaje.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.form-mensaje.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: linear-gradient(135deg, #0d47a1, #1565c0, #1976d2);
    color: var(--blanco);
    padding: 60px 0 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--naranja-principal), var(--naranja-claro), var(--naranja-principal), transparent);
    box-shadow: 0 0 20px rgba(255, 111, 0, 0.5);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section .logo {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.footer-section .logo-img {
    height: 120px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.footer-section .logo-img:hover {
    transform: scale(1.05);
}

.footer-description {
    margin-top: 20px !important;
    font-size: 0.9rem !important;
    line-height: 1.7 !important;
    opacity: 0.9 !important;
    max-width: 300px;
    display: block !important;
}

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--blanco);
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--naranja-principal);
    border-radius: 2px;
}

.footer-section p {
    margin: 12px 0;
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.95;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-section p strong {
    font-weight: 500;
    opacity: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.footer-section p span {
    display: inline;
}

.footer-section a {
    color: var(--blanco);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section a:hover {
    color: var(--naranja-principal);
    transform: translateX(3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
    letter-spacing: 0.5px;
}

/* ===========================
   WhatsApp Floating Button
   =========================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
    z-index: 999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
    }
    50% {
        box-shadow: 0 8px 40px rgba(37, 211, 102, 0.7);
    }
}

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

.whatsapp-icon {
    font-size: 2rem;
}

/* ===========================
   Estilos para reemplazar <br>
   =========================== */
.horario-contacto span,
.direccion-contacto span {
    display: block;
    line-height: 1.6;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav ul {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, var(--azul-principal), var(--azul-oscuro));
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        gap: 20px;
        transition: left 0.3s ease;
    }

    .nav ul.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-content {
        padding: 110px 20px 0;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn-primary,
    .btn-whatsapp {
        width: 100%;
        max-width: 320px;
        padding: 14px 30px;
        font-size: 1rem;
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .servicios-grid {
        grid-template-columns: 1fr;
    }

    .beneficios-grid {
        grid-template-columns: 1fr;
    }

    .marcas {
        padding: 40px 0;
    }

    .marcas-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 20px;
    }

    .marca-card {
        padding: 25px 15px;
        min-height: 90px;
    }

    .marca-logo {
        max-width: 140px;
    }

    .contacto-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .logo-img {
        height: 110px;
    }

    .servicios-grid-images,
    .servicios-grid-images-2x2 {
        grid-template-columns: 1fr;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-icon {
        font-size: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section .logo {
        justify-content: center;
    }

    .footer-section .logo-img {
        height: 100px;
    }

    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-section p {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-description {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-primary {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .hero-content {
        padding: 100px 16px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .contacto-form {
        padding: 25px;
    }
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(33, 33, 33, 0.96);
    color: var(--blanco);
    padding: 16px 20px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 1100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    font-size: 0.9rem;
}

.cookie-banner__content {
    max-width: 900px;
}

.cookie-banner__content a {
    color: var(--naranja-principal);
    font-weight: 500;
    text-decoration: underline;
}

.cookie-banner__button {
    flex-shrink: 0;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--naranja-principal), var(--naranja-claro));
    color: var(--blanco);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cookie-banner__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 111, 0, 0.65);
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner__button {
        width: 100%;
        text-align: center;
    }
}

.cookie-link-button {
    background: none;
    border: none;
    color: var(--naranja-principal);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.cookie-link-button:hover {
    color: var(--naranja-claro);
}

/* Modal de cookies */
.cookie-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.cookie-modal-backdrop.is-visible {
    display: flex;
}

.cookie-modal {
    background: #ffffff;
    border-radius: 16px;
    max-width: 900px;
    width: 98%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.cookie-modal__header {
    padding: 18px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal__header h2 {
    font-size: 1.4rem;
    color: var(--texto-oscuro);
}

.cookie-modal__close {
    border: none;
    background: transparent;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

.cookie-modal__body {
    padding: 18px 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.cookie-modal__body p {
    margin-bottom: 10px;
}

.cookie-category {
    padding: 12px 0;
    border-top: 1px solid #eeeeee;
}

.cookie-category__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cookie-category__title {
    font-weight: 600;
    color: var(--texto-oscuro);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cookie-category__title::before {
    content: '\203A';
    font-size: 1.4rem;
    color: #616161;
    transform: translateY(-1px);
}

.cookie-category__status--always-on {
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.9rem;
}

.cookie-modal__note {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #616161;
}

.cookie-modal__footer {
    padding: 14px 24px 18px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cookie-modal__button {
    border-radius: 999px;
    padding: 10px 20px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    cursor: pointer;
    font-weight: 600;
}

.cookie-modal__button--primary {
    background: linear-gradient(135deg, var(--naranja-principal), var(--naranja-claro));
    color: #ffffff;
    border-color: transparent;
}

.cookie-modal__button--secondary {
    background: #f5f5f5;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner__button {
        width: 100%;
        text-align: center;
    }

    .cookie-modal {
        max-width: 100%;
        width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }

    .cookie-modal__body {
        max-height: calc(100vh - 140px);
    }
}
