/* ==========================================================================
   1. VARIABLES, TIPOGRAFÍA Y ESTILOS BASE
   ========================================================================== */
:root {
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    
    --color-bg: #ffffff;
    --color-light: #f9f9f9;
    --color-text: #1a1a1a;
    --color-text-muted: #666666;
    --color-accent: #B89C72;
    --color-accent-hover: #9A805A;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ==========================================================================
   2. HEADER PREMIUM NAV GLOBAL
   ========================================================================== */
.premium-header {
    background-color: #47413f;
    padding: 15px 50px;
    border-bottom: 2px solid #d9822b;
    font-family: Arial, sans-serif;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-logo img {
    height: 65px;
    display: block;
}

.header-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.header-nav a {
    text-decoration: none;
    color: #ffffff;
    font-size: 13px;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: #ca741e;
}

.header-nav .quote-btn {
    background-color: #ca741e;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.header-nav .quote-btn:hover {
    background-color: #a85e15;
    color: #ffffff;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    .header-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}

/* ==========================================================================
   3. HERO SECTION PORTADA (ESTÁTICA / RESPALDO)
   ========================================================================== */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('../images/modern-custom-kitchen-design-miami.webp'); 
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 40px;
}

.btn-primary {
    display: inline-block;
    padding: 16px 40px;
    background-color: var(--color-accent);
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 2px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
}

/* ==========================================================================
   4. PORTADA DE VIDEO PREMIUM (HERO SECTION CON LOGO INTEGRADO)
   ========================================================================== */
.hero-video-section {
    position: relative;
    height: 80vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    overflow: hidden;
    text-align: center;
    background-color: #413b39; 
}

.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(65, 59, 57, 0.55);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 20px;
    font-family: 'Montserrat', sans-serif;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 35px;
    font-weight: 300;
}

/* Modificaciones de Escudo de Contenido en Móvil para Proteger el Logo del Video */
@media (max-width: 768px) {
    .hero-video-section { 
        height: 75vh !important; 
    }
    .hero-content {
        padding-top: 100px !important; 
    }
    .hero-content h1 { 
        font-size: 1.8rem !important; 
        line-height: 1.3 !important;
    }
    .hero-content p { 
        font-size: 0.95rem !important; 
        margin-bottom: 25px !important;
    }
}

/* ==========================================================================
   5. SECCIONES DE GALERÍA DE IMÁGENES Y BLOQUES INTERACTIVOS
   ========================================================================== */
.gallery-section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--color-light);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--color-text);
}

.divider {
    width: 50px;
    height: 2px;
    background-color: var(--color-accent);
    margin: 20px auto 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.img-wrapper {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.img-wrapper:hover img {
    transform: scale(1.06);
}

@media (min-width: 768px) {
    .grid-2x2 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem;
    }
} 

/* ==========================================================================
   6. GRID PRO (10 IMÁGENES COMPLETA) - ACCIONES DUALES INTERACTIVAS
   ========================================================================== */
.gallery-grid-pro {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 15px !important;
    margin-top: 20px !important;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    display: block !important;
    width: 100%;
    height: 320px !important; 
    border-radius: 8px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item:hover img {
    transform: scale(1.06);
}

@media (hover: hover) {
    .gallery-item:hover {
        transform: translateY(-4px) !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
    }
}

@media (max-width: 480px) {
    .gallery-grid-pro {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px !important; 
    }
    .gallery-item {
        height: 180px !important; 
        box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important;
    }
}

/* Capa oscura superpuesta exclusiva para los enlaces de proyectos */
.grid-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(65, 59, 57, 0.82); 
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 5;
    transition: opacity 0.4s ease;
}

.project-link-wrapper:hover .grid-overlay {
    opacity: 1;
}

/* Contenedor de botones dobles alineados */
.overlay-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 70%;
    max-width: 180px;
}

.view-action-btn {
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid #ffffff;
    padding: 10px 16px;
    border-radius: 2px;
    text-align: center;
    text-decoration: none;
    transform: translateY(15px);
    transition: background 0.3s ease, color 0.3s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

.project-link-wrapper:hover .view-action-btn {
    transform: translateY(0);
}

.overlay-actions a:nth-child(2) {
    transition-delay: 0.05s;
}

.view-action-btn:hover {
    background: #ffffff !important;
    color: #413b39 !important;
}

@media (max-width: 480px) {
    .overlay-actions {
        width: 85%;
        gap: 8px;
    }
    .view-action-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
}

/* ==========================================================================
   7. ESTILOS PREMIUM PARA ARTÍCULOS DE BLOG / CASOS DE ESTUDIO
   ========================================================================== */
.blog-post-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: 'Montserrat', sans-serif;
    color: #413b39;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-category {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #d9822b;
    font-weight: 500;
}

.post-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin: 15px 0;
    line-height: 1.25;
    font-weight: 600;
}

.post-meta {
    font-size: 0.9rem;
    color: #8c8582;
    font-style: italic;
}

.post-featured-image img, .post-body-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.post-featured-image {
    margin-bottom: 50px;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    font-weight: 300;
}

.post-content p {
    margin-bottom: 25px;
}

.post-content p.lead {
    font-size: 1.3rem;
    line-height: 1.7;
    font-weight: 400;
    color: #595250;
}

.post-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    margin: 45px 0 20px 0;
    color: #413b39;
}

.post-body-image {
    margin: 40px 0;
    text-align: center;
}

.image-caption {
    display: block;
    font-size: 0.9rem;
    color: #8c8582;
    margin-top: 10px;
    font-style: italic;
}

.post-footer-cta {
    margin-top: 60px;
    padding: 40px;
    background-color: #f9f9f9;
    border-left: 4px solid #d9822b;
    text-align: center;
    border-radius: 0 4px 4px 0;
}

.post-footer-cta h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.post-footer-cta p {
    margin-bottom: 20px;
    font-weight: 300;
}

@media (max-width: 768px) {
    .post-header h1 { font-size: 1.85rem; }
    .post-content h2 { font-size: 1.4rem; }
    .blog-post-container { margin: 30px auto; }
}

/* ==========================================================================
   8. COMPONENTES: FOOTER, SOCIAL LINKS Y WHATSAPP FLOAT
   ========================================================================== */
.site-footer {
    background-color: #111111;
    color: #ffffff;
    padding: 60px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 5px;
}

.footer-brand p, .footer-contact p {
    color: #aaaaaa;
    font-size: 13px;
    margin: 0;
}

.footer-contact {
    text-align: right;
}

.footer-contact a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-contact a:hover {
    color: var(--color-accent);
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50%;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0px 6px 16px rgba(0,0,0,0.2);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    justify-content: flex-end;
}

.social-links a {
    color: #ffffff;
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--color-accent);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-contact {
        text-align: center;
        margin-top: 15px;
    }
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    .social-links {
        justify-content: center;
    }
}

/* ==========================================================================
   9. AVISO DE COOKIES PREMIUM
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background-color: #413b39; 
    color: #ffffff;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99999;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
    border-top: 2px solid #d9822b;
    transition: transform 0.4s ease;
    transform: translateY(100%);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner p {
    margin: 0;
    padding-right: 20px;
    line-height: 1.5;
}

.cookie-banner a {
    color: #d9822b;
    text-decoration: underline;
    transition: color 0.3s;
}

.cookie-banner a:hover {
    color: #ffffff;
}

.cookie-btn {
    background-color: #d9822b;
    color: #ffffff;
    border: none;
    padding: 10px 28px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.cookie-btn:hover {
    background-color: #a85e15;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    .cookie-banner p {
        padding-right: 0;
    }
}

/* ==========================================================================
   CORRECCIÓN ULTRA-PREMIUM PARA PANTALLAS TÁCTILES (FIX MÓVIL/TABLET)
   ========================================================================== */
@media (max-width: 768px) {
    .project-link-wrapper .grid-overlay {
        opacity: 1 !important;
        background: linear-gradient(to top, 
            rgba(65, 59, 57, 0.95) 0%, 
            rgba(65, 59, 57, 0.6) 50%, 
            rgba(65, 59, 57, 0) 100%) !important;
        align-items: flex-end !important; 
        padding-bottom: 15px !important;
    }

    .project-link-wrapper .overlay-actions {
        flex-direction: row !important;
        width: 92% !important;
        max-width: 100% !important;
        gap: 8px !important;
    }

    .project-link-wrapper .view-action-btn {
        transform: translateY(0) !important; 
        font-size: 0.68rem !important;
        padding: 8px 2px !important;
        letter-spacing: 0.5px !important;
        flex: 1 !important; 
        background-color: rgba(65, 59, 57, 0.85) !important; 
        border: 1px solid rgba(255, 255, 255, 0.8) !important;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .project-link-wrapper .grid-overlay {
        padding-bottom: 10px !important;
    }
    .project-link-wrapper .view-action-btn {
        font-size: 0.62rem !important;
        padding: 6px 0 !important;
        letter-spacing: 0px !important;
    }
}

/* ==========================================================================
   10. ARCHIVO DE PORTAFOLIO Y FICHAS DE CASOS DE ESTUDIO (PROYECTOS) - CORREGIDO
   ========================================================================== */
.portfolio-archive-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 35px !important;
    margin-top: 30px !important;
    justify-content: center !important;
}

.portfolio-card {
    background: #ffffff !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 380px !important; 
    margin: 0 auto !important;   
}

.portfolio-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 30px rgba(65, 59, 57, 0.12) !important;
}

.portfolio-card-thumb {
    width: 100% !important;
    position: relative !important;
    padding-top: 66.67% !important; 
    overflow: hidden !important;
    background: #413b39 !important;
}

.portfolio-card-thumb img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
    display: block !important;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.portfolio-card:hover .portfolio-card-thumb img {
    transform: scale(1.05) !important;
}

.portfolio-card-info {
    padding: 25px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.project-tag {
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: #8c8582 !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
}

.portfolio-card-info h3 {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.35rem !important;
    color: #1a1a1a !important;
    margin-bottom: 12px !important;
    line-height: 1.3 !important;
}

.portfolio-card-info p {
    font-size: 0.92rem !important;
    color: #666666 !important;
    font-weight: 300 !important;
    line-height: 1.6 !important;
    margin: 0 0 25px 0 !important;
}

.portfolio-card-link {
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #d9822b !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    margin-top: auto !important;
    transition: color 0.3s !important;
}

.portfolio-card-link:hover {
    color: #413b39 !important;
}

.coming-soon-card {
    opacity: 0.85 !important;
}

.coming-soon-card .portfolio-card-thumb img {
    filter: grayscale(20%) brightness(90%) !important;
}

.portfolio-card-link.muted {
    color: #bfaea8 !important;
    cursor: default !important;
}

@media (max-width: 480px) {
    .portfolio-archive-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    .portfolio-card-info {
        padding: 20px !important;
    }
}
