/* ==========================================
   SISTEMA DE DISEÑO Y VARIABLES (VIPRECA)
   ========================================== */
:root {
    /* Paleta basada en el Logo Vipreca */
    --primary-color: #dfa837;       /* Amarillo Ocre/Dorado del logo */
    --primary-hover: #c2902b;       /* Dorado más oscuro para hover */
    --primary-light: #fdf7e9;       /* Fondo acento dorado claro */
    --gray-concrete: #706e6b;       /* Gris Cemento/Tierra del logo */
    --gray-dark: #1c1b1a;           /* Negro/Gris muy oscuro del logo */
    --gray-medium: #4a4947;         /* Gris intermedio para textos y bordes */
    --gray-light: #f5f5f3;          /* Gris claro fondo cemento */
    --white: #ffffff;
    
    /* Variables de Estilo */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 15px 35px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --max-width: 1200px;
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--white);
    color: var(--gray-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Tipografías y Títulos */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--gray-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Clases de Contenedores */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

/* ==========================================
   COMPONENTES COMUNES (BOTONES)
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--gray-dark);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(223, 168, 55, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--gray-dark);
    transform: translateY(-2px);
}

.btn-whatsapp-header {
    background-color: #25d366;
    color: var(--white);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.btn-whatsapp-header:hover {
    background-color: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-sm {
    background-color: #25d366;
    color: var(--white);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    width: 100%;
}

.btn-whatsapp-sm:hover {
    background-color: #20ba5a;
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.25);
}

.btn-maps-route {
    display: flex;
    width: 100%;
    margin-top: 1rem;
    background-color: var(--gray-concrete);
    color: var(--white);
    font-size: 0.9rem;
    border-radius: var(--border-radius);
}

.btn-maps-route:hover {
    background-color: var(--gray-dark);
}

/* ==========================================
   SECCIONES Y CABECERA (HEADER)
   ========================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* Menú de Navegación */
.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-medium);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--gray-dark);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Menú móvil toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--gray-dark);
    transition: var(--transition-smooth);
}

/* ==========================================
   SECCIÓN HERO
   ========================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding-top: 80px; /* Compensa la cabecera fija */
    color: var(--white);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding-bottom: 2rem;
}

.hero-tag {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color);
    display: block;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.hero-description {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(transparent, var(--white));
    z-index: 1;
}

/* ==========================================
   ENCABEZADO DE SECCIONES GENERAL
   ========================================== */
.section-header {
    margin-bottom: 3.5rem;
}

.section-subtitle {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto 1.5rem auto;
    border-radius: 2px;
}

.section-desc {
    max-width: 600px;
    margin: 0 auto;
    color: var(--gray-medium);
}

/* ==========================================
   SECCIÓN SOBRE NOSOTROS
   ========================================== */
.nosotros-section {
    padding: 5rem 1.5rem;
}

.nosotros-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.nosotros-info h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.nosotros-info p {
    color: var(--gray-medium);
    margin-bottom: 1.5rem;
}

.nosotros-features {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.feature-text p {
    font-size: 0.92rem;
    margin-bottom: 0;
}

/* Galería de Nosotros */
.nosotros-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.nosotros-main-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.badge-experience {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background-color: var(--gray-dark);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    border-left: 4px solid var(--primary-color);
}

.sub-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.nosotros-sub-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.img-hover-zoom {
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.img-hover-zoom:hover {
    transform: scale(1.05);
}

/* ==========================================
   SECCIÓN DE PRODUCTOS (GALERÍA)
   ========================================== */
.productos-section {
    background-color: var(--gray-light);
    padding: 6rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition-smooth);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-img-container {
    height: 200px;
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: #eaeaea;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.product-card:hover .product-img:not(.product-carousel .product-img) {
    transform: scale(1.08);
}

/* Carrusel de Productos Específicos */
.product-carousel {
    position: relative;
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-track .product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s ease-in-out;
}

.carousel-track .product-img.active {
    opacity: 1;
    z-index: 2;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background-color: rgba(28, 27, 26, 0.7);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-smooth);
}

.carousel-btn:hover {
    background-color: var(--primary-color);
    color: var(--gray-dark);
}

.carousel-btn.prev {
    left: 0.5rem;
}

.carousel-btn.next {
    right: 0.5rem;
}

.carousel-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 10;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.carousel-dots .dot.active {
    background-color: var(--primary-color);
    width: 16px;
    border-radius: 4px;
}

/* Info del Producto */
.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray-concrete);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.product-description {
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-actions {
    margin-top: auto;
}

/* ==========================================
   SECCIÓN DE PROYECTOS / OBRAS REALIZADAS
   ========================================== */
.proyectos-section {
    padding: 6rem 1.5rem;
}

.proyectos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
}

.proyecto-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.proyecto-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.proyecto-img-wrapper {
    height: 280px;
    overflow: hidden;
}

.proyecto-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.proyecto-info {
    padding: 2rem;
}

.proyecto-info h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.proyecto-info p {
    color: var(--gray-medium);
    font-size: 0.95rem;
}

/* ==========================================
   CONTACTO Y UBICACIÓN
   ========================================== */
.contacto-section {
    background-color: var(--white);
    padding: 6rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
}

.contacto-form-wrapper h3, .contacto-info-wrapper h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contacto-form-wrapper p, .contacto-info-wrapper p {
    color: var(--gray-medium);
    margin-bottom: 2rem;
}

/* Estilos de Formulario */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-form label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-dark);
}

.contact-form label .required {
    color: #e53e3e;
}

.contact-form input, .contact-form textarea {
    padding: 0.8rem 1rem;
    border: 1px solid #dcdad7;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--gray-dark);
    background-color: #fafaf9;
    transition: var(--transition-smooth);
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(223, 168, 55, 0.15);
}

.btn-submit {
    background-color: var(--gray-dark);
    color: var(--white);
    font-weight: 700;
    padding: 1rem;
    width: 100%;
}

.btn-submit:hover {
    background-color: var(--gray-concrete);
    transform: translateY(-1px);
}

.btn-submit .btn-spinner {
    display: none;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-spinner {
    display: inline-block;
}

.form-status {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    display: none;
}

.form-status.success {
    display: block;
    background-color: #e6fffa;
    color: #234e52;
    border: 1px solid #b2f5ea;
}

.form-status.error {
    display: block;
    background-color: #fff5f5;
    color: #742a2a;
    border: 1px solid #fed7d7;
}

/* Info List de Ubicación */
.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-list li {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.info-list .info-icon {
    width: 44px;
    height: 44px;
    background-color: var(--gray-light);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-concrete);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.info-text strong {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-concrete);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.info-text p {
    color: var(--gray-dark);
    margin-bottom: 0;
    font-size: 1rem;
}

/* Contenedor de Google Maps */
.map-container {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.map-container iframe {
    display: block;
}

/* ==========================================
   PIE DE PÁGINA (FOOTER)
   ========================================== */
.main-footer {
    background-color: var(--gray-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 5rem 0 2rem 0;
    font-size: 0.92rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1.2fr;
    gap: 4rem;
    margin-bottom: 3.5rem;
}

.footer-brand .footer-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1); /* Convierte el logo en blanco */
}

.footer-brand p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.footer-socials a:hover {
    background-color: var(--primary-color);
    color: var(--gray-dark);
}

.footer-links h4, .footer-products h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.footer-links ul, .footer-products ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a:hover, .footer-products a:hover {
    color: var(--white);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
}

/* ==========================================
   BOTÓN DE WHATSAPP FLOTANTE
   ========================================== */
.whatsapp-floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    box-shadow: 0 5px 25px rgba(37, 211, 102, 0.4);
    z-index: 999;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.whatsapp-floating-btn:hover {
    background-color: #20ba5a;
    transform: scale(1.1) rotate(5deg);
}

.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background-color: var(--gray-dark);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-heading);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    border-width: 5px 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent transparent var(--gray-dark);
}

.whatsapp-floating-btn:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   DISEÑO RESPONSIVO (MEDIA QUERIES)
   ========================================== */
@media (max-width: 992px) {
    .header-container {
        padding: 0.75rem 1.25rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 65px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 65px);
        background-color: var(--white);
        z-index: 998;
        transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        padding: 2rem;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        margin-top: 2rem;
    }
    
    .nav-link {
        font-size: 1.25rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Toggle animación de barras */
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Nosotros Grid */
    .nosotros-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    /* Contacto Grid */
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    /* Footer Grid */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .proyectos-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}
