/* ===================================
   FARMACIA PILAR MUÑOZ
   Bold Editorial Style
   Forest Green + Off-White
   =================================== */

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

:root {
    --forest: #1B4332;
    --forest-light: #2D6A4F;
    --forest-dark: #0F291F;
    --cream: #FEFAE0;
    --cream-dark: #F5F0DC;
    --cream-light: #FFFDF5;
    --gold: #D4A843;
    --gold-light: #E8C876;
    --text-dark: #1A1A1A;
    --text-muted: #555555;
    --text-light: #888888;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(27, 67, 50, 0.08);
    --shadow-md: 0 8px 30px rgba(27, 67, 50, 0.12);
    --shadow-lg: 0 20px 60px rgba(27, 67, 50, 0.15);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--cream);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.15;
    color: var(--forest);
}

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

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

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

/* --- Side Navigation --- */
.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--forest);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 2rem;
    transition: var(--transition);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-logo-icon {
    font-size: 1.75rem;
    color: var(--gold);
    line-height: 1;
}

.nav-logo-text {
    display: flex;
    flex-direction: column;
}

.nav-logo-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cream);
    letter-spacing: 0.02em;
}

.nav-logo-sub {
    font-size: 0.7rem;
    color: rgba(254, 250, 224, 0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-links li a {
    display: block;
    padding: 0.875rem 1rem;
    color: rgba(254, 250, 224, 0.7);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-links li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: var(--transition);
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--cream);
    background: rgba(255, 255, 255, 0.08);
}

.nav-links li a:hover::before,
.nav-links li a.active::before {
    width: 3px;
}

.nav-toggle {
    display: none;
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 1100;
    width: 48px;
    height: 48px;
    background: var(--forest);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--cream);
    border-radius: 2px;
    transition: var(--transition);
}

.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(5px, -5px);
}

/* --- Scroll Content --- */
.scroll-content {
    margin-left: 280px;
    min-height: 100vh;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0;
    position: relative;
    overflow: hidden;
    background: var(--cream);
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(27, 67, 50, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 168, 67, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    padding: 6rem 4rem 4rem;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(27, 67, 50, 0.08);
    border: 1px solid rgba(27, 67, 50, 0.15);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--forest);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 700;
    color: var(--forest);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.title-accent {
    color: var(--gold);
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 480px;
    margin-bottom: 2.5rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--forest);
    color: var(--cream);
    border-color: var(--forest);
}

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

.btn-secondary {
    background: transparent;
    color: var(--forest);
    border-color: var(--forest);
}

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

.btn-outline {
    background: transparent;
    color: var(--forest);
    border-color: var(--forest);
}

.btn-outline:hover {
    background: var(--forest);
    color: var(--cream);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.hero-image {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, var(--cream), transparent);
    pointer-events: none;
}

/* --- Section Common --- */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 3.25rem);
    font-weight: 700;
    color: var(--forest);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 560px;
}

/* --- Services Section --- */
.services {
    padding: 8rem 0;
    background: var(--cream-light);
}

.services .container {
    text-align: center;
}

.services .section-subtitle {
    margin: 0 auto 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    text-align: left;
}

.service-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.25rem;
    transition: var(--transition);
    border: 1px solid rgba(27, 67, 50, 0.06);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--forest), var(--gold));
    opacity: 0;
    transition: var(--transition);
}

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

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 64px;
    height: 64px;
    background: rgba(27, 67, 50, 0.08);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--forest);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--forest);
    color: var(--cream);
}

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

.service-card p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- About Section --- */
.about {
    padding: 8rem 0;
    background: var(--cream);
}

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

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

.about-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(27, 67, 50, 0.2), transparent 50%);
    border-radius: 24px;
}

.about-content .section-title {
    margin-bottom: 1.5rem;
}

.about-text {
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 1.25rem;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(27, 67, 50, 0.1);
}

.value-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.value-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--forest);
}

.value-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* --- Team Section --- */
.team {
    padding: 8rem 0;
    background: var(--forest);
    color: var(--cream);
}

.team .section-label {
    color: var(--gold);
}

.team .section-title {
    color: var(--cream);
}

.team-header {
    text-align: center;
    margin-bottom: 4rem;
}

.team-header .section-subtitle {
    margin: 0 auto;
    color: rgba(254, 250, 224, 0.7);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.team-card {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.team-card-image {
    height: 320px;
    overflow: hidden;
}

.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.team-card:hover .team-card-image img {
    transform: scale(1.05);
}

.team-card-info {
    padding: 1.75rem 2rem 2rem;
}

.team-card-info h3 {
    font-size: 1.375rem;
    color: var(--cream);
    margin-bottom: 0.25rem;
}

.team-card-info p {
    font-size: 0.875rem;
    color: var(--gold);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.team-card-desc {
    font-size: 0.9375rem;
    color: rgba(254, 250, 224, 0.65);
    line-height: 1.7;
}

/* --- Schedule Section --- */
.schedule {
    padding: 8rem 0;
    background: var(--cream-light);
}

.schedule-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.schedule-text {
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 2rem;
}

.schedule-right {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.schedule-table {
    width: 100%;
}

.schedule-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 1.125rem 2rem;
    border-bottom: 1px solid rgba(27, 67, 50, 0.07);
    transition: var(--transition);
}

.schedule-row:last-child {
    border-bottom: none;
}

.schedule-row.header {
    background: var(--forest);
    color: var(--cream);
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.schedule-row:not(.header):hover {
    background: rgba(27, 67, 50, 0.03);
}

.schedule-row span {
    font-size: 0.9375rem;
    color: var(--text-dark);
}

.schedule-row span:first-child {
    font-weight: 500;
}

.schedule-row.closed span:last-child {
    color: var(--gold);
    font-weight: 600;
}

/* --- Contact Section --- */
.contact {
    padding: 8rem 0;
    background: var(--cream);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.contact-text {
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 3rem;
}

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

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

.contact-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background: rgba(27, 67, 50, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--forest);
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.contact-value {
    display: block;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.contact-value a:hover {
    color: var(--forest);
}

/* --- Contact Form --- */
.contact-form-wrapper {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--forest);
}

.form-group input,
.form-group textarea {
    padding: 1rem 1.25rem;
    border: 1.5px solid rgba(27, 67, 50, 0.15);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: var(--text-dark);
    background: var(--cream-light);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--forest);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(27, 67, 50, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

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

.form-success {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: rgba(27, 67, 50, 0.08);
    border-radius: 12px;
    color: var(--forest);
    font-size: 0.9375rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.form-success svg {
    color: var(--forest);
    flex-shrink: 0;
}

/* --- Footer --- */
.footer {
    background: var(--forest-dark);
    color: var(--cream);
    padding: 5rem 0 2rem;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.footer-logo-icon {
    font-size: 1.5rem;
    color: var(--gold);
}

.footer-logo-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--cream);
}

.footer-desc {
    font-size: 0.9375rem;
    color: rgba(254, 250, 224, 0.6);
    line-height: 1.8;
    max-width: 320px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links ul li a,
.footer-contact ul li a {
    font-size: 0.9375rem;
    color: rgba(254, 250, 224, 0.6);
}

.footer-links ul li a:hover,
.footer-contact ul li a:hover {
    color: var(--cream);
}

.footer-contact ul li {
    font-size: 0.9375rem;
    color: rgba(254, 250, 224, 0.6);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(254, 250, 224, 0.4);
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- Responsive --- */
@media (max-width: 1024px) {
    .side-nav {
        width: 240px;
    }
    
    .scroll-content {
        margin-left: 240px;
    }
    
    .hero-content {
        padding: 5rem 3rem 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid,
    .schedule-content,
    .contact-grid {
        gap: 3rem;
    }
}

@media (max-width: 900px) {
    .side-nav {
        transform: translateX(-100%);
    }
    
    .side-nav.open {
        transform: translateX(0);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .scroll-content {
        margin-left: 0;
    }
    
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .hero-content {
        padding: 7rem 2rem 4rem;
        order: 2;
    }
    
    .hero-image {
        height: 50vh;
        order: 1;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image-wrapper {
        order: -1;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .schedule-content {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .hero-content {
        padding: 6rem 1.5rem 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services,
    .about,
    .team,
    .schedule,
    .contact {
        padding: 5rem 0;
    }
    
    .container {
        padding: 0 1.25rem;
    }
    
    .about-values {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .schedule-row {
        padding: 1rem 1.25rem;
    }
}
