/* Reset y Variables */
:root {
    /* Colores principales - Paleta cálida y acogedora */
    --primary-color: #FF6B35; /* Naranja cálido */
    --primary-dark: #E85A2B;
    --primary-light: #FF8C5A;
    --secondary-color: #F7931E; /* Naranja dorado */
    --accent-color: #4ECDC4; /* Turquesa */
    --accent-dark: #3BA99F;
    
    /* Colores neutros */
    --dark-bg: #1A1A1A;
    --dark-secondary: #2D2D2D;
    --light-bg: #F8F8F8;
    --text-primary: #FFFFFF;
    --text-secondary: #E0E0E0;
    --text-dark: #333333;
    --text-muted: #999999;
    
    /* Colores de fondo alternativos */
    --bg-cream: #FFF8F0;
    --bg-warm: #FFF5E8;
    
    /* Sombras y efectos */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.3);
    
    /* Transiciones */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

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

html {
    scroll-behavior: smooth;
}

/* Accesibilidad - Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible para mejor accesibilidad */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-width: 320px;
}

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

/* Navegación - Header estilo beige claro con logo en recuadro */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #FAF7F2 !important;
    background-image: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo a {
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background-color: transparent;
    border: 1px solid rgba(180, 140, 90, 0.4);
    border-radius: 50%;
    padding: 4px;
    flex-shrink: 0;
}

.nav-logo-img {
    width: 100%;
    height: 100%;
    max-width: 44px;
    max-height: 44px;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    white-space: nowrap;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    font-size: 1rem;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.12);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-primary);
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 800px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    animation: fadeInUp 1s ease forwards;
    isolation: isolate;
}

.hero-content > * {
    position: relative;
    z-index: 1;
}

.hero-logo-wrap {
    margin: 0 auto 1.75rem;
    width: 200px;
    height: 200px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: heroLogoIn 0.8s ease-out;
}

.hero-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    filter:
        drop-shadow(0 4px 20px rgba(0, 0, 0, 0.15))
        drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}

@keyframes heroLogoIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-primary);
    border: 2px solid transparent;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--text-primary);
    border: 2px solid transparent;
}

.btn-secondary:hover {
    background-color: var(--accent-dark);
    color: var(--text-primary);
}

.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation-delay: 10s;
}

/* Secciones Generales */
section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Servicios Section */
.services {
    background-color: var(--light-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--text-primary);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.service-features {
    list-style: none;
    text-align: left;
    margin-top: 1.5rem;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Sobre Nosotros Section */
.about {
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-warm) 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.about-intro {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-weight: 500;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.about-item p {
    color: var(--text-muted);
    line-height: 1.8;
}

.about-image {
    position: relative;
}

.about-team-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    min-height: 400px;
}

.image-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    padding: 4rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.image-placeholder span {
    font-size: 6rem;
    margin-bottom: 1rem;
}

.image-placeholder p {
    color: var(--text-primary);
    font-size: 1.2rem;
}

/* Galería Section */
.gallery {
    background-color: var(--light-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    background-color: var(--bg-cream);
    transition: opacity 0.3s ease;
    /* Optimización: Evitar layout shift */
    aspect-ratio: 1;
}

.gallery-image[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Optimización: Blur placeholder mientras carga */
    filter: blur(5px);
}

.gallery-image[loading="lazy"].loaded {
    opacity: 1;
    filter: blur(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.gallery-image.gallery-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-emoji {
    font-size: 5rem;
    z-index: 1;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--text-primary);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay p {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Testimonios Section */
.testimonials {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-primary);
}

.testimonials .section-title,
.testimonials .section-subtitle {
    color: var(--text-primary);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonial-stars {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.testimonial-author strong {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.testimonial-author span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Contacto Section */
.contact {
    background-color: var(--light-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.contact-item h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-item p {
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: var(--text-primary);
}

.contact-form {
    background: var(--text-primary);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-social a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--text-secondary);
    border-radius: 20px;
    transition: var(--transition);
}

.footer-social a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-secondary);
    color: var(--text-muted);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--text-primary);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-logo-wrap {
        width: 170px;
        height: 170px;
    }

    .hero-logo {
        max-width: 170px;
        max-height: 170px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

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

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .nav-logo-box {
        width: 46px;
        height: 46px;
        padding: 5px;
    }

    .nav-logo-img {
        max-height: 36px;
    }

    .hero-logo-wrap {
        width: 150px;
        height: 150px;
        margin-bottom: 1.25rem;
    }

    .hero-logo {
        max-width: 150px;
        max-height: 150px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .services-grid,
    .gallery-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
