/* ===================================
   FONTS & VARIABLES
   =================================== */
:root {
    --primary: #c9a882;
    --secondary: #8b7355;
    --accent: #d4af7a;
    --dark: #2c2c2c;
    --light: #f5f5f5;
    --white: #ffffff;
    --nude: #f5e6d3;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-padding-top: 80px; /* Espacio para el header fijo */
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: relative;
}

body.loaded {
    opacity: 1;
}

/* Prevenir zoom no deseado en iOS */
input, select, textarea {
    font-size: 16px !important;
}

/* Mejorar rendimiento de imágenes */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Optimización para touch devices */
a, button, .clickable {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 3px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-cita {
    background: var(--primary);
    color: var(--white);
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    border-radius: 0;
    transition: all 0.3s;
}

.btn-cita:hover {
    background: var(--secondary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--dark);
    transition: all 0.3s;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    min-height: 100vh;
    height: auto;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080"><rect fill="%23c9a882" width="1920" height="1080"/></svg>');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(201, 168, 130, 0.7), rgba(139, 115, 85, 0.7));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 4rem 2rem;
}

.hero-subtitle {
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-hero {
    display: inline-block;
    background: transparent;
    color: var(--white);
    padding: 1rem 3rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 2px;
    border: 2px solid var(--white);
    transition: all 0.3s;
}

.btn-hero:hover {
    background: var(--white);
    color: var(--primary);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 1px;
    height: 50px;
    background: var(--white);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(10px); }
}

/* ===================================
   SECTIONS
   =================================== */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 3rem;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about-section {
    padding: 8rem 0;
    background: var(--white);
    position: relative;
    z-index: 2;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-image-container {
    position: relative;
}

.about-image {
    position: relative;
    height: 600px;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--nude), var(--primary));
    position: relative;
}

.about-content {
    padding: 2rem 0;
}

.about-text {
    margin-bottom: 3rem;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    border-top: 2px solid var(--primary);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--dark);
    letter-spacing: 1px;
}

.responsive-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

/* ===================================
   SERVICES SECTION
   =================================== */
.services-section {
    padding: 8rem 0;
    background: var(--light);
    position: relative;
    z-index: 2;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.service-card {
    background: var(--white);
    padding: 3rem 2rem;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    border-bottom-color: var(--primary);
    transform: translateY(-5px);
}

.service-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--nude);
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
}

.service-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666;
}

/* ===================================
   GALLERY SECTION
   =================================== */
.gallery-section {
    padding: 8rem 0;
    background: var(--white);
    position: relative;
    z-index: 2;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1; /* formato cuadrado como tus imágenes */
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.gallery-item.tall {
    aspect-ratio: 1 / 2; /* el doble de alto para items "tall" */
    grid-row: span 2;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* rellena todo el espacio sin deformar */
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil */
        gap: 1rem;
    }
    
    .gallery-item.tall {
        grid-row: span 1; /* todos iguales en móvil */
        aspect-ratio: 1 / 1;
    }
    
    .gallery-section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* 1 columna en pantallas muy pequeñas */
    }
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact-section {
    padding: 8rem 0;
    background: var(--light);
    position: relative;
    z-index: 2;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
}

.contact-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.info-items {
    margin-bottom: 3rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--nude);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.info-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.info-item p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--secondary);
}

/* ===================================
   CONTACT FORM
   =================================== */
.contact-form-container {
    background: var(--white);
    padding: 3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    background: var(--white);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--dark);
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    background: var(--secondary);
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-text {
    text-align: right;
}

.footer-text p {
    font-size: 0.85rem;
    opacity: 0.7;
    margin: 0.3rem 0;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }
    
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-links {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .btn-cita {
        display: none;
    }
    
    .hero {
        margin-top: 0;
        padding-top: 80px;
        min-height: 100vh;
        height: auto;
        background-attachment: scroll; /* Mejor rendimiento en móvil */
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
        padding: 0 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 3rem 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image {
        height: 400px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .contact-form-container {
        padding: 2rem 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-text {
        text-align: center;
    }
    
    /* Mejorar espaciado en móvil */
    section {
        padding: 4rem 0;
    }
    
    .about-section,
    .services-section,
    .gallery-section,
    .contact-section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .navbar {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .service-number {
        font-size: 2rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* Landscape mode en móviles */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 8rem 0 4rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
}

/* Optimización para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Soporte para pantallas grandes */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .navbar {
        max-width: 1600px;
    }
}