/* ═══════════════════════════════════════════
   Farmacia Ortopedia Lentegi Rojas Morante
   Styles
   ═══════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --green-900: #1a3a25;
    --green-800: #2D5A3D;
    --green-700: #3d7a52;
    --green-600: #4a9462;
    --green-500: #5ba874;
    --green-400: #7bc494;
    --green-100: #d4edda;
    --green-50:  #eef7f1;
    --cream:     #faf9f6;
    --cream-dark:#f3f1ec;
    --white:     #ffffff;
    --text-dark: #1a2e22;
    --text-mid:  #3d4f44;
    --text-light:#6b7d72;
    --shadow-sm: 0 1px 3px rgba(45,90,61,0.08);
    --shadow-md: 0 4px 16px rgba(45,90,61,0.10);
    --shadow-lg: 0 8px 32px rgba(45,90,61,0.12);
    --shadow-xl: 0 16px 48px rgba(45,90,61,0.14);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--cream);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--green-800);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    z-index: 9999;
    font-weight: 700;
}
.skip-link:focus {
    top: 16px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-align: center;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--green-800);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--green-700);
}

.btn-outline {
    background: transparent;
    color: var(--green-800);
    border-color: var(--green-800);
}
.btn-outline:hover {
    background: var(--green-800);
    color: var(--white);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.6);
}
.btn-outline-light:hover {
    background: var(--white);
    color: var(--green-800);
    border-color: var(--white);
}

.btn-light {
    background: var(--white);
    color: var(--green-800);
}
.btn-light:hover {
    background: var(--green-50);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 16px;
    border-radius: var(--radius-xl);
}

/* ── Header ── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 249, 246, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(45,90,61,0.08);
    transition: var(--transition);
}
.header.scrolled {
    background: rgba(250, 249, 246, 0.95);
    box-shadow: var(--shadow-md);
}

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

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

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.logo-line1 {
    font-family: var(--font-display);
    font-size: 17px;
    color: var(--green-800);
    font-weight: 400;
}
.logo-line2 {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Nav */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.nav-menu a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    color: var(--text-mid);
    transition: var(--transition);
}
.nav-menu a:hover {
    color: var(--green-800);
    background: var(--green-50);
}
.btn-nav {
    background: var(--green-800);
    color: var(--white) !important;
    margin-left: 8px;
}
.btn-nav:hover {
    background: var(--green-700) !important;
    color: var(--white) !important;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.nav-toggle-line {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--green-800);
    border-radius: 2px;
    transition: var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero ── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 58, 37, 0.82) 0%,
        rgba(45, 90, 61, 0.72) 50%,
        rgba(61, 122, 82, 0.62) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    padding: 120px 0 80px;
    color: var(--white);
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    line-height: 1.12;
    margin-bottom: 24px;
    font-weight: 400;
}
.hero-title-accent {
    display: block;
    font-style: italic;
    color: var(--green-100);
}
.hero-description {
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255,255,255,0.88);
    margin-bottom: 40px;
    max-width: 580px;
}
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 56px;
}
.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    color: rgba(255,255,255,0.9);
}
.trust-item svg {
    color: var(--green-400);
}
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    animation: float 2.5s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ── Info Cards ── */
.info-cards {
    padding: 0 0 80px;
    margin-top: -48px;
    position: relative;
    z-index: 2;
}
.info-cards .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(45,90,61,0.06);
}
.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}
.info-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--green-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-800);
}
.info-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--green-800);
    margin-bottom: 8px;
}
.info-card p {
    color: var(--text-light);
    font-size: 15px;
}
.info-card a {
    color: var(--green-700);
    font-weight: 700;
    transition: var(--transition);
}
.info-card a:hover {
    color: var(--green-800);
}

/* ── Section shared ── */
.section-tag {
    display: inline-block;
    background: var(--green-50);
    color: var(--green-800);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
    border: 1px solid var(--green-100);
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--green-900);
    line-height: 1.2;
    margin-bottom: 16px;
}
.section-desc {
    font-size: 17px;
    color: var(--text-light);
    max-width: 600px;
    line-height: 1.8;
}
.section-header {
    text-align: center;
    margin-bottom: 64px;
}
.section-header .section-desc {
    margin: 0 auto;
}

/* ── Services ── */
.services {
    padding: 100px 0;
    background: var(--white);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.service-card {
    background: var(--cream);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(45,90,61,0.06);
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}
.service-card-img {
    height: 200px;
    overflow: hidden;
}
.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.service-card:hover .service-card-img img {
    transform: scale(1.05);
}
.service-card-body {
    padding: 28px;
}
.service-icon {
    width: 56px;
    height: 56px;
    background: var(--green-800);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 16px;
}
.service-card-body h3 {
    font-family: var(--font-display);
    font-size: 21px;
    color: var(--green-900);
    margin-bottom: 10px;
}
.service-card-body p {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.7;
}

/* ── About ── */
.about {
    padding: 100px 0;
    background: var(--cream);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.about-images {
    position: relative;
}
.about-img-main {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.about-img-main img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}
.about-img-secondary {
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 220px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 6px solid var(--cream);
}
.about-img-secondary img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.about-experience {
    position: absolute;
    top: -24px;
    right: 40px;
    background: var(--green-800);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.about-exp-number {
    display: block;
    font-family: var(--font-display);
    font-size: 42px;
    line-height: 1;
    color: var(--green-100);
}
.about-exp-text {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: rgba(255,255,255,0.85);
}
.about-content .section-title {
    text-align: left;
}
.about-text {
    color: var(--text-mid);
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 16px;
}
.about-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 32px;
}
.value-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
}
.value-icon {
    width: 44px;
    height: 44px;
    background: var(--green-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-800);
    flex-shrink: 0;
}

/* ── CTA Banner ── */
.cta-banner {
    padding: 80px 0;
    background: var(--green-800);
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}
.cta-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}
.cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}
.cta-content {
    flex: 1;
}
.cta-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    color: var(--white);
    line-height: 1.25;
    margin-bottom: 16px;
}
.cta-text {
    color: rgba(255,255,255,0.8);
    font-size: 17px;
    line-height: 1.8;
    max-width: 480px;
}
.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    flex-shrink: 0;
}

/* ── Schedule ── */
.schedule {
    padding: 100px 0;
    background: var(--white);
}
.schedule-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: var(--cream);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(45,90,61,0.06);
}
.schedule-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 36px;
}
.schedule-icon {
    width: 72px;
    height: 72px;
    background: var(--green-800);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}
.schedule-header .section-title {
    margin-bottom: 4px;
}
.schedule-table {
    width: 100%;
}
.schedule-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    padding: 14px 0;
    border-bottom: 1px solid rgba(45,90,61,0.08);
    align-items: center;
    font-size: 15px;
}
.schedule-row:first-child {
    font-weight: 800;
    color: var(--green-800);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 2px solid var(--green-100);
    padding-bottom: 16px;
}
.schedule-row span:first-child {
    font-weight: 700;
    color: var(--text-dark);
}
.schedule-row span:last-child {
    color: var(--text-mid);
}
.schedule-row:last-child {
    border-bottom: none;
}
.schedule-row.closed span:last-child {
    color: var(--green-600);
    font-weight: 700;
}
.schedule-note {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
}

/* ── Map / Contact ── */
.map {
    padding: 100px 0;
    background: var(--cream);
}
.map-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    min-height: 480px;
}
.map-info {
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.map-info .section-title {
    text-align: left;
    margin-bottom: 20px;
}
.map-address {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-mid);
    font-size: 16px;
    margin-bottom: 28px;
    line-height: 1.6;
}
.map-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}
.map-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-mid);
    font-size: 15px;
}
.map-contact-item a {
    color: var(--green-700);
    font-weight: 700;
    transition: var(--transition);
}
.map-contact-item a:hover {
    color: var(--green-800);
}
.map-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.map-frame {
    min-height: 400px;
}
.map-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* ── Footer ── */
.footer {
    background: var(--green-900);
    color: rgba(255,255,255,0.7);
    padding: 72px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 56px;
}
.footer-brand .logo-text .logo-line1 {
    color: var(--white);
}
.footer-brand .logo-text .logo-line2 {
    color: rgba(255,255,255,0.5);
}
.footer-desc {
    margin-top: 20px;
    font-size: 15px;
    line-height: 1.8;
    max-width: 320px;
}
.footer h4 {
    color: var(--white);
    font-family: var(--font-display);
    font-size: 18px;
    margin-bottom: 20px;
}
.footer ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer ul a {
    color: rgba(255,255,255,0.6);
    font-size: 15px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer ul a:hover {
    color: var(--green-400);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: rgba(255,255,255,0.4);
}

/* ── Animations ── */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-aos].aos-visible {
    opacity: 1;
    transform: translateY(0);
}
[data-aos].aos-delay-1 { transition-delay: 0.1s; }
[data-aos].aos-delay-2 { transition-delay: 0.2s; }
[data-aos].aos-delay-3 { transition-delay: 0.3s; }
[data-aos].aos-delay-4 { transition-delay: 0.4s; }
[data-aos].aos-delay-5 { transition-delay: 0.5s; }
[data-aos].aos-delay-6 { transition-delay: 0.6s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-grid {
        gap: 48px;
    }
    .about-img-secondary {
        right: -20px;
        bottom: -24px;
        width: 180px;
    }
    .about-img-secondary img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 100px 32px 32px;
        gap: 4px;
        box-shadow: var(--shadow-xl);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }
    .nav-menu.open {
        transform: translateX(0);
    }
    .nav-menu a {
        padding: 14px 16px;
        font-size: 16px;
    }
    .btn-nav {
        margin-left: 0;
        text-align: center;
        justify-content: center;
        margin-top: 12px;
    }
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 999;
    }
    .nav-overlay.active {
        display: block;
    }

    .hero-content {
        padding: 120px 0 100px;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .hero-buttons .btn {
        justify-content: center;
    }
    .hero-trust {
        gap: 20px;
    }

    .info-cards .container {
        grid-template-columns: 1fr;
    }

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

    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-img-main img {
        height: 360px;
    }
    .about-img-secondary {
        right: 0;
        bottom: -32px;
        width: 160px;
    }
    .about-img-secondary img {
        height: 160px;
    }
    .about-experience {
        right: 20px;
        top: -16px;
    }
    .about-values {
        grid-template-columns: 1fr;
    }

    .cta-inner {
        flex-direction: column;
        text-align: center;
    }
    .cta-text {
        margin: 0 auto;
    }
    .cta-actions {
        justify-content: center;
    }

    .schedule-wrapper {
        padding: 32px 24px;
    }
    .schedule-row {
        grid-template-columns: 120px 1fr;
        font-size: 14px;
    }

    .map-wrapper {
        grid-template-columns: 1fr;
    }
    .map-info {
        padding: 40px 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-description {
        font-size: 16px;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .service-card-img {
        height: 180px;
    }
}
