/* ================================
   RESET BASE MEJORADO
================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: #1e293b;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

.services {
    padding: 80px 0;
}

.services h2 {
    text-align: center;
    margin-bottom: 30px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.service-box {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 4 / 3; /* rectangular */
    background: #ddd;
}

.service-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.service-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.45) 35%,
        rgba(0, 0, 0, 0.10) 100%
    );
}

.service-box h3 {
    position: absolute;
    left: 18px;
    bottom: 18px;
    margin: 0;
    z-index: 2;
    color: #2f80ed;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.service-box:hover img {
    transform: scale(1.05);
    transition: transform 0.35s ease;
}

.service-box img {
    transition: transform 0.35s ease;
}

@media (max-width: 768px) {
    .service-box {
        aspect-ratio: 1 / 1; /* cuadradas en móvil si quieres */
    }

    .service-box h3 {
        font-size: 1rem;
    }
}

/* ================================
   CONTENEDOR
================================ */

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* ================================
   HEADER PREMIUM
================================ */

.header {
    background: #ffffff;
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 90px;
    transition: all 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

/* NAV */

.nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: #122097;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

/* Línea animada debajo */
.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0%;
    height: 2px;
    background: #1f6feb;
    transition: all 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

.nav a:hover {
    color: #1f6feb;
}

.btn-nav {
    background: #1f6feb;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(31,111,235,0.3);
}

.btn-nav:hover {
    background: #0f2c59;
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* ================================
   HERO MEJORADO
================================ */

.hero {
    background: linear-gradient(rgba(15,44,89,0.85), rgba(5,28,61,0.9)),
    url('../assets/img/colladoinstalaciones.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 160px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero p {
    max-width: 700px;
    margin: auto;
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ================================
   BOTONES PROFESIONALES
================================ */

.btn-primary,
.btn-secondary {
    display: inline-block;
    margin-top: 25px;
    padding: 14px 30px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #1f6feb;
    color: white;
    box-shadow: 0 10px 25px rgba(31,111,235,0.4);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(31,111,235,0.6);
}

.btn-secondary {
    background: white;
    color: #0f2c59;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

/* ================================
   SERVICES
================================ */

.services {
    padding: 100px 0;
    background: #f8fafc;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 2fr));
    gap: 40px;
    margin-top: 50px;
}

/* ================================
   PAGE HEADER
================================ */

.page-header {
    background: linear-gradient(135deg, #0f2c59, #1f6feb);
    color: white;
    padding: 120px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.6rem;
}

/* ================================
   CARDS ULTRA MODERNAS
================================ */

.card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.15);
}

.card h3 {
    margin-bottom: 15px;
    color: #0f2c59;
}

/* ================================
   WHY US
================================ */

.why-us {
    padding: 100px 0;
    text-align: center;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

/* ================================
   CTA
================================ */

.cta {
    background: linear-gradient(135deg, #1f6feb, #0f2c59);
    color: white;
    text-align: center;
    padding: 80px 0;
}

/* ================================
   GALERÍA PREMIUM
================================ */

.work-section {
    padding: 70px 0;
}

.work-section h2 {
    text-align: center;
    margin-bottom: 10px;
}

.work-section p {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

/* CARRUSEL */
.carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.carousel-track-container {
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.carousel-track {
    position: relative;
    width: 100%;
    min-height: 500px;
    background: #f3f3f3;
}

.carousel-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

.carousel-btn {
    background: #0d6efd;
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    transition: 0.3s ease;
}

.carousel-btn:hover {
    background: #0b5ed7;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #cfcfcf;
    cursor: pointer;
}

.dot.active {
    background: #0d6efd;
}

/* SECCIONES VACÍAS */
.empty-gallery {
    min-height: 320px;
    border: 2px dashed #d5d5d5;
    border-radius: 16px;
    background: #fafafa;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .carousel {
        gap: 8px;
    }

    .carousel-slide img {
        height: 280px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .empty-gallery {
        min-height: 220px;
    }
}

.work-grid.two-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.work-item img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

@media (max-width: 768px) {
    .work-grid.two-images {
        grid-template-columns: 1fr;
    }

    .work-item img {
        height: 260px;
    }
}

.single-work-image {
    margin-top: 25px;
}

.single-work-image img {
    width: 100%;
    max-width: 900px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 16px;
}

.video-section {
    padding: 70px 0;
}

.video-section h2 {
    text-align: center;
    margin-bottom: 25px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin-top: 0%;
    margin: 0 auto;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


.gallery {
    padding: 100px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-grid img {
    width: 100%;
    border-radius: 15px;
    transition: all 0.4s ease;
}

.gallery-grid img:hover {
    transform: scale(1.07);
}

/* ================================
   FORMULARIO MODERNO
================================ */

.contact-section {
    padding: 100px 0;
}

.contact-form {
    max-width: 600px;
    margin: auto;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #1f6feb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(31,111,235,0.2);
}

.maps-text{
    text-align: center;
    color:#ffffff;
}

.plan-badge {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-badge.standard {
  background: #e9f2ff;
  color: #0b5ed7;
}

.plan-badge.premium {
  background: #fff3cd;
  color: #9a6700;
}

.card-featured {
  border: 2px solid #d6a700;
  transform: translateY(-2px);
}

.service-list {
  padding-left: 18px;
  margin: 16px 0;
}

.price {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 20px;
}

.price span {
  font-size: 0.9rem;
  font-weight: 400;
}


/* ================================
   FOOTER MEJORADO
================================ */

.footer {
    background: #0f2c59;
    color: white;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 50px;
}

.footer a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: 0.3s;
}

.footer a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ================================
   WHATSAPP MEJORADO
================================ */

.whatsapp {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #1bce5d;
    color: white;
    font-size: 0.9rem;
    padding: 18px;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

.whatsapp:hover {
    transform: scale(1.1);
}

/* ================================
   RESPONSIVE MEJORADO
================================ */

@media(max-width: 992px) {
    .hero h1 {
        font-size: 2.3rem;
    }
}

@media(max-width: 768px) {

    .nav {
        display: none;
        background: white;
        position: absolute;
        top: 85px;
        right: 20px;
        width: 220px;
        padding: 20px;
        border-radius: 15px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    }

    .nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        padding: 120px 0;
    }

    .hero h1 {
        font-size: 1.9rem;
    }
}