/* ============================================================
   Clinica Generis - Main Stylesheet
   Paleta: Albastru #1B4F72 | Auriu #C9A84C | Crem #F5F0E8
   ============================================================ */

/* ─── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --color-primary:    #1B4F72;
  --color-primary-dk: #133a55;
  --color-gold:       #C9A84C;
  --color-gold-lt:    #d4b566;
  --color-cream:      #F5F0E8;
  --color-cream-dk:   #ede5d5;
  --color-text:       #2c2c2c;
  --color-muted:      #6b7280;
  --color-white:      #ffffff;
  --color-border:     #e5e7eb;
  --font-sans:        'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-serif:       'Playfair Display', Georgia, serif;
  --radius-sm:        6px;
  --radius-md:        12px;
  --radius-lg:        20px;
  --shadow-sm:        0 1px 4px rgba(27,79,114,.08);
  --shadow-md:        0 4px 16px rgba(27,79,114,.12);
  --shadow-lg:        0 8px 32px rgba(27,79,114,.16);
  --transition:       0.25s ease;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn-primary-gen {
  background: var(--color-gold);
  color: var(--color-white);
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .3px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary-gen:hover {
  background: var(--color-gold-lt);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-gen {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 12px 30px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
  display: inline-block;
  text-decoration: none;
}
.btn-outline-gen:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* ─── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar-generis {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.navbar-generis .navbar-brand img {
  height: 48px;
  width: auto;
}

.navbar-generis .nav-link {
  color: var(--color-text);
  font-weight: 500;
  font-size: 15px;
  padding: 28px 16px !important;
  transition: color var(--transition);
  position: relative;
}
.navbar-generis .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 3px;
  background: var(--color-gold);
  transition: left var(--transition), right var(--transition);
}
.navbar-generis .nav-link:hover,
.navbar-generis .nav-link.active {
  color: var(--color-primary);
}
.navbar-generis .nav-link:hover::after,
.navbar-generis .nav-link.active::after {
  left: 0;
  right: 0;
}

.navbar-phone {
  font-weight: 700;
  color: var(--color-primary) !important;
  font-size: 15px;
}
.navbar-phone:hover { color: var(--color-gold) !important; }

/* ─── Top Bar ─────────────────────────────────────────────────────────────────── */
.topbar {
  background: var(--color-primary);
  color: rgba(255,255,255,.85);
  font-size: 13px;
  padding: 8px 0;
}
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: var(--color-gold); }

/* ─── Hero Section ───────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2e6f9e 100%);
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/images/clinic/hero-pattern.svg') center/cover;
  opacity: .05;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
  color: var(--color-white);
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--color-gold); }
.hero p {
  color: rgba(255,255,255,.85);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}
.hero-image {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* ─── Trust Bar ───────────────────────────────────────────────────────────────── */
.trust-bar {
  background: var(--color-cream);
  padding: 32px 0;
  border-top: 1px solid var(--color-cream-dk);
  border-bottom: 1px solid var(--color-cream-dk);
}
.trust-item {
  text-align: center;
  padding: 0 24px;
}
.trust-item .number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
}
.trust-item .label {
  font-size: 14px;
  color: var(--color-muted);
  margin-top: 4px;
}

/* ─── Section ────────────────────────────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-cream { background: var(--color-cream); }
.section-primary { background: var(--color-primary); }

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 0.5rem;
}
.section-subtitle {
  color: var(--color-muted);
  font-size: 1.0625rem;
  margin-bottom: 2.5rem;
}
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--color-gold);
  margin: 12px 0 24px;
}

/* ─── Service Card ───────────────────────────────────────────────────────────── */
.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  height: 100%;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 56px;
  height: 56px;
  background: var(--color-cream);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
}
.service-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.service-card p {
  color: var(--color-muted);
  font-size: 14px;
  margin: 0;
}
.service-duration {
  font-size: 12px;
  color: var(--color-gold);
  font-weight: 600;
  margin-top: 12px;
  display: block;
}

/* ─── Doctor Card ────────────────────────────────────────────────────────────── */
.doctor-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  height: 100%;
}
.doctor-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.doctor-card-img {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--color-cream);
}
.doctor-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.doctor-card:hover .doctor-card-img img { transform: scale(1.04); }
.doctor-card-body {
  padding: 20px;
}
.doctor-title {
  font-size: 12px;
  color: var(--color-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.doctor-card-body h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}
.doctor-specialty {
  font-size: 13px;
  color: var(--color-muted);
}

/* ─── Blog Card ──────────────────────────────────────────────────────────────── */
.blog-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.blog-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-cream);
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-cat-badge {
  background: var(--color-cream);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}
.blog-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  flex: 1;
}
.blog-meta {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

/* ─── Breadcrumb ─────────────────────────────────────────────────────────────── */
.breadcrumb-wrap {
  background: var(--color-cream);
  padding: 12px 0;
  border-bottom: 1px solid var(--color-cream-dk);
}
.breadcrumb {
  margin: 0;
  font-size: 14px;
}
.breadcrumb-item a { color: var(--color-primary); }
.breadcrumb-item.active { color: var(--color-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--color-muted); }

/* ─── Page Hero ───────────────────────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary), #2e6f9e);
  padding: 64px 0;
  color: white;
}
.page-hero h1 { color: white; font-size: clamp(1.75rem, 3vw, 2.5rem); }
.page-hero p { color: rgba(255,255,255,.8); margin: 0; font-size: 1.0625rem; }

/* ─── FAQ Accordion ──────────────────────────────────────────────────────────── */
.faq-accordion .accordion-button {
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-white);
}
.faq-accordion .accordion-button:not(.collapsed) {
  background: var(--color-cream);
  color: var(--color-primary);
  box-shadow: none;
}
.faq-accordion .accordion-button::after {
  filter: invert(25%) sepia(90%) saturate(500%) hue-rotate(190deg);
}

/* ─── Info Box ───────────────────────────────────────────────────────────────── */
.info-box {
  background: var(--color-cream);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 24px 0;
}

/* ─── CTA Section ────────────────────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary), #2e6f9e);
  padding: 80px 0;
  text-align: center;
}
.cta-section h2 { color: var(--color-white); }
.cta-section p { color: rgba(255,255,255,.8); font-size: 1.0625rem; margin-bottom: 2rem; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
footer {
  background: #0f2c42;
  color: rgba(255,255,255,.75);
  padding: 64px 0 0;
}
footer h5 {
  color: var(--color-gold);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
footer a { color: rgba(255,255,255,.65); font-size: 14px; }
footer a:hover { color: var(--color-gold); }
.footer-brand img { height: 40px; filter: brightness(0) invert(1); opacity: .9; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
  margin-top: 48px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  color: rgba(255,255,255,.75) !important;
  transition: background var(--transition), color var(--transition);
  margin-right: 8px;
}
.social-link:hover {
  background: var(--color-gold);
  color: white !important;
}

/* ─── Booking Page ───────────────────────────────────────────────────────────── */
.booking-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
}
.booking-step {
  flex: 1;
  text-align: center;
  padding: 16px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-cream);
  border: 2px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted);
  transition: all var(--transition);
}
.booking-step.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.booking-step.completed {
  background: var(--color-cream);
  color: var(--color-gold);
  border-color: var(--color-gold);
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.slot-btn {
  padding: 10px 8px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.slot-btn:hover { border-color: var(--color-gold); color: var(--color-primary); }
.slot-btn.selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ─── Admin sidebar ──────────────────────────────────────────────────────────── */
.admin-sidebar {
  background: var(--color-primary);
  min-height: 100vh;
  width: 260px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
}
.admin-sidebar .brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-sidebar .brand span { color: var(--color-gold); font-weight: 700; font-size: 18px; }
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,.75);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.admin-nav-link:hover,
.admin-nav-link.active {
  background: rgba(255,255,255,.08);
  color: white;
  border-left-color: var(--color-gold);
}
.admin-content {
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
  background: #f8f9fa;
}
.admin-topbar {
  background: white;
  padding: 12px 32px;
  margin-left: 260px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

/* ─── Form Styles ────────────────────────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.2rem rgba(27,79,114,.15);
}
.form-label { font-weight: 500; font-size: 14px; }

/* ─── Tables ─────────────────────────────────────────────────────────────────── */
.table thead th {
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border: none;
}

/* ─── Status Badges ──────────────────────────────────────────────────────────── */
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-completed { background: #dbeafe; color: #1e40af; }

/* ─── Loading Spinner ────────────────────────────────────────────────────────── */
.spinner-generis {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-cream-dk);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Author Box ─────────────────────────────────────────────────────────────── */
.author-box {
  background: var(--color-cream);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 40px 0;
}
.author-box img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-box h4 { font-size: 1rem; margin-bottom: 4px; }
.author-box p { font-size: 14px; color: var(--color-muted); margin: 0; }

/* ─── TOC (Table of Contents) ────────────────────────────────────────────────── */
.toc-box {
  background: var(--color-cream);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 24px 0;
}
.toc-box h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.toc-box ol { margin: 0; padding-left: 20px; }
.toc-box li { font-size: 14px; margin-bottom: 4px; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform var(--transition); }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-content, .admin-topbar { margin-left: 0; }
  .hero { min-height: auto; padding: 60px 0; }
}

@media (max-width: 767.98px) {
  .section { padding: 56px 0; }
  .trust-bar { padding: 24px 0; }
  .trust-item { margin-bottom: 16px; }
  .navbar-generis .nav-link { padding: 12px 16px !important; }
  .navbar-generis .nav-link::after { display: none; }
  .booking-steps { flex-wrap: wrap; }
}

/* ─── Print ───────────────────────────────────────────────────────────────────── */
@media print {
  .navbar-generis, footer, .cta-section, .admin-sidebar, .admin-topbar { display: none !important; }
}
