/* Reset y configuración base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables CSS */
:root {
    --primary-color: #b2967d;
    --primary-dark: #9d8169;
    --secondary-color: #e6beae;
    --accent-color: #e6beae;
    --text-primary: #5d4e42;
    --text-secondary: #7a6b5d;
    --text-light: #9d8169;
    --bg-primary: #ffffff;
    --bg-secondary: #eee4e1;
    --bg-light: #e7d8c9;
    --bg-accent: #ecf8f8;
    --bg-warm: #e6beae;
    --border-color: #e7d8c9;
    --shadow-sm: 0 1px 2px 0 rgb(93 78 66 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(93 78 66 / 0.1), 0 2px 4px -2px rgb(93 78 66 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(93 78 66 / 0.1), 0 4px 6px -4px rgb(93 78 66 / 0.1);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Configuración base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 16px;
    /* Espaciado adicional para navegadores integrados */
    padding-top: env(safe-area-inset-top);
}

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

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.875rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
    margin: 8px 0;
    width: 100%;
    max-width: 300px;
}

/* Header y Navegación */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
    /* Ajuste para navegadores integrados */
    padding-top: env(safe-area-inset-top);
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

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

.nav-logo h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--primary-color);
}

.nav-logo span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

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

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

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

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-light) 100%);
    position: relative;
    /* Padding adicional para navegadores integrados */
    padding-top: calc(120px + env(safe-area-inset-top, 0px));
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(230, 190, 174, 0.15) 50%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.hero-content h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

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

.about-lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.credentials {
    margin-top: 2rem;
}

.credentials h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.credential-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(45deg, var(--bg-secondary) 0%, var(--bg-light) 100%);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.credential-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background-color: var(--bg-warm);
    opacity: 0.3;
    border-radius: var(--border-radius) 0 0 0;
}

.credential-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.credential-item p {
    margin: 0;
    color: var(--text-secondary);
}

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

/* Specialties Section */
.specialties {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.specialties h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.specialty-card {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.specialty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--bg-warm) 100%);
}

.specialty-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.specialty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.specialty-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.specialty-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.specialty-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* Services Section */
.services {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.services h2 {
    text-align: center;
    margin-bottom: 1rem;
}

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

.service-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

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

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

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

.service-card p strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Gallery Section */
.gallery {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.gallery h2 {
    text-align: center;
    margin-bottom: 1rem;
}

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

.gallery-item {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(93, 78, 66, 0.9));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: var(--transition);
}

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

.gallery-overlay h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.gallery-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-accent) 100%);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top right, rgba(230, 190, 174, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.contact h2 {
    text-align: center;
    margin-bottom: 1rem;
}

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

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-item:hover .contact-icon {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.contact-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-item p {
    margin: 0;
    color: var(--text-secondary);
}

.cta-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(230, 190, 174, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cta-card p {
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background-color: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

/* Footer Links */
.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    padding: 4px 0;
}

.footer-link:hover {
    color: white;
    transform: translateX(5px);
}

.footer-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: var(--transition);
}

.footer-link:hover svg {
    transform: scale(1.1);
}

/* Developer Link */
.dev-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.dev-link:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: flex;
    }

    /* Hero */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        height: 300px;
        object-position: center 20%;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Specialties */
    .specialties-grid {
        grid-template-columns: 1fr;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }

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

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

    .hero-image img {
        height: 350px;
        object-position: center 15%;
    }

    .specialties-grid {
        grid-template-columns: 1fr;
    }

    .specialty-card {
        padding: 1.5rem;
    }

    .btn-large {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Optimizaciones de performance */
img {
    max-width: 100%;
    height: auto;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(45deg, var(--bg-light) 0%, var(--bg-secondary) 100%);
}

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

.hero-content,
.about-text,
.specialty-card,
.gallery-item,
.contact-item {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
/* Ajustes para navegadores integrados (Instagram, Facebook, etc.) */
@media screen and (max-width: 768px) {
    /* Detección de navegadores integrados usando user-agent stylesheets */
    body {
        padding-top: max(env(safe-area-inset-top), 20px);
    }
    
    .header {
        top: env(safe-area-inset-top, 0);
    }
    
    .hero {
        padding-top: calc(140px + env(safe-area-inset-top, 20px));
        min-height: calc(100vh - env(safe-area-inset-top, 0px));
    }
}

/* Ajuste específico para navegadores muy pequeños o con viewport limitado */
@media screen and (max-height: 600px) {
    .hero {
        padding-top: calc(100px + env(safe-area-inset-top, 30px));
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Fallback para navegadores que no soportan env() */
@supports not (padding: env(safe-area-inset-top)) {
    body {
        padding-top: 20px;
    }
    
    .hero {
        padding-top: 140px;
    }
}

@media print {
    .header,
    .nav,
    .footer {
        display: none;
    }
    
    .hero {
        padding-top: 0;
    }
    
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
} 