﻿/* CSS Variables & Reset */
:root {
    /* Premium Blue & Wood Palette */
    --primary-color: #3b82f6;
    --primary-light: #dbeafe;
    --accent-color: #1d4ed8;
    --dark-bg: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --text-main: #0f172a;
    --text-muted: #475569;
    --white: #ffffff;
    --success: #10b981;
    --closed: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* Skip link for accessibility */
.skip-link:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 8px 12px;
    background: #111827;
    color: #fff;
    z-index: 10000;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.logo-main {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #334155;
    font-weight: 600;
}

.logo-accent {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.accent-wood {
    color: var(--primary-color);
    font-weight: bold;
}

.desktop-nav a {
    margin-left: 2rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.desktop-nav a:hover {
    color: var(--primary-color);
}

.btn-nav {
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
}

.btn-nav:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg) !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}
.mobile-menu-btn:focus-visible,
.social-toggle:focus-visible,
.social-btn:focus-visible,
.btn-nav:focus-visible,
.cta-btn:focus-visible,
.map-link:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

.mobile-nav {
    display: none;
    background-color: var(--card-bg);
    padding: 1rem;
    text-align: center;
}

.mobile-nav a {
    display: block;
    margin: 1rem 0;
    font-size: 1.1rem;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: url('../img/wood_bg.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Efecto de iluminación central (Spotlight) más brillante */
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--white);
    /* Sombra proyectada profunda para efecto de relieve en madera */
    text-shadow: 4px 6px 15px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.4);
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.9);
}

/* Buttons */
.cta-btn {
    display: inline-block;
    padding: 1.1rem 2.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    /* Forma circular a los costados (estilo cápsula) */
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.cta-whatsapp {
    background-color: #1ea952;
    /* Verde más profesional y menos "brilloso" */
    color: white;
    box-shadow: 0 10px 25px rgba(30, 169, 82, 0.2), 0 15px 35px rgba(0, 0, 0, 0.5);
}

.cta-ai {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3), 0 15px 35px rgba(0, 0, 0, 0.5);
}

.cta-btn i {
    margin-right: 0.5rem;
}

/* Status Indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.status-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background-color: #ccc;
    margin-right: 0.8rem;
    box-shadow: 0 0 10px currentColor;
}

.status-open .status-dot {
    background-color: var(--success);
    color: var(--success);
}

.status-closed .status-dot {
    background-color: var(--closed);
    color: var(--closed);
}

/* Reputation */
.reputation-section {
    background-color: var(--card-bg);
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.reputation-section .stars {
    color: #f7bf17;
    /* Google Star Color */
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* Common Section */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.underline {
    height: 3px;
    width: 60px;
    background-color: var(--accent-color);
    margin: 0 auto;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

.service-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    background-color: rgba(255, 255, 255, 0.95);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--text-muted);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #303030;
    color: #555;
    font-weight: 700;
    border: 2px dashed #444;
}

/* Contact */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info .info-item {
    display: flex;
    margin-top: 2rem;
}

.contact-info i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1.5rem;
    margin-top: 0.3rem;
}

.map-link {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-top: 0.2rem;
    display: inline-block;
}

/* AI Modal */
.ai-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.ai-modal-content {
    background-color: var(--white);
    width: 90%;
    max-width: 500px;
    height: 80vh;
    max-height: 600px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border: none;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Floating Social Menu Styles (Toggle Version) */
.floating-social-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 999;
}

.social-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-social-wrapper.active .social-items {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.social-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-social-wrapper.active .social-toggle {
    transform: rotate(45deg);
    background-color: var(--closed);
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.social-btn.whatsapp {
    background-color: #25D366;
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-btn.mail {
    background-color: #64748b;
}

footer {
    background-color: #f1f5f9;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--primary-light);
}

@media (prefers-color-scheme: dark) {
    :root {
        --dark-bg: #0b1220;
        --card-bg: rgba(17, 24, 39, 0.7);
        --glass-bg: rgba(17, 24, 39, 0.6);
        --text-main: #e5e7eb;
        --text-muted: #cbd5e1;
    }
    .main-header {
        border-bottom-color: rgba(255,255,255,0.08);
    }
    .service-card { border-color: rgba(255,255,255,0.12); }
    .service-card:hover { background-color: rgba(255,255,255,0.08); }
    footer { background-color: #0f172a; border-top-color: #1f2937; }
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    height: 60px;
    width: auto;
    border-radius: 50%;
    margin-bottom: 1rem;
    filter: grayscale(0.2);
    transition: 0.3s;
}

.footer-logo:hover {
    filter: grayscale(0);
    transform: scale(1.05);
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-link a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.footer-link i {
    color: var(--primary-color);
}

.ai-header {
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--dark-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-bg);
}

.ai-body {
    padding: 1.5rem;
    height: 300px;
    overflow-y: auto;
    background-color: #f8fafc;
}

.ai-message {
    background-color: #e2e8f0;
    color: #334155;
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-bottom-left-radius: 2px;
}

.ai-message.user {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: right;
    margin-left: auto;
    /* Push to right if flex parent, or just visual distinction */
    border-bottom-right-radius: 2px;
    border-bottom-left-radius: 10px;
}

.ai-message.system {
    border-left: 3px solid var(--primary-color);
    background-color: #dbeafe;
    color: #1e293b;
    margin-right: auto;
}

.ai-footer {
    padding: 1rem;
    display: flex;
    border-top: 1px solid #333;
}

.ai-footer input {
    flex: 1;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background-color: #fff;
    color: #334155;
    margin-right: 10px;
}

.ai-footer button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--dark-bg);
    font-weight: bold;
}

/* Animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-container {
        align-items: center;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* Lightbox */
.lightbox[hidden] { display: none !important; }
.lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center;
    z-index: 3000;
}
.lightbox-inner { position: relative; max-width: 90vw; max-height: 90vh; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 8px; display: block; }
.lightbox p { color: #e5e7eb; margin-top: 8px; text-align: center; }
.lightbox-close { position: absolute; top: -10px; right: -10px; background: #111827; color:#fff; border:none; width:36px; height:36px; border-radius:50%; cursor:pointer; }
.lightbox-close:focus-visible { outline: 3px solid #f59e0b; }