/* ==========================================================================
   HOJA DE ESTILOS PROFESIONAL - ESTUDIO REFORMAS
   ========================================================================== */

/* Variables de Entorno - Paleta Sobria y Corporativa */
:root {
    --color-dark-primary: #111111;   /* Negro puro para encabezados principales y secciones oscuras */
    --color-dark-secondary: #222222; /* Gris muy oscuro para texto principal y componentes */
    --color-text-muted: #555555;     /* Gris medio para descripciones y textos secundarios */
    --color-bg-light: #ffffff;       /* Fondo blanco puro */
    --color-bg-alt: #f8f9fa;         /* Fondo alternativo gris claro sutil */
    --color-border: #e5e5e5;         /* Bordes limpios y discretos */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
}

/* Reseteo Estructural y Consistencia */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-light);
    color: var(--color-dark-secondary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

/* Contenedores Universales */
.section-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 0;
}

/* ==========================================================================
   COMPONENTES: BOTONES
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-dark-primary);
    color: var(--color-bg-light);
}

.btn-primary:hover {
    background-color: #333333;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-bg-light);
    border-color: var(--color-bg-light);
}

.btn-secondary:hover {
    background-color: var(--color-bg-light);
    color: var(--color-dark-primary);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
    padding: 1rem;
}

/* ==========================================================================
   DISEÑO ESTRUCTURAL: ENCABEZADO & NAVEGACIÓN
   ========================================================================== */
.main-header {
    background-color: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.brand-logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--color-dark-primary);
}

.logo-sub {
    font-weight: 300;
    color: #666666;
    margin-left: 2px;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-dark-secondary);
}

.nav-link:hover {
    color: #666666;
}

.nav-btn {
    background-color: var(--color-dark-primary);
    color: var(--color-bg-light) !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--border-radius-sm);
}

.nav-btn:hover {
    background-color: #333333;
}

/* ==========================================================================
   SECCIÓN HERO
   ========================================================================== */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 85vh;
    display: flex;
    align-items: center;
    color: var(--color-bg-light);
    padding: 4rem 0;
}

.hero-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    max-width: 750px;
    margin-left: max(0px, calc((100vw - 1200px) / 2));
}

.hero-subtitle {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.75rem);
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-text {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   ENCABEZADOS DE SECCIÓN UNIVERSALES
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #777777;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-dark-primary);
    letter-spacing: -0.5px;
}

.title-line {
    width: 50px;
    height: 3px;
    background-color: var(--color-dark-primary);
    margin: 1rem auto 0 auto;
}

/* ==========================================================================
   SECCIÓN: SERVICIOS (GRID DINÁMICO)
   ========================================================================== */
.services-section {
    background-color: var(--color-bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
    border-color: #cccccc;
}

.card-image-wrapper {
    height: 240px;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.service-card:hover .card-img {
    transform: scale(1.05);
}

.card-content {
    padding: 2rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-dark-primary);
}

.card-text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   SECCIÓN: PORTAFOLIO (GALERÍA PROFESIONAL)
   ========================================================================== */
.portfolio-section {
    background-color: var(--color-bg-alt);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    height: 380px;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 100%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 2.5rem;
    transition: var(--transition-smooth);
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.04);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.project-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #bbbbbb;
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.project-title {
    color: var(--color-bg-light);
    font-size: 1.35rem;
    font-weight: 700;
}

/* ==========================================================================
   SECCIÓN: NUESTRO PROCESO
   ========================================================================== */
.process-section {
    background-color: var(--color-bg-light);
    border-bottom: 1px solid var(--color-border);
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.process-step {
    position: relative;
}

.step-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: #e5e5e5;
    line-height: 1;
    margin-bottom: 1rem;
}

.step-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-dark-primary);
}

.step-text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   SECCIÓN: CONTACTO & FORMULARIO DE ALTA GAMA
   ========================================================================== */
.contact-section {
    background-color: var(--color-bg-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 4rem;
    align-items: start;
}

.contact-side-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-dark-primary);
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
}

.contact-side-text {
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.info-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--color-dark-primary);
    padding-left: 1rem;
}

.info-item strong {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #777777;
    margin-bottom: 0.25rem;
}

.info-item span {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-dark-secondary);
}

/* Formulario Estilizado */
.professional-form {
    background-color: var(--color-bg-alt);
    padding: 3rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group-row {
    display: flex;
    gap: 1.5rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-dark-primary);
}

.form-input {
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border: 1px solid #cccccc;
    border-radius: var(--border-radius-sm);
    background-color: var(--color-bg-light);
    color: var(--color-dark-secondary);
    transition: var(--transition-smooth);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-dark-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   PIE DE PÁGINA (FOOTER)
   ========================================================================== */
.main-footer {
    background-color: var(--color-dark-primary);
    color: var(--color-bg-light);
    border-top: 1px solid #222222;
}

.footer-content {
    padding: 4rem 0 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.footer-logo {
    color: var(--color-bg-light);
}

.footer-tagline {
    font-size: 0.95rem;
    color: #888888;
    margin-top: 0.5rem;
}

.footer-bottom {
    width: 100%;
    border-top: 1px solid #222222;
    padding-top: 2rem;
    margin-top: 1rem;
}

.copyright-text {
    font-size: 0.85rem;
    color: #666666;
}

/* ==========================================================================
   DISEÑO RESPONSIVO (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-container {
        margin-left: auto;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .nav-menu {
        display: none; /* En producción se integraría un menú hamburguesa JavaScript */
    }
    
    .form-group-row {
        flex-direction: column;
        gap: 0;
    }
    
    .section-container {
        padding: 3.5rem 0;
    }
    
    .professional-form {
        padding: 2rem;
    }
}

/* Estilos para el enlace de WhatsApp */
.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Separación entre el icono y el texto */
    color: #25D366; /* Verde oficial de WhatsApp */
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.whatsapp-icon {
    width: 20px;
    height: 20px;
}

/* Efecto al pasar el cursor (Hover) */
.whatsapp-link:hover {
    color: #128C7E; /* Verde más oscuro al hacer hover */
    transform: translateX(4px); /* Pequeño desplazamiento a la derecha */
}

/* ==========================================================================
   BOTÓN FLOTANTE FIJO DE WHATSAPP
   ========================================================================== */
.whatsapp-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #25D366; /* Verde oficial de WhatsApp */
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1.6rem;
    border-radius: 50px; /* Estilo píldora */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 9999; /* Asegura que se mantenga por encima de cualquier capa */
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
}

.wa-floating-icon {
    width: 22px;
    height: 22px;
}

/* Efectos de Interacción (Hover) */
.whatsapp-floating-btn:hover {
    background-color: #128C7E; /* Tono más oscuro corporativo */
    transform: translateY(-4px); /* Efecto de elevación suave */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Adaptación para Dispositivos Móviles */
@media (max-width: 576px) {
    .whatsapp-floating-btn {
        bottom: 16px;
        right: 16px;
        padding: 0.75rem 1.25rem;
        font-size: 0.88rem;
        gap: 8px;
    }
    
    .wa-floating-icon {
        width: 18px;
        height: 18px;
    }
}