/* CSS Variables for Premium Aesthetic */
:root {
    --primary-color: #2c3e50;
    --primary-light: #34495e;
    --accent-color: #d4af37; /* Gold accent for premium feel */
    --accent-hover: #b5952f;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.12);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; font-family: var(--font-body); font-weight: 600; }

p {
    margin-bottom: 1rem;
    color: #555;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 3rem 0;
}

.cta.section {
    padding: 3rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.mt-5 { margin-top: 5rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-light);
    box-shadow: var(--shadow-md);
}

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

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.link-arrow:hover {
    gap: 0.8rem;
    color: var(--accent-hover);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 50px;
    width: auto;
    min-width: 40px;
    display: block;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

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

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--primary-color);
    cursor: pointer;
    font-family: var(--font-body);
}

.mobile-nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--bg-white);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    transition: var(--transition-slow);
    z-index: 999;
}

.mobile-nav a {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.mobile-nav.active {
    transform: translateY(0);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(249, 249, 249, 1) 0%, rgba(220, 225, 227, 1) 100%);
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: radial-gradient(circle at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
}

.hero-content {
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

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

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    z-index: -1;
}

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

.services-grid.two-cols {
    grid-template-columns: repeat(2, 1fr);
}

.service-card {
    background-color: #dcdcdc; /* Gris más fuerte */
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-slow);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid #cccccc;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-slow);
}

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

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.service-link:hover {
    color: var(--accent-color);
}

/* Procedure Card Subtopics */
.procedure-subtopics {
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 0.5rem;
    text-align: left;
}

.procedure-subtopics li {
    position: relative;
    padding: 0.35rem 0 0.35rem 1.4rem;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.procedure-subtopics li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

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

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: #fff;
}

/* Before/After Side-by-Side Layout */
.before-after-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.before-after-single {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.before-after-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 967 / 1200;
    transition: transform 0.4s ease;
}

.before-after-single:hover img {
    transform: scale(1.02);
}

.before-after-label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    pointer-events: none;
}

.before-after-label.label-antes {
    background: rgba(44, 62, 80, 0.75);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.before-after-label.label-despues {
    background: rgba(212, 175, 55, 0.85);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Triple Comparison Styles */
.triple-comparison {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
}

.triple-comparison img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.triple-comparison img.active {
    opacity: 1;
}

.step-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 5;
}

.gallery-caption {
    padding: 1.5rem;
    text-align: center;
}

.gallery-caption h4 {
    margin: 0;
    color: var(--primary-color);
    font-family: var(--font-body);
}

/* CTA */
.cta {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
}

.cta h2 {
    color: var(--text-light);
}

.cta p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Footer */
.footer {
    background-color: #111e2d; /* Azul mucho más oscuro para máximo contraste */
    color: var(--text-light);
    padding-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.95);
    margin-top: 1rem;
}

.footer-logo {
    height: 50px;
    filter: brightness(0) invert(1);
}

.footer h4 {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer li {
    margin-bottom: 0.8rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.footer a:hover {
    color: var(--accent-color);
}

.footer p {
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    transition: var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    background-color: #0b141e;
    padding: 2rem 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.atelier-credit {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.atelier-credit:hover {
    color: #fff;
}

.atelier-logo {
    height: 35px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.atelier-credit:hover .atelier-logo {
    opacity: 1;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.zoom-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.zoom-in.visible {
    opacity: 1;
    transform: scale(1);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background-color: var(--accent-hover);
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    .services-grid.two-cols {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions .btn-primary {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .section { padding: 4rem 0; }
    .container { padding: 0 1.2rem; }
    
    /* Doctor photo fix for mobile */
    .services-flex-container {
        gap: 2rem !important;
    }
    .services-flex-container > div[style*="flex: 1 1 400px"] img,
    .services-flex-container > div[style*="flex: 1 1 500px"] img {
        max-height: 400px;
        object-fit: cover;
        object-position: center 20%;
    }
    
    /* Gallery mobile adjustments */
    .before-after-pair {
        grid-template-columns: 1fr;
    }
    
    /* Procedure cards */
    .procedures-grid {
        gap: 1.5rem;
    }
    .procedure-card {
        padding: 2rem 1.5rem;
    }
    
    /* Footer mobile spacing */
    .footer { padding-top: 3rem; }
    .footer p { font-size: 0.9rem; }

    /* Reconstructive 3-column grid to 1-column on mobile */
    div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .btn { padding: 0.7rem 1.4rem; font-size: 0.85rem; }
    .section { padding: 3rem 0; }
    .before-after-pair {
        grid-template-columns: 1fr;
    }
}
