/* =========================================
   VARIABLES & RESET
   ========================================= */
:root {
    --primary: #083749; /* Nuevo Azul Petróleo de la marca */
    --accent: #d2b8a1;  /* Color arena/dorado suave */
    --text: #4a4a4a;    /* Gris oscuro para lectura */
    --bg: #ffffff;      /* Blanco puro */
    --serif: 'Playfair Display', serif;
    --sans: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* FIX GLOBAL: Evita el scroll lateral indeseado en celulares */
html, body {
    overflow-x: hidden; 
    width: 100%;
    position: relative;
}

body {
    font-family: var(--sans);
    color: var(--primary);
    line-height: 1.6;
    background-color: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   HEADER & NAV
   ========================================= */
.header {
    height: 90px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    position: sticky; 
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 55px; 
    width: auto;  
    display: block; 
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* =========================================
   COMPONENTES (BOTONES)
   ========================================= */
.btn {
    padding: 14px 32px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 50px;
    
    /* CORRECCIONES NUEVAS: */
    text-align: center;       /* Centra el texto "Pedir Presupuesto" */
    box-sizing: border-box;   /* Evita que el padding agrande el botón y lo corte */
    max-width: 100%;          /* Asegura que nunca sea más ancho que la pantalla */
}

.btn-primary { 
    background: var(--primary); 
    color: white; 
    margin-right: 15px;
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: #062a38; 
    border-color: #062a38;
}

.btn-secondary { 
    border: 2px solid var(--primary); 
    color: var(--primary); 
    background: transparent;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}
/* =========================================
   HERO SECTION (HOME)
   ========================================= */
.hero {
    position: relative; 
    overflow: hidden;   
    padding: 100px 0;
    min-height: 85vh;   
    display: flex;
    align-items: center;
    background: #1a1a1a; 
}

.hero-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; 
    transition: opacity 2s ease-in-out; 
}

.slide.active { opacity: 1; }

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 55, 73, 0.6); 
    z-index: 2; 
}

.hero-content {
    position: relative;
    z-index: 3; 
}

.subtitle {
    display: block;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 30px;
    max-width: 900px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    color: #f0f0f0;
    max-width: 600px;
    margin-bottom: 40px;
    font-weight: 400;
}

.hero .btn-secondary {
    border-color: #ffffff;
    color: #ffffff;
}

.hero .btn-secondary:hover {
    background: #ffffff;
    color: var(--primary);
}

/* =========================================
   SECCIÓN SERVICIOS
   ========================================= */
.services { padding: 100px 0; }

.section-title { margin-bottom: 60px; }
.section-title span { 
    color: var(--accent); 
    font-family: var(--serif); 
    font-style: italic; 
    display: block;
    font-size: 1.2rem;
}
.section-title h2 { 
    font-family: var(--serif); 
    font-size: 2.5rem; 
    color: var(--primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px;
    background-color: #e5e5e5; 
    border: 1px solid #e5e5e5;
}

.service-card {
    background: white;
    padding: 50px 30px;
    transition: 0.4s;
}

.service-card h3 { 
    font-family: var(--serif); 
    margin-bottom: 15px; 
    font-size: 1.4rem;
    color: var(--primary);
}

.service-card p { color: var(--text); font-weight: 300; }

.service-card.highlighted { 
    background: #fcfcfc; 
    position: relative;
}

.service-card.highlighted::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: var(--accent);
}

.service-card:hover { 
    background: #fff; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    z-index: 2;
    transform: translateY(-5px);
}

/* Tarjeta Full Width (Llave en Mano) */
.service-card.full-width {
    grid-column: 1 / -1; 
    display: flex;       
    padding: 0;          
    overflow: hidden;    
    background: #f8f9fa; 
    min-height: 350px;   
}

.card-content {
    flex: 1; 
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-content h3 {
    font-size: 2rem; 
    margin-bottom: 20px;
    color: var(--primary);
}

.card-content p {
    font-size: 1.1rem;
    max-width: 500px;
}

.link-arrow {
    margin-top: 20px;
    text-decoration: none;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.card-image {
    flex: 1.5; 
    background-size: cover;
    background-position: center;
    min-height: 300px;
}

/* =========================================
   PÁGINAS INTERNAS (SERVICIOS)
   ========================================= */
.header-internal { background: #fff; }

.back-link {
    text-decoration: none;
    color: var(--text);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
}

.service-hero {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.tag {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 700;
    background: rgba(210, 184, 161, 0.1); 
    padding: 5px 10px;
    border-radius: 20px;
}

.service-hero h1 {
    font-family: var(--serif);
    font-size: 3rem;
    margin: 20px 0;
    color: var(--primary);
}

.mb-large { margin-bottom: 50px !important; }

.img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #e0e0e0;
    border-radius: 12px; 
    overflow: hidden;
}

.service-details { padding: 100px 0; }

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.detail-item h3 {
    font-family: var(--serif);
    font-size: 1.8rem;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    color: var(--primary);
}

.detail-item ul { list-style: none; }

.detail-item li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text);
}

.detail-item li::before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    margin-right: 10px;
}

/* =========================================
   SECCIÓN CONTACTO & FORMULARIO
   ========================================= */
.contact-section { 
    padding: 100px 0; 
    border-top: 1px solid #f0f0f0; 
}

.form-group { margin-bottom: 20px; }

input, textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #e0e0e0;
    font-family: var(--sans);
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
    background: #fcfcfc;
    border-radius: 8px; 
    color: var(--primary);
}

input:focus, textarea:focus { 
    border-color: var(--primary); 
    background: #fff;
}

.contact-info {
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
}

.info-block h3 {
    font-family: var(--serif);
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--accent);
}

.info-block p, .info-block a {
    color: var(--text);
    font-size: 1.05rem;
}

.social-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.social-link:hover { border-bottom-color: var(--accent); }

.status-msg {
    margin-top: 20px;
    padding: 15px;
    display: none;
    font-size: 0.9rem;
    border-radius: 8px;
}
.status-msg.success {
    display: block;
    background: #edf7ed;
    color: #1e4620;
    border: 1px solid #c8e6c9;
}
.status-msg.error {
    display: block;
    background: #fdeded;
    color: #5f2120;
    border: 1px solid #f5c6cb;
}

/* =========================================
   CTA FINAL (Llamado a la acción)
   ========================================= */
.cta-section {
    background: var(--primary); 
    color: white;
    padding: 100px 0;
    text-align: center;
}

.cta-section h2 {
    font-family: var(--serif);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-section p {
    margin-bottom: 40px;
    opacity: 0.9;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn-secondary {
    border-color: white;
    color: white;
}
.cta-section .btn-secondary:hover {
    background: white;
    color: var(--primary);
}

/* =========================================
   PÁGINA EMPRESA (ABOUT US)
   ========================================= */

.about-hero {
    padding: 100px 0 60px;
    text-align: center;
    background-color: #fcfcfc;
}

.about-hero h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--primary);
    max-width: 900px;
    margin: 20px auto 0;
}

.about-split {
    display: flex;
    align-items: center;
    gap: 80px;
    padding: 80px 24px;
}

.about-content { flex: 1; }

.about-content h3 {
    font-family: var(--serif);
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 30px;
}

.about-content p {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.8;
}

.highlight-text {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--primary);
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    margin-top: 30px;
}

.about-image { flex: 1; }

.img-frame {
    width: 100%;
    height: 500px; 
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    box-shadow: 20px 20px 0px var(--accent); 
}

/* Sección de Valores */
.values-section {
    padding: 100px 0;
    background-color: #fff;
    border-top: 1px solid #f0f0f0;
}

.text-center { text-align: center; }

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    margin-top: 60px;
}

.value-card {
    text-align: left;
    padding: 30px;
    transition: 0.3s;
    border: 1px solid transparent;
}

.value-card:hover {
    border-color: #eee;
    background: #fdfdfd;
}

.value-number {
    font-family: var(--serif);
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.4;
    margin-bottom: 10px;
    line-height: 1;
}

.value-card h3 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* =========================================
   DROPDOWN & FOOTER
   ========================================= */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 250px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1000;
    top: 100%; 
    left: 0;
    border-top: 3px solid var(--accent); 
    padding: 10px 0;
    border-radius: 0 0 8px 8px;
}

.dropdown-content a {
    color: var(--primary);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    text-transform: none; 
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s;
}

.dropdown-content a:last-child { border-bottom: none; }

.dropdown-content a:hover {
    background-color: #f9f9f9;
    color: var(--accent);
    padding-left: 25px; 
}

.dropdown:hover .dropdown-content { display: block; }

.dropbtn { cursor: pointer; }

/* Footer Premium */
.main-footer {
    background-color: var(--primary); 
    color: #ffffff;
    padding: 80px 0 30px;
    margin-top: auto; 
}

.footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; 
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    padding-bottom: 60px;
    margin-bottom: 30px;
    gap: 40px;
}

.footer-brand {
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    height: 70px; 
    width: auto;
    display: block;
}

.footer-data {
    display: flex;
    gap: 60px; 
}

.data-item h4 {
    font-family: var(--serif);
    color: var(--accent); 
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.data-item p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8); 
}

.data-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: 0.3s;
}

.data-item a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* =========================================
   PÁGINA PORTFOLIO
   ========================================= */

.portfolio-header {
    padding: 80px 0 40px;
    background-color: #fcfcfc;
    text-align: center;
}

.portfolio-header h1 {
    font-family: var(--serif);
    font-size: 3rem;
    color: var(--primary);
    margin: 10px 0;
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    border: 1px solid #ddd;
    background: transparent;
    padding: 10px 25px;
    border-radius: 50px; 
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.9rem;
    transition: 0.3s;
    color: var(--text);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 30px;
    padding-bottom: 100px;
}

.portfolio-item {
    position: relative;
    height: 350px; 
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
}

.portfolio-item.hide { display: none; }
.portfolio-item.show { animation: fadeIn 0.5s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.portfolio-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 55, 73, 0.85); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0; 
    transition: opacity 0.3s ease;
    padding: 20px;
}

.portfolio-overlay h3 {
    color: white;
    font-family: var(--serif);
    font-size: 1.5rem;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.portfolio-overlay p {
    color: var(--accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s; 
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1); 
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1; 
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0); 
}

/* =========================================
   PÁGINA DE CONTACTO (Split Layout)
   ========================================= */

.contact-split-layout {
    display: flex;
    min-height: calc(100vh - 90px); 
}

.contact-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background-color: #ffffff;
}

.form-wrapper {
    width: 100%;
    max-width: 550px;
}

.form-wrapper h1 {
    font-family: var(--serif);
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
    margin-top: 10px;
}

.intro-text {
    color: var(--text);
    margin-bottom: 40px;
    font-size: 1rem;
}

.premium-form .form-group { margin-bottom: 25px; }

.premium-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-form input, 
.premium-form textarea {
    width: 100%;
    padding: 15px 0; 
    border: none;
    border-bottom: 1px solid #ccc; 
    background: transparent;
    border-radius: 0;
    font-family: var(--sans);
    font-size: 1rem;
    transition: 0.3s;
}

.premium-form input:focus, 
.premium-form textarea:focus {
    border-bottom-color: var(--primary);
    outline: none;
}

.input-row {
    display: flex;
    gap: 30px;
}

.input-row .form-group { flex: 1; }

.full-btn {
    width: 100%;
    margin-top: 10px;
    padding: 18px;
    font-size: 1rem;
}

.contact-right {
    flex: 1;
    background-size: cover;
    background-position: center;
    position: relative;
}

.contact-info-bar {
    background-color: #f9f9f9;
    padding: 80px 0;
    border-top: 1px solid #eee;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.info-card h3 {
    font-family: var(--serif);
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.info-card p, .info-card a {
    color: var(--text);
    text-decoration: none;
    line-height: 1.6;
}

.icon-box {
    font-size: 2rem;
    margin-bottom: 15px;
}


/* =========================================
   MENÚ HAMBURGUESA
   ========================================= */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--primary); 
}

/* =========================================
   MEDIA QUERIES (CORRECCIÓN FINAL MÓVIL)
   Reemplazá todo el bloque final con esto
   ========================================= */

@media (max-width: 900px) {

    /* --- GLOBAL LAYOUT --- */
    .container {
        padding: 0 15px; /* Menos margen lateral para que el logo tenga más aire */
        width: 100%;
        overflow: hidden; 
    }

    /* --- HEADER & NAV --- */
    .hamburger {
        display: block;
        z-index: 1001; 
    }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-links {
        position: fixed; left: -100%; top: 90px;
        background-color: var(--primary); width: 100%;
        height: calc(100vh - 90px); flex-direction: column;
        align-items: center; justify-content: flex-start;
        padding-top: 60px; gap: 40px; transition: 0.4s ease; display: flex; 
    }
    .nav-links.active { left: 0; }
    .nav-links a { color: white; font-size: 1.2rem; font-weight: 300; }
    
    .dropdown-content { position: static; background: transparent; box-shadow: none; border: none; padding-left: 0; text-align: center; display: none; }
    .dropdown-content a { font-size: 1rem; color: rgba(255,255,255, 0.7); padding: 10px 0; }
    .dropdown:hover .dropdown-content { display: block; animation: none; }

    /* --- LOGO MÓVIL (MÁS GRANDE) --- */
    .logo img {
        height: 70px; /* Tamaño aumentado para ocupar más espacio */
        max-width: 75vw; /* Tope para no chocar con la hamburguesa */
    }

    /* --- HOME / HERO --- */
    .hero { text-align: center; justify-content: center; }
    .hero h1 { font-size: 2.5rem; }
    .hero-btns {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px; 
    }
    .hero .btn { margin: 0; width: 100%; }

    /* --- SERVICIOS & CARDS --- */
    .grid-2, .details-grid, .services-grid, .values-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        width: 100%; 
    }

    .service-hero h1 { font-size: 2rem; word-wrap: break-word; line-height: 1.2; }
    .service-hero { padding: 60px 0; }
    
    .hero-image { margin-top: 30px; width: 100%; box-sizing: border-box; }
    .img-placeholder { height: 250px; width: 100%; }

    .service-card.full-width { flex-direction: column-reverse; }
    .card-image { width: 100%; height: 250px; flex: none; }
    .card-content { padding: 40px 30px; }

    /* --- EMPRESA --- */
    .about-split {
        display: flex;
        flex-direction: column-reverse;
        gap: 20px;
        padding: 40px 24px 0 24px;
        align-items: center; 
        margin-bottom: 0 !important;
    }
    .about-content, .about-image { width: 100%; flex: none; }
    
    .img-frame {
        width: 100%;
        height: 250px; 
        margin-bottom: 0; 
        box-shadow: none; 
    }

    .about-content { text-align: center; }
    .about-content h3 { margin-top: 10px; }
    .highlight-text { margin-top: 20px; margin-bottom: 10px; font-size: 0.95rem; }
    .values-section { padding-top: 30px !important; margin-top: 0 !important; border-top: none; }

    /* --- CONTACTO --- */
    .contact-split-layout { flex-direction: column-reverse; }
    .contact-right { min-height: 250px; flex: none; }
    .contact-left { padding: 40px 20px; } 
    .input-row { flex-direction: column; gap: 0; }
    .info-grid { grid-template-columns: 1fr; gap: 60px; }
    .contact-info { padding-left: 0; margin-top: 40px; }
    
    /* Botones Móviles */
    .btn { 
        width: 100%; 
        margin-bottom: 10px; 
        margin-right: 0; 
        display: block; 
    }
    .full-btn { width: 100%; }

    /* --- FOOTER --- */
    .footer-wrapper { flex-direction: column; align-items: center; text-align: center; }
    .footer-data { flex-direction: column; gap: 40px; }
    .footer-brand { margin-bottom: 20px; }
}