﻿/* ==========================================================================
   OBRANEX SOLUTIONS - HOJA DE ESTILOS COMPLETA (styles.css)
   ========================================================================== */

/* --- PALETA DE COLORES Y VARIABLES CORPORATIVAS --- */
:root {
    --primary-blue: #0F3375;      /* Azul Marino Principal (Branding / Headers) */
    --secondary-blue: #1C53A3;    /* Azul Secundario (Gradients / Acentos) */
    --accent-orange: #E8631C;     /* Naranja Vibrante (Botones / Highlights) */
    --orange-hover: #D0520F;      /* Naranja Oscuro (Hover en Botones) */
    --bg-light: #F8F9FA;          /* Gris Claro (Fondos Secundarios) */
    --text-dark: #222222;          /* Texto Principal */
    --text-muted: #666666;        /* Texto Secundario */
    --white: #FFFFFF;             /* Blanco */
    --border-color: #E2E8F0;     /* Bordes Suaves */
}

/* --- RESET BÁSICO --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
}

/* ==========================================================================
   HEADER CON MENÚ DESPLEGABLE (SIEMPRE ACTIVO EN CUALQUIER PANTALLA)
   ========================================================================== */

header {
    background-color: var(--primary-blue);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Ocultamos el checkbox técnico */
#menu-toggle {
    display: none;
}

/* Botón de las 3 Rayas (Visible siempre) */
.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 22px;
    cursor: pointer;
    z-index: 1001;
}

.menu-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Menú oculto por defecto */
.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    width: 260px; /* Ancho fijo elegante para pantalla grande y chica */
    background-color: var(--primary-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    gap: 1.2rem;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: 8px;
    
    /* Animación de despliegue */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.3s ease;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-orange);
}

/* Cuando se le da clic a las 3 rayas: Despliega el menú */
#menu-toggle:checked ~ .nav-links {
    max-height: 300px;
    padding: 1.5rem 0;
}

/* Animación que convierte las 3 rayas en una 'X' al abrir */
#menu-toggle:checked ~ .menu-icon span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}
#menu-toggle:checked ~ .menu-icon span:nth-child(2) {
    opacity: 0;
}
#menu-toggle:checked ~ .menu-icon span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* ==========================================================================
   HEADER Y LOGO CENTRADO
   ========================================================================== */

header {
    background-color: var(--primary-blue);
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 70px; /* Mantiene una altura fija y limpia para la barra */
}

/* --- CENTRADO DEL LOGO Y NOMBRE --- */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    
    /* Centrado perfecto en el header */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Tamaño controlado del logo (Ajusta este valor si lo quieres más grande/chico) */
.brand-logo {
    height: 48px;        
    width: auto;
    object-fit: contain;
}

/* Tamaño y estilo del texto */
.brand-name {
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    white-space: nowrap;
}

.brand-name span {
    color: var(--accent-orange, #ff6b00);
}

/* --- MENÚ HAMBURGUESA A LA DERECHA --- */
#menu-toggle {
    display: none;
}

.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    margin-left: auto; /* Empuja las 3 rayas a la derecha */
}

.menu-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* MENÚ DESPLEGABLE */
.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    background-color: var(--primary-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    gap: 1.2rem;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.3s ease;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-orange, #ff6b00);
}

/* Acciones al abrir */
#menu-toggle:checked ~ .nav-links {
    max-height: 300px;
    padding: 1.5rem 0;
}

#menu-toggle:checked ~ .menu-icon span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
#menu-toggle:checked ~ .menu-icon span:nth-child(2) {
    opacity: 0;
}
#menu-toggle:checked ~ .menu-icon span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* --- BANNER PRINCIPAL (HERO) --- */
.hero {
    background: linear-gradient(135deg, rgba(15, 51, 117, 0.9), rgba(28, 83, 163, 0.8)), 
                url('https://images.unsplash.com/photo-1541888946425-d0fbb186a5b3?auto=format&fit=crop&w=1200&q=80') center/cover;
    color: var(--white);
    text-align: center;
    padding: 5rem 1rem;
}

.hero h1 {
    font-size: 2.0rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* --- BOTÓN DE ACCIÓN GENERAL (CTA) --- */
.btn-cta {
    background-color: var(--accent-orange);
    color: var(--white);
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    display: inline-block;
    transition: background 0.3s ease;
}

.btn-cta:hover {
    background-color: var(--orange-hover);
}

/* --- SECCIÓN TITULOS GENERALES --- */
.section-title {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--text-muted);
    font-size: 1rem;
    text-align: center;
}

/* --- SECCIÓN NUESTRA FILOSOFÍA (MISIÓN, VISIÓN, VALORES) --- */
.philosophy {
    padding: 4rem 5%;
    background-color: var(--white);
}

.mvv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.mvv-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: left;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.mvv-card:hover {
    box-shadow: 0 8px 15px rgba(15, 51, 117, 0.1);
    transform: translateY(-3px);
}

.mvv-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.mvv-card h3 {
    color: var(--primary-blue);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.mvv-card p {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.values-list {
    list-style: none;
    padding: 0;
}

.values-list li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.values-list strong {
    color: var(--accent-orange);
}

/* ==========================================================================
   RESTRUCTURACIÓN COMPLETA DE SERVICIOS (GRID LIMPIO Y CUADRADO)
   ========================================================================== */

.services-section {
    padding: 3rem 5%;
    background-color: #ffffff;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.section-title h2 {
    color: #0d3b66;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #555555;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

/* Grilla responsive que sustituye cualquier carrusel colapsado */
.services-grid {
  display: grid;
  /* Cambia el minmax a 350px o 400px para tarjetas más grandes */
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); 
  gap: 30px; /* Aumenta la distancia entre tarjetas */
  padding: 20px;
}

/* Estilo de Tarjeta */
.service-card {
  background: #F8F9FC;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  width: 100%;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Carrusel y Galería de Imágenes (Más Grandes) */
.service-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
  height: 320px; /* Aumenta este número si quieres las fotos aún más altas */
  background-color: #f0f0f0;
}

.service-gallery img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  object-fit: contain; /* Para que la imagen se vea completa sin recortar */
}

/* Línea naranja arriba del título de cada servicio */
.service-card h3 {
  border-top: 4px solid #E35325; /* Línea naranja */
  padding: 15px 10px;
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
  color: #1a2b4c;
}
/* --- CONTACTO Y REDES SOCIALES --- */
.contact {
    padding: 4rem 5%;
    text-align: center;
    background-color: var(--bg-light);
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background-color: #25D366;
    color: var(--white);
    padding: 0.8rem 1.8rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #1EBE5D;
}

.btn-call {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 0.8rem 1.8rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-call:hover {
    background-color: var(--secondary-blue);
}

/* Redes Sociales */
.social-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.social-section h3 {
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.4rem;
    border-radius: 25px;
    text-decoration: none;
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.social-btn.facebook {
    background-color: #1877F2;
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* --- FOOTER --- */
footer {
    background-color: var(--primary-blue);
    color: var(--white);
    text-align: center;
    padding: 1.2rem 1rem;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
/* --- BANNER DE CERTIFICACIONES CONOCER --- */
.certification-badge {
    background-color: #f8f9fa;
    border-left: 5px solid #0f3375; /* O el color primario de Obranex */
    padding: 1.2rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.8rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.certification-badge p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dark, #333);
}

.certification-badge strong {
    color: #0f3375;
}
/* --- ESPACIADO ENTRE SECCIONES Y APARTADOS --- */

/* Margen superior para cada bloque principal de la galería */
.gallery-category {
    margin-bottom: 4rem; /* Espacio amplio antes del siguiente apartado */
}

/* Espaciado para los títulos principales (ej. Impermeabilización) */
.category-title {
    margin-top: 3.5rem;   /* Separa el título de las fotos superiores */
    margin-bottom: 1.5rem; /* Separa el título del subtítulo o de las imágenes */
    padding-top: 1rem;
}

/* Espaciado para subtítulos (ej. Membrana Asfáltica, Teja de Concreto) */
.subcategory-title {
    margin-top: 2.5rem;   /* Despega el subtítulo de las fotos de arriba */
    margin-bottom: 1.2rem; /* Separa el subtítulo de sus propias imágenes */
}
/* ==========================================================================
   1. HERO SECTION CON IMAGEN DE FONDO Y OVERLAY AZUL
   ========================================================================== */

.hero-section {
    /* Fondo con imagen + capa azul transparente para mantener legibilidad */
    background: linear-gradient(rgba(10, 40, 90, 0.82), rgba(10, 40, 90, 0.82)),
                url('imagenP1.jpeg') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
    padding: 4rem 1.5rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Listas de puntos y palomitas centradas */
.hero-services, .hero-guarantees {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    font-size: 1.1rem;
}

.hero-guarantees {
    font-weight: 600;
}

/* ==========================================================================
   2. RECUADROS DE MISIÓN Y VISIÓN (#F8F9FC Y CENTRADOS)
   ========================================================================== */

.philosophy-section {
    text-align: center;
    padding: 3.5rem 5%;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.philosophy-card {
    background-color: #F8F9FC; /* Color de fondo solicitado por el cliente */
    border-radius: 12px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center; /* Todo el texto centrado */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.philosophy-card h3 {
    color: var(--primary-blue, #0d3b66);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.philosophy-card p {
    color: var(--text-dark, #333);
    line-height: 1.6;
    margin: 0;
}
/* BOTÓN DE COTIZA TU PROYECTO */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-orange, #ff6b00); /* Color naranja */
    color: #ffffff !important;                      /* Texto blanco */
    padding: 0.8rem 2rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 1.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: #e05e00;
    transform: translateY(-2px);
}
/* Activa el carrusel horizontal en las tarjetas */
.service-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 8px;
  border-radius: 8px;
}

.service-gallery img {
  flex: 0 0 100%;
  scroll-snap-align: start;
  object-fit: cover;
  height: 200px;
}
/* --- 1. LÍNEA NARANJA --- */
.header-with-orange-line {
  border-bottom: 5px solid #FF8C00; /* Línea naranja de 5px */
}

/* --- 2. TAMAÑO DE TARJETAS Y CONTENEDOR (Más grandes) --- */
.services-container {
  display: flex;
  flex-wrap: wrap; /* Para que se acomoden si son muchos */
  gap: 20px; /* Espacio entre tarjetas */
  justify-content: center; /* Centrar las tarjetas */
  margin-top: 30px;
}

.service-card.large-card {
  width: 320px; /* Aumentamos el ancho de la tarjeta (antes aprox 200px) */
  margin-bottom: 20px;
  background-color: #F0F0F0; /* Color de fondo gris claro uniforme */
  border-radius: 10px;
  overflow: hidden; /* Para que el carrusel no se salga */
  text-align: center;
}

/* Títulos más grandes para acompañar */
/* --- TÍTULOS Y LÍNEA NARANJA --- */
.service-card h3 {
  border-top: 4px solid #E35325; /* Línea naranja divisoria */
  padding: 15px 10px;
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
  color: #1a2b4c;
  background-color: #ffffff;
}

/* --- GALERÍA CARRUSEL UNIFORME Y MÁS GRANDE --- */
.service-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
  height: 320px; /* Tamaño amplio para que luzcan las fotos */
  background-color: #f0f0f0;
}

.service-gallery img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  object-fit: contain; /* Muestra la foto completa sin recortar */
}
.service-detail {
  font-size: 0.9rem;
  color: #555555;
  padding: 0 15px 15px 15px;
  text-align: center;
  margin: 0;
}
/* Alineación de iconos dentro de botones */
.btn i, .btn-social i {
    margin-right: 8px; /* Separación entre el logo y el texto */
    font-size: 1.2rem;  /* Tamaño del logo */
    vertical-align: middle;
}

/* Opcional: asegurarte de que el flex los centre perfectamente */
.btn, .btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Estilo para que la ubicación en el footer se vea blanca y resalte al pasar el cursor */
.footer-map-link {
    color: #ffffff;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.footer-map-link:hover {
    opacity: 0.8;
}
/* Espaciado para el subtítulo de redes sociales */
.social-section h4 {
    margin-bottom: 25px; /* Ajusta este valor si quieres aún más o menos espacio */
}
/* ==========================================================================
   CORRECCIONES PARA MÓVIL (RESPONSIVE)
   ========================================================================== */

/* 1. Evitar que iOS vuelva azul el teléfono o enlaces del footer */
.footer a, 
.footer-phone, 
.footer-map-link,
footer a[href^="tel:"] {
    color: #ffffff !important;
    text-decoration: underline;
    -webkit-text-fill-color: #ffffff !important; /* Fuerza color en Safari/iPhone */
}

/* 2. Ajuste del Header en pantallas de celular (menos de 480px) */
@media (max-width: 480px) {
    /* Reducir el tamaño de la letra del logo para que no choque */
    .brand-name {
        font-size: 0.95rem !important; 
    }

    /* Reducir ligeramente el logo si es necesario */
    .brand-logo {
        height: 28px !important;
        width: auto;
    }

    /* Reducir el padding del header para darle más espacio horizontal */
    header {
        padding: 0.8rem 3% !important;
    }

    /* Asegurar que el logo y el nombre tengan margen a la derecha antes del menú */
    .logo-container {
        max-width: calc(100% - 45px); /* Deja espacio reservado para las 3 líneas */
        overflow: hidden;
    }
}
/* ==========================================================================
   CORRECCIÓN DE DESBORDAMIENTO Y CENTRADO EN MÓVIL
   ========================================================================== */

/* 1. Previene que cualquier elemento se salga de la pantalla en móvil */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* 2. Asegura que el Header azul ocupe el 100% exacto del ancho */
header {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
}

/* 3. Centra las tarjetas de servicios en pantallas pequeñas */
@media (max-width: 768px) {
    .services-section {
        padding: 2rem 15px !important; /* Espaciado uniforme a los lados */
    }

    .services-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* Centra las tarjetas al medio */
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }

    .service-card {
        width: 100% !important;
        max-width: 340px !important; /* Ancho cómodo y alineado en teléfono */
        margin: 0 auto !important; /* Centra cada tarjeta */
    }

    .service-img-container {
        width: 100% !important;
    }

    .service-img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
}