/* ========================================
   Farmacia Barcelona — Custom Styles
   Midnight Blue + Mint Editorial Design
======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(74, 222, 128, 0.25);
    color: #f0fdf4;
}

/* ---- Sidebar Navigation ---- */
.sidebar {
    width: 64px;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(74, 222, 128, 0.08);
    z-index: 50;
}

.side-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-nav-link {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px 0;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.side-nav-link .nav-num {
    font-size: 9px;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.4);
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
    transition: color 0.3s ease;
    width: 20px;
    text-align: right;
    flex-shrink: 0;
}

.side-nav-link .nav-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.side-nav-link .nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.2);
    margin-left: auto;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Hover state */
.side-nav-link:hover .nav-num {
    color: rgba(74, 222, 128, 0.6);
}

.side-nav-link:hover .nav-label {
    opacity: 1;
    max-width: 120px;
    margin-left: 8px;
    color: rgba(203, 213, 225, 0.8);
}

.side-nav-link:hover .nav-dot {
    background: rgba(74, 222, 128, 0.5);
    transform: scale(1.3);
}

/* Active state */
.side-nav-link.active .nav-num {
    color: #4ade80;
}

.side-nav-link.active .nav-label {
    opacity: 1;
    max-width: 120px;
    margin-left: 8px;
    color: #f0fdf4;
}

.side-nav-link.active .nav-dot {
    background: #4ade80;
    transform: scale(1.5);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

/* Logo */
.logo-link {
    text-decoration: none;
}

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

.logo-text {
    font-family: 'Playfair Display', Georgia, serif;
}

.logo-sub {
    font-family: 'Inter', sans-serif;
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    min-width: 0;
}

.content-section {
    position: relative;
}

/* ---- Overline ---- */
.overline-text {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #4ade80;
    font-family: 'Inter', sans-serif;
    position: relative;
    padding-left: 24px;
}

.overline-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 16px;
    height: 1px;
    background: #4ade80;
}

/* ---- Section Titles ---- */
.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.25rem, 4vw, 3.75rem);
    font-weight: 700;
    line-height: 1.05;
    color: #f0fdf4;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #94a3b8;
    max-width: 520px;
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #4ade80;
    color: #0a1628;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    background: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.25);
}

.btn-primary .btn-arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translate(3px, -3px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: #f0fdf4;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 100px;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.25);
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.btn-secondary:hover {
    border-color: #4ade80;
    color: #4ade80;
    transform: translateY(-2px);
}

/* ---- Service Cards ---- */
.service-card {
    position: relative;
}

.service-card-inner {
    padding: 2rem;
    background: rgba(15, 34, 57, 0.5);
    border: 1px solid rgba(74, 222, 128, 0.06);
    border-radius: 20px;
    transition: all 0.4s ease;
    height: 100%;
}

.service-card:hover .service-card-inner {
    border-color: rgba(74, 222, 128, 0.2);
    background: rgba(15, 34, 57, 0.8);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.service-icon-wrap {
    width: 56px;
    height: 56px;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.service-card:hover .service-icon-wrap {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.3);
    transform: scale(1.05);
}

.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #f0fdf4;
    letter-spacing: -0.01em;
}

.service-desc {
    font-size: 0.925rem;
    line-height: 1.7;
    color: #94a3b8;
}

.service-line {
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #4ade80, transparent);
    border-radius: 2px;
    margin-top: 1.25rem;
    transition: width 0.4s ease;
}

.service-card:hover .service-line {
    width: 48px;
}

/* ---- Values Grid ---- */
.value-item {
    padding: 0.5rem 0;
}

.value-num {
    font-family: 'Playfair Display', Georgia, serif;
}

.value-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.value-desc {
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ---- Schedule ---- */
.schedule-day {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
}

.schedule-time {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.schedule-note {
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ---- Contact Info ---- */
.contact-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

.contact-value {
    font-size: 1rem;
    line-height: 1.6;
}

/* ---- Form ---- */
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(10, 22, 40, 0.6);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: 12px;
    color: #f0fdf4;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #475569;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(10, 22, 40, 0.8);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.08);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: rgba(74, 222, 128, 0.2);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-select option {
    background: #0a1628;
    color: #f0fdf4;
}

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

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

/* Success message */
.form-success {
    animation: fadeIn 0.4s ease;
}

/* ---- Animations ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ---- Reveal on Scroll ---- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ---- Scroll Indicator ---- */
.scroll-indicator {
    font-family: 'Inter', sans-serif;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, #4ade80, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ---- Status Dot ---- */
.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

/* ---- Hero Image ---- */
.hero-img {
    border-radius: 0;
}

.hero-img-overlay {
    border-radius: 0;
}

/* ---- About Image ---- */
.about-img {
    border-radius: 16px;
}

/* ---- Horario Image ---- */
.horario-img {
    border-radius: 16px;
}

/* ---- Map ---- */
.map-wrap {
    border-radius: 16px;
    overflow: hidden;
}

/* ========================================
   Mobile Responsive
======================================== */

/* Mobile Header */
.mobile-header {
    background: rgba(6, 14, 26, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 222, 128, 0.08);
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    background: #060e1a;
}

.mobile-menu-content {
    z-index: 10;
}

.mobile-menu-link {
    font-family: 'Playfair Display', Georgia, serif;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* ---- Responsive: Tablet+ Sidebar ---- */
@media (min-width: 768px) {
    .main-content {
        margin-left: 64px;
    }
    
    .sidebar {
        display: flex;
    }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 767px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hero-image {
        display: none;
    }
    
    .hero-float-card {
        display: none;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .about-accent,
    .about-accent2,
    .horario-accent {
        display: none;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer {
        text-align: center;
    }
}

/* ---- Responsive: Large screens ---- */
@media (min-width: 1280px) {
    .content-section {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ---- Utility ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ---- Focus styles ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
