/* Pharmacist365.in - Modern Pharmacy Educational Portal Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300&display=swap');

:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #10b981;
  --primary-subtle: #ecfdf5;
  --secondary: #0284c7;
  --secondary-dark: #0369a1;
  --accent: #4f46e5;
  --dark: #0f172a;
  --dark-surface: #1e293b;
  --gray-bg: #f8fafc;
  --gray-border: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --shadow-hover: 0 14px 30px rgba(5, 150, 105, 0.15);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--gray-bg);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--primary-dark);
}

/* ==========================================================
   Header: 3-Row Layout (Top Bar, Middle Bar, Navigation Bar)
   ========================================================== */

/* Row 1: Header Top Bar (AdSense Legal Links & Contact) */
.header-top-bar {
  background-color: #0f172a;
  color: #94a3b8;
  font-size: 0.82rem;
  border-bottom: 1px solid #1e293b;
}
.top-bar-links {
  gap: 3px;
  font-weight: 500;
}
.top-legal-link {
  color: #cbd5e1 !important;
  text-decoration: none;
  padding: 2px 7px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.top-legal-link:hover, .top-legal-link.active {
  color: #34d399 !important;
  background-color: rgba(52, 211, 153, 0.12);
}
.top-bar-sep {
  color: #334155;
  user-select: none;
  font-size: 0.75rem;
}
.top-bar-contact {
  font-size: 0.8rem;
  color: #cbd5e1;
}

/* Row 2: Header Middle Bar (Logo, Cart, Login / Signup) */
.header-middle-bar {
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}
.brand-logo {
  display: flex;
  align-items: center;
  height: 44px;
}
.brand-logo img {
  height: 42px;
  width: auto;
}
.cart-btn-pill {
  position: relative;
  background: var(--primary-subtle);
  color: var(--primary) !important;
  font-weight: 600;
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: 50px;
  padding: 0.45rem 1rem !important;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.cart-btn-pill:hover {
  background: #d1fae5;
  border-color: var(--primary);
  color: var(--primary-dark) !important;
}
.cart-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50px;
  padding: 2px 7px;
  min-width: 18px;
  text-align: center;
}

/* Row 3: Header Nav Bar (Menu & Dropdowns) */
.header-nav-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--gray-border);
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.header-nav-bar .nav-link {
  font-weight: 500;
  color: #334155 !important;
  padding: 0.65rem 0.95rem !important;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.header-nav-bar .nav-link:hover, 
.header-nav-bar .nav-link.active {
  color: var(--primary) !important;
  background-color: var(--primary-subtle);
}
.header-nav-bar .dropdown-menu {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  box-shadow: var(--shadow-md);
  min-width: 220px;
}
.header-nav-bar .dropdown-item {
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  color: #334155;
  transition: all 0.15s ease;
}
.header-nav-bar .dropdown-item:hover,
.active-dropdown-item {
  background-color: var(--primary-subtle) !important;
  color: var(--primary) !important;
}

/* Desktop Hover Dropdowns for Row 3 */
@media (min-width: 992px) {
  .header-nav-bar .nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
    animation: fadeInNav 0.18s ease-in-out;
  }
}
@keyframes fadeInNav {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 40%, #0f766e 80%, #0369a1 100%);
  color: #ffffff;
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.8;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.hero-title span {
  color: #6ee7b7;
}

.hero-sub {
  font-size: 1.15rem;
  color: #e2e8f0;
  max-width: 620px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Search Bar */
.hero-search-box {
  background: #ffffff;
  padding: 6px;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  max-width: 580px;
}
.hero-search-box input {
  border: none;
  outline: none;
  padding: 10px 18px;
  font-size: 1rem;
  flex: 1;
  border-radius: 50px;
}
.hero-search-box button {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  font-weight: 600;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.hero-search-box button:hover {
  background: var(--primary-dark);
}

/* Syllabus Category Cards */
.cat-pill-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.cat-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cat-pill:hover, .cat-pill.active {
  background: #ffffff;
  color: var(--primary-dark);
}

/* Material / Book Cards */
.book-card {
  background: #ffffff;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.28s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.book-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(5, 150, 105, 0.4);
}

.book-card-cover-wrapper {
  position: relative;
  background: #f1f5f9;
  text-align: center;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-border);
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.book-card-cover {
  max-height: 200px;
  width: auto;
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
  transition: transform 0.28s;
}
.book-card:hover .book-card-cover {
  transform: scale(1.04);
}

.badge-float {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.badge-free {
  background: #10b981;
  color: #ffffff;
}
.badge-paid {
  background: #0284c7;
  color: #ffffff;
}

.book-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.book-category-tag {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.book-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-card-title a {
  color: inherit;
}
.book-card-title a:hover {
  color: var(--primary);
}

.book-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.book-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--gray-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.book-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
}
.book-price.is-free {
  color: var(--primary);
  font-size: 1.05rem;
}

.btn-pharm-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-pharm-primary:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

.btn-pharm-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 7px 15px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-pharm-outline:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Feature Boxes */
.feature-card {
  background: #ffffff;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
  transition: all 0.2s;
  height: 100%;
}
.feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.feature-icon-wrapper {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--primary-subtle);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

/* Google AdSense Area Styling */
.ad-container {
  margin: 1.5rem auto;
  max-width: 1140px;
  overflow: hidden;
}
.ad-preview-box {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  text-align: center;
}
.ad-preview-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}
.ad-tag {
  font-size: 0.75rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}
.ad-badge-live {
  font-size: 0.8rem;
  font-weight: 600;
  color: #059669;
}

/* Testimonial Cards */
.testimonial-card {
  background: #ffffff;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  height: 100%;
}
.student-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Footer */
.pharm-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
.pharm-footer h5 {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}
.pharm-footer a {
  color: #94a3b8;
}
.pharm-footer a:hover {
  color: #34d399;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
}

/* Toast alert notification */
#cart-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  display: none;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  font-weight: 500;
  border-left: 4px solid var(--primary);
}
/* ==========================================================
   Mobile Bottom Navigation Bar (Screens < 768px)
   ========================================================== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid var(--gray-border);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  z-index: 1040;
}
.mobile-bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  max-width: 600px;
  margin: 0 auto;
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #64748b;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  transition: all 0.2s ease;
  padding: 4px 2px;
  text-align: center;
  position: relative;
}
.mobile-nav-item i {
  font-size: 1.15rem;
  margin-bottom: 2px;
  transition: transform 0.15s ease;
}
.mobile-nav-item:hover, 
.mobile-nav-item.active {
  color: var(--primary) !important;
}
.mobile-nav-item.active i {
  transform: translateY(-2px);
}
.mobile-nav-badge {
  position: absolute;
  top: -4px;
  right: -10px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}

/* ==========================================================
   Legal & AdSense Pages Styling
   ========================================================== */
.legal-content h4 {
  font-size: 1.25rem;
  color: #0f172a;
}
.legal-content p, .legal-content li {
  line-height: 1.75;
  font-size: 0.95rem;
}
.active-legal {
  background-color: var(--primary-subtle) !important;
  border-left: 3px solid var(--primary) !important;
}
.hover-success:hover {
  color: #34d399 !important;
}

/* ==========================================================
   Responsive Breakpoints
   ========================================================== */
@media (max-width: 991.98px) {
  .header-nav-bar {
    box-shadow: none;
  }
  .header-nav-bar .navbar-collapse {
    background: #ffffff;
    border-top: 1px solid var(--gray-border);
    border-bottom: 1px solid var(--gray-border);
    padding: 0.75rem 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  }
  .header-nav-bar .dropdown-menu {
    border: none;
    box-shadow: none;
    padding-left: 1rem;
    background: #f8fafc;
    border-radius: var(--radius-sm);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-sub {
    font-size: 1rem;
  }
  body {
    padding-bottom: 64px; /* Space for fixed mobile bottom nav */
  }
  #cart-toast {
    bottom: 74px !important; /* Avoid overlap with mobile bottom bar */
  }
  .top-bar-links {
    font-size: 0.72rem;
    justify-content: center;
    width: 100%;
  }
  .top-legal-link {
    padding: 1px 4px;
  }
}
