/* Reset básico y tipografía */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

:root {
    --bg-dark: #1e2229;
    --bg-light: #f4f5f7;
    --accent: #ff9f1c;
    --text-dark: #333333;
    --text-light: #ffffff;
    --card-bg: #ffffff;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    text-transform: uppercase;
    color: var(--bg-dark);
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    margin: 10px auto 0 auto;
}

/* Encabezado y Navegación */
header {
    background-color: var(--bg-dark);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--accent);
}

/* Sección 1: Inicio (Hero) */
/* Sección 1: Inicio (Hero) - Balance justo de claridad */
.hero {
    /* Opacidad equilibrada a 0.58 para un balance óptimo */
    background: linear-gradient(rgba(30, 34, 41, 0.58), rgba(30, 34, 41, 0.58)), url('../images/portada.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    padding: 0 1rem;
}

/* Sombra de texto para lecturas de alta precisión */
.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
}


.btn-main {
    background-color: var(--accent);
    color: var(--bg-dark);
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
}

.btn-main:hover {
    background-color: #e08b14;
    transform: translateY(-2px);
}

/* Secciones Generales */
section {
    padding: 100px 2rem 80px 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sección 2: Nosotros */
.about {
    background-color: var(--bg-light);
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* Sección 3: Servicios */
.services {
    background-color: #f0f1f4;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.service-card {
    background-color: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-top: 4px solid var(--bg-dark);
    transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-top-color: var(--accent);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--bg-dark);
}

/* Sección 4: Contacto */
/* Sección 4: Contacto - Llamada a la Acción */
.contact {
    background-color: #f0f1f4; /* Mismo fondo gris sutil de servicios para alternar bloques */
    max-width: 100%;
    padding: 80px 2rem;
    text-align: center;
}

.contact-cta-container {
    max-width: 700px;
    margin: 0 auto;
}

.contact p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2.5rem;
}

/* Botón Alargado Horizontal Estilo WhatsApp */
.btn-whatsapp-long {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #25d366;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border-radius: 50px; /* Bordes redondeados y modernos */
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 420px; /* Controla el largo máximo en computadoras */
}

.btn-whatsapp-icon {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

.btn-whatsapp-long:hover {
    background-color: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(18, 140, 126, 0.4);
}

.btn-whatsapp-long:active {
    transform: translateY(0);
}

/* Ajustes responsivos para celulares */
@media (max-width: 768px) {
    .contact {
        padding: 60px 1.5rem;
    }
    .contact p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .btn-whatsapp-long {
        font-size: 1rem;
        padding: 0.9rem 1.5rem;
        max-width: 100%; /* Ocupa todo el ancho disponible en la pantalla del móvil */
    }
    .btn-whatsapp-icon {
        width: 20px;
        height: 20px;
    }
}


/* Pie de página moderno con datos de contacto */
footer {
    background-color: var(--bg-dark);
    color: #b0b5c0;
    padding: 3rem 2rem 2rem 2rem;
    font-size: 0.95rem;
    border-top: 2px solid #2d323e;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    flex-wrap: wrap; /* Permite que baje si no hay espacio */
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Iconos vectoriales integrados y limpios */
.footer-icon {
    width: 16px;
    height: 16px;
    fill: var(--accent); /* Color amarillo/naranja industrial para resaltar */
    flex-shrink: 0;
}

.footer-copyright {
    width: 100%;
    text-align: center;
    border-top: 1px solid #2d323e;
    padding-top: 1.5rem;
    color: #707784;
    font-size: 0.85rem;
}

/* Adaptabilidad para pantallas móviles */
@media (max-width: 768px) {
    footer {
        padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    }
    .footer-info {
        flex-direction: column; /* Apila los datos uno abajo del otro */
        gap: 1.2rem;
        align-items: flex-start; /* Los alinea a la izquierda para mejor lectura */
        max-width: 320px; /* Centra el bloque de texto en la pantalla */
        margin: 0 auto;
    }
    .footer-container {
        gap: 1.5rem;
    }
}


/* Adaptabilidad (Responsive - Mobile) */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-dark);
        box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
    }

    nav ul li {
        margin: 0.8rem 0;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    h2 {
        font-size: 2rem;
    }
}


/* Sección: Trabajos Realizados */
.portfolio {
    background-color: var(--bg-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    height: 250px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 34, 41, 0.9); /* Fondo oscuro transparente */
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-overlay h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 1.2rem;
}

.portfolio-overlay p {
    font-size: 0.9rem;
}

/* Efectos Hover (Mouse por encima) */
.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Adaptación táctil para pantallas móviles */
/* Configuración para móviles: Texto fijo debajo de la imagen limpia */
@media (max-width: 768px) {
    /* Cambiamos el comportamiento de la tarjeta */
    .portfolio-item {
        height: auto; /* Permite que la tarjeta estire verticalmente para contener el texto */
        background-color: var(--card-bg); /* Fondo blanco para el bloque de texto */
        display: flex;
        flex-direction: column; /* Apila la imagen arriba y el texto abajo */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    }

    /* Forzamos a la imagen a ocupar una altura fija arriba */
    .portfolio-item img {
        height: 200px;
        width: 100%;
        object-fit: cover;
    }

    /* Quitamos el comportamiento flotante y lo volvemos un bloque de texto normal */
    .portfolio-overlay {
        position: relative; /* Ya no flota sobre la imagen */
        opacity: 1; /* Es visible directamente sin tocar la pantalla */
        background: none; /* Eliminamos el fondo oscuro */
        width: 100%;
        height: auto;
        padding: 1.2rem 1rem;
        display: block; /* Diseño estándar de bloque */
        text-align: left; /* Alineación limpia a la izquierda para celulares */
    }

    /* Estilos de los textos en la nueva ubicación */
    .portfolio-overlay h3 {
        color: var(--bg-dark); /* Texto oscuro para que se lea sobre el fondo blanco */
        font-size: 1.15rem;
        margin-bottom: 0.4rem;
        text-shadow: none; /* Quitamos sombras innecesarias */
    }

    .portfolio-overlay p {
        color: #555555; /* Gris intermedio para la descripción */
        font-size: 0.9rem;
        text-shadow: none;
    }

    /* Desactivamos los efectos de zoom al tocar en celular para evitar saltos raros */
    .portfolio-item:active img {
        transform: none;
    }
}



/* Botón Flotante de WhatsApp */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

/* Configuración del vector interno */
.whatsapp-icon {
    width: 34px;
    height: 34px;
    fill: #ffffff; /* Color blanco absoluto */
}

.whatsapp-btn:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* Animación de atención */
@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Adaptabilidad para pantallas de teléfonos */
@media (max-width: 480px) {
    .whatsapp-btn {
        bottom: 15px;
        right: 15px;
        width: 52px;
        height: 52px;
    }
    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }
}


/* Sección Exclusiva para Frase con Textura de Chapa */
.phrase-section {
    max-width: 100%;
    padding: 90px 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 4px solid var(--accent);
    border-bottom: 4px solid var(--accent);
    
    /* Base de color gris oscuro metálico */
    background-color: #242933; 
    
    /* Textura matemática de metal desplegado / chapa industrial */
    background-image: 
        linear-gradient(135deg, #1c2026 25%, transparent 25%), 
        linear-gradient(225deg, #1c2026 25%, transparent 25%), 
        linear-gradient(45deg, #1c2026 25%, transparent 25%), 
        linear-gradient(315deg, #1c2026 25%, #242933 25%);
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-size: 20px 20px;
    
    /* Sombra interna para darle profundidad al metal */
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8); 
}

.phrase-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    /* Fondo semi-transparente detrás de la frase para garantizar legibilidad perfecta */
    background: rgba(15, 17, 22, 0.85); 
    padding: 2.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.highlight-phrase {
    color: var(--accent);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 1px;
    /* Efecto de relieve metálico en el texto */
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.9); 
}

/* Ajustes adaptables para celulares */
@media (max-width: 768px) {
    .phrase-section {
        padding: 60px 1rem;
    }
    .phrase-container {
        padding: 1.5rem 1rem;
    }
    .highlight-phrase {
        font-size: 1.35rem;
        line-height: 1.3;
        letter-spacing: 0.5px;
    }
}

.contenido-single {
    max-width: 100%;
}

.entry-header {
    padding: 60px 20px 30px;
}

.entry-title {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 15px;
}

.entry-meta {
    color: #666;
    margin-bottom: 20px;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-content {
    max-width: 900px;
    margin: 50px auto;
    line-height: 1.8;
}

.entry-content h2 {
    margin-top: 50px;
}

.related-posts {
    margin-top: 80px;
    margin-bottom: 80px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 30px;
}

.related-item img {
    width: 100%;
    height: auto;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 50px auto;
}

.blog-home {
    padding: 80px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 30px;
}

.blog-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.blog-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.blog-card h3 {
    padding: 15px;
    font-size: 22px;
}

.blog-card p {
    padding: 0 15px 15px;
    flex-grow: 1;
}

.btn-leer {
    display: inline-block;
    margin: 0 15px 20px;
}


/* TABLET */

@media (max-width: 992px) {

    .blog-grid,
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .entry-title {
        font-size: 34px;
    }

}

/* MOBILE */

@media (max-width: 768px) {

    .blog-home {
        padding: 50px 0;
    }

    .blog-grid,
    .related-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .blog-card,
    .related-item {
        width: 100%;
        box-shadow: 0 4px 15px rgba(0,0,0,.08);
    }

    .blog-card img,
    .related-item img {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        object-fit: cover;
    }

    .entry-header {
        padding: 40px 15px 20px;
    }

    .entry-title {
        font-size: 28px;
        line-height: 1.3;
    }

    .entry-content {
        margin: 30px auto;
        padding: 0 15px;
    }

    .post-navigation {
        flex-direction: column;
        gap: 15px;
    }

}

/* MOBILE PEQUEÑO */

@media (max-width: 480px) {

    .entry-title {
        font-size: 24px;
    }

    .blog-card h3,
    .related-item h3 {
        font-size: 20px;
    }

    .entry-content {
        line-height: 1.7;
    }

}

.blog-cta {
    margin-top: 50px;
    padding: 50px 30px;
    text-align: center;
    border-radius: 12px;
    background: #f5f5f5;
}

.blog-cta h3 {
    margin-bottom: 15px;
    font-size: 32px;
}

.blog-cta p {
    max-width: 700px;
    margin: 0 auto 25px;
    line-height: 1.7;
}

.btn-blog {
    display: inline-block;
    padding: 15px 35px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all .3s ease;
}

.btn-blog:hover {
    transform: translateY(-3px);
}