  /* ───────────────── VARIABLES ───────────────── */    
:root {
    --black: #000;
    --dark: #0f0f0f;
    --red: #c00000;
    --white: #fff;
    --gray: #aaa;
    --transition: 0.3s ease;
    --font-main: 'Poppins', sans-serif;
    --font-head: 'Montserrat', sans-serif;
}

/* ───────────────── RESET ───────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--dark);
    color: var(--white);
    line-height: 1.6;
}






/* ───────────────── CONTAINER ───────────────── */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* ───────────────── HEADER / NAV ───────────────── */
.header {
   position: fixed;
    width: 100%;
    top: 0;
    background: rgba(0,0,0,.95);
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.61);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
}

/* ───────── LOGO COSENTINO ───────── */
.logo-wrapper {
    display: flex;
    flex-direction: column;
}

.logo-cosentino {
    display: flex;
    align-items: center;
    font-family: var(--font-head);
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--white);
}

/* ───────── LOGO O (CONTENEDOR) ───────── */

/* ───────── LOGO O ───────── */
.logo-o {
    width: 31px;
    height: 31px;
    background: var(--red);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 6px;
    position: relative;
    overflow: hidden;

    /* llama más chica */
    --flame-scale: 0.85;

    box-shadow:
        0 0 15px rgba(255, 0, 0, 0.6),
        inset 0 0 10px rgba(0, 0, 0, 0.6);
}

/* 🔥 LLAMA CENTRADA */
.logo-flame {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    transform:
        translate(-50%, -50%)
        scale(var(--flame-scale));

    transform-origin: center;



    pointer-events: none;
}


@media (min-width: 1200px) {
    .logo-o {
        --flame-scale: 0.9;
    }
}

@media (max-width: 768px) {
    .logo-o {
        --flame-scale: 0.8;
    }
}

@media (max-width: 480px) {
    .logo-o {
        --flame-scale: 0.75;
    }
}


.logo-sub {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: #ccc;
}

/* ───────────────── NAV ───────────────── */
.nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.nav a::after {
    content: '';
    width: 0;
    height: 3px;
    background: var(--red);
    position: absolute;
    bottom: -6px;
    left: 0;
    transition: var(--transition);
}

.nav a:hover::after {
    width: 100%;
}



.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.9rem;
    cursor: pointer;
}

/* ───────────────── HERO ───────────────── */
.hero {
    padding: 9rem 0 5rem;
    text-align: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.526), rgb(4, 4, 4)), url(/img/imgfondo.jpeg);
    background-size: contain;
    background-position: center 65%; /* ⬅ imagen un poco más abajo */
    background-repeat: no-repeat;
    background-color: #fff; /* rellena los espacios */
}

.hero h2 {
    font-family: var(--font-head);
    font-size: 2.8rem;
    margin-bottom: 1rem;
    animation: fadeUp .8s forwards;
}

.hero p {
    max-width: 760px;
    margin: 0 auto 2rem;
    color: var(--gray);
}

/* ───────────────── BOTONES ───────────────── */
.btn-primary {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--white);
    color: var(--black);
    transform: scale(1.05);
}

/* ───────────────── SECCIONES ───────────────── */
section {
    padding: 4rem 0;
}

section h2 {
    text-align: center;
    font-size: 2.3rem;
    margin-bottom: 2.2rem;
}

/* ───────────────── SERVICIOS (CARDS CON IMAGEN) ───────────────── */

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Card base */

.servicio-card {
    position: relative;
    height: 380px; /* altura fija para desktop */
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
 background: var(--bg);
    background-size: cover;
    background-position: center;
    filter: contrast(1.05) saturate(1.05);


    background-size: cover;
    background-position: center;
}

   

/* Overlay principal para legibilidad */
.servicio-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.95) 0%,
        rgba(0,0,0,0.85) 35%,
        rgba(0,0,0,0.55) 60%,
        rgba(0,0,0,0.25) 80%,
        rgba(0,0,0,0) 100%
    );
    opacity: 1;
    transition: opacity .35s ease;
    pointer-events: none;
}



/* Contenido */
.servicio-content {
    position: relative;
    z-index: 2;
    padding: 2.2rem;
     padding-bottom: 2.8rem; /* 🔑 espacio extra abajo */
    width: 100%;
    transition: transform .35s ease;
    white-space: pre-line;
}

/* Icono */
.servicio-content span {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    display: inline-block;
    color: var(--red);
}

/* Título */
.servicio-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

/* Texto */
.servicio-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e5e5e5;
    max-width: 95%;
}

/* Hover */
.servicio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 32px 55px rgba(0,0,0,.75);
}

.servicio-card:hover::after {
    opacity: 1;
}

.servicio-card:hover .servicio-content {
    transform: translateY(-6px);
}

/* ───────── Mobile adjustments ───────── */
@media (max-width: 768px) {

    .servicio-card {
        height: auto; /* <-- quitamos la altura fija para que crezca */
        align-items: flex-start; /* para que el contenido quede arriba */
        padding-bottom: 1.2rem; /* un poco de espacio debajo */
    }

    .servicio-card.expandida {
        height: auto; /* <-- para que pueda crecer cuando está expandida */
    }
}

/* ───────── TEXTO CON LEER MÁS (GENERAL) ───────── */

.servicio-text {
    position: relative;
    max-height: 4.6em; /* altura para cortar texto (~3 líneas) */
    overflow: hidden;
    transition: max-height 0.45s ease;
}

/* Degradado suave al final del texto */
.servicio-text::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.2em;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.85),
        rgba(0,0,0,0)
    );
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Cuando está expandido, se muestra todo el texto y se quita degradado */
.servicio-card.expandida .servicio-text {
    max-height: 9999px;
    overflow: visible;
}

.servicio-card.expandida .servicio-text::after {
    opacity: 0;
}

/* Quita degradado al hover */
.servicio-card:hover .servicio-text::after {
    opacity: 0;
}

/* Animación suave al hover */
.servicio-card:hover .servicio-content {
    transform: translateY(-6px);
}

/* Botón leer más visible y clickeable en todos lados */
.leer-mas {
    background: none;
    border: none;
    padding: 0;
    margin-top: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--red);
    cursor: pointer;
    display: inline-block;
    position: relative;
    z-index: 10;
}

/* ───────── Ajustes para móvil ───────── */
@media (max-width: 768px) {
    /* El texto cortado es un poco más alto */
    .servicio-text {
        max-height: 5.2em;
    }
    
    .servicio-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .servicio-card:hover::after {
        opacity: 1 !important;
    }
    
    .servicio-card:hover .servicio-content {
        transform: none !important;
    }
}

/* ───────────────── DIFERENCIALES  ───────────────── */

.diferenciales {
    background: linear-gradient(135deg, #0a0a0a, #111);
    padding: 3rem 1.5rem;
}

.diferenciales .servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem;
    align-items: stretch;
}

.diferenciales .servicio-card {
    position: relative;
    background: #151515;
    border-radius: 16px;
    padding: 2.2rem 1.6rem 1.8rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    text-align: center;
    overflow: visible;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    height: auto; /* Que se ajuste al contenido */
}

.diferenciales .servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Número arriba centrado, tamaño original */
.diferenciales .servicio-card::before {
    content: attr(data-num);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e00000, #a80000);
    color: var(--white);
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 15px rgba(192, 0, 0, 0.6);
    user-select: none;
    transition: transform 0.3s ease;
}

.diferenciales .servicio-card:hover::before {
    transform: translate(-50%, -50%) scale(1.08);
}

/* Contenido */
.diferenciales .servicio-content {
    padding: 0;
    margin-top: 1rem;
}

.diferenciales .servicio-content h3 {
    color: #e63946;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.diferenciales .servicio-content p {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.4;
    font-weight: 500;
}

/* MOBILE */
@media (max-width: 768px) {
    .diferenciales .servicios-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .diferenciales .servicio-card {
        padding: 1.8rem 1.3rem 1.4rem;
    }
    
    .diferenciales .servicio-card::before {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .diferenciales .servicio-content h3 {
        font-size: 1.15rem;
    }

    .diferenciales .servicio-content p {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    
}


  
@media (max-width: 480px) {
    .diferenciales {
        padding: 2rem 1rem;
    }

    .diferenciales .servicio-card {
        padding: 1.4rem 1rem 1rem;
    }

    .diferenciales .servicio-card::before {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .diferenciales .servicio-content h3 {
        font-size: 1.05rem;
    }

    .diferenciales .servicio-content p {
        font-size: 0.8rem;
        color: #b0b0b0;
        line-height: 1.2;
    }
}

/* ───────────────── CONTACTO ───────────────── */
.contacto {
    text-align: center;
}

.contacto p {
    color: var(--gray);
    margin-bottom: 2rem;
}

/* ───────── CONTACTO EMAIL ───────── */

/* ───────── CARD EMAIL CONTACTO ───────── */

.contacto-card-email {
  margin: 2.5rem auto 0;
    padding: 1.4rem 1.6rem;
    max-width: 420px;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;

    display: flex;
    align-items: center;
    gap: 1.2rem;

    backdrop-filter: blur(6px);
    transition: transform var(--transition), box-shadow var(--transition), border var(--transition);
}

/* Hover */
.contacto-card-email:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(192, 0, 0, 0.5);
}

/* Ícono */
.contacto-card-email i {
    font-size: 2rem;
    color: var(--red);
    flex-shrink: 0;
}

/* Texto */
.contacto-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

#contactoEmailLabel {
    font-size: 0.85rem;
    color: var(--gray);
    letter-spacing: 0.4px;
}

#contactoEmail {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    transition: color var(--transition);
}

#contactoEmail:hover {
    color: var(--red);
}

/* Mobile */
@media (max-width: 480px) {
    .contacto-card-email {
        padding: 1.2rem;
        border-radius: 14px;
    }

    #contactoEmail {
        font-size: 0.95rem;
        word-break: break-word;
    }
}

/* ───────────────── FOOTER ───────────────── */
.footer {
    background: var(--black);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
}

/* ───────────────── WHATSAPP ───────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    color: #fff;
    width: 67px;
    height: 67px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    z-index: 2000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.15);
}

/* ───────────────── RESPONSIVE ───────────────── */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--black);
        flex-direction: column;
        width: 220px;
        padding: 1rem;
        transform: translateX(100%);
        transition: var(--transition);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        padding: 0.8rem 0;
    }

    /* Ajuste altura card en móvil para evitar overflow */
    .servicio-card {
        height: auto; /* <-- altura auto para móviles */
        align-items: flex-start; /* contenido arriba */
        padding-bottom: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 7rem 0 4rem;
    }

    .hero h2 {
        font-size: 1.9rem;
        line-height: 1.2;
    }

    .btn-primary {
        width: 100%;
        padding: 1rem;
    }
}

/* ───────────────── ANIMACIONES ───────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}





/* Contenedor del humo, fijo detrás de todo */
.humo-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
  background: transparent;
}

/* SVG ocupa todo el contenedor */
.humo {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Animaciones para las bolitas de humo */
.smoke1, .smoke2, .smoke3 {
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  transform-origin: center bottom;
  filter: blur(6px);
  opacity: 0.6;
}

/* Movimiento vertical y escala para simular subida de humo */
.smoke1 {
  animation-name: humo1;
  animation-duration: 6s;
}
.smoke2 {
  animation-name: humo2;
  animation-duration: 7.5s;
  animation-delay: 1.5s;
}
.smoke3 {
  animation-name: humo3;
  animation-duration: 9s;
  animation-delay: 3s;
}

@keyframes humo1 {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-150px) scale(1.4); opacity: 0; }
}

@keyframes humo2 {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-180px) scale(1.6); opacity: 0; }
}

@keyframes humo3 {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-200px) scale(1.8); opacity: 0; }
}