/*
Theme Name: Aphranil Health Pro
Theme URI: https://aphranil.com
Author: Aphranil Pharmaceuticals
Author URI: https://aphranil.com
Description: Premium Custom WordPress Theme for Aphranil Pharmaceuticals Private Limited.
Version: 1.0.1
Text Domain: aphranil
*/

/* --- CSS RESET --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

/* --- CSS CUSTOM PROPERTIES --- */
:root {
  --color-primary: #0A4D8C;
  --color-secondary: #2AAE66;
  --color-accent: #00B8D9;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8FAFE;
  --color-text: #1A1A2E;
  --color-text-light: #6B7B8D;
  --color-glass: rgba(255, 255, 255, 0.15);
  
  --font-headings: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-sm: 0 2px 8px rgba(10, 77, 140, 0.04);
  --shadow-md: 0 4px 20px rgba(10, 77, 140, 0.08);
  --shadow-lg: 0 8px 40px rgba(10, 77, 140, 0.12);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50px;
  
  --transition: all 0.3s ease;
}

/* --- TYPOGRAPHY --- */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-text);
}
p { margin-bottom: 1rem; color: var(--color-text-light); }
a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-secondary); }
ul, ol { margin-bottom: 1rem; padding-left: 2rem; }
li { margin-bottom: 0.5rem; color: var(--color-text-light); }

/* --- LAYOUT UTILITIES --- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 30px; }
.section { padding: 100px 0; background: var(--color-bg); }
.section-alt { padding: 100px 0; background: var(--color-bg-alt); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
}
.btn-secondary:hover { background: #228b52; color: #fff; transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-lg { padding: 15px 35px; font-size: 1.1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

/* --- CARDS --- */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 30px;
  border: 1px solid rgba(0,0,0,0.05);
  transition: var(--transition);
}
.card-glass {
  background: var(--color-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.card-glass::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}
.card-elevated {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 40px 30px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card-elevated::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}
.card-elevated:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

/* FIX: card-icon – handle both SVG and emoji icons cleanly */
.card-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 77, 140, 0.05);
  border-radius: 50%;
  color: var(--color-primary);
  margin-bottom: 20px;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.card-icon svg { width: 26px; height: 26px; }

/* --- SECTION HEADERS --- */
/* FIX: use margin shorthand correctly so bottom margin isn't overridden */
.section-header {
  text-align: center;
  margin: 0 auto 60px;
  max-width: 700px;
}
.section-tag {
  display: inline-block;
  background: rgba(42, 174, 102, 0.1);
  color: var(--color-secondary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}
.section-title { font-size: 2.5rem; margin-bottom: 15px; }
.section-subtitle { font-size: 1.1rem; }

/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,77,140,0.85) 0%, rgba(10,37,64,0.95) 100%);
}

/* FIX: hero-content must fill full width so hero-badge can be positioned correctly */
.hero > .container {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 80px;
}

/* FIX: hero-content is the text block, not the container */
.hero-content {
  max-width: 800px;
  color: #fff;
}

/* Inner page heroes – center content, no extra top padding */
.hero-inner {
  min-height: 50vh;
}
.hero-inner > .container {
  justify-content: center;
  text-align: center;
  padding-top: 40px;
  padding-bottom: 40px;
}
.hero-inner .hero-content {
  max-width: 100%;
  text-align: center;
}

.hero-title { font-size: 3.5rem; color: #fff; margin-bottom: 20px; }
.hero-subtitle { font-size: 1.25rem; color: rgba(255,255,255,0.9); margin-bottom: 40px; font-weight: 400; }
.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; }
.hero-buttons .btn-outline { border-color: rgba(255,255,255,0.8) !important; color: #fff !important; }
.hero-buttons .btn-outline:hover { background: #fff !important; color: var(--color-primary) !important; border-color: #fff !important; }

/* FIX: hero-badge positioned absolutely relative to .hero (section), not hero-content */
.hero-badges-wrapper {
  position: absolute;
  bottom: 40px;
  right: 40px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 3;
}
.hero-badge {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 15px 25px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  gap: 15px;
  color: #fff;
}
.hero-badge svg { width: 32px; height: 32px; flex-shrink: 0; }
.hero-badge img { width: 40px; height: auto; }

/* --- NAVIGATION --- */
.top-bar {
  background-color: var(--color-primary);
  color: #fff;
  padding: 10px 0;
  font-size: 0.85rem;
}
.top-bar a { color: #fff; opacity: 0.9; }
.top-bar a:hover { opacity: 1; }
.top-contact { display: flex; gap: 20px; flex-wrap: wrap; }
.top-contact-item { display: flex; align-items: center; gap: 8px; }
.top-contact-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.top-social { display: flex; gap: 15px; }
.top-social a {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: var(--transition);
}
.top-social a svg { width: 14px; height: 14px; }
.top-social a:hover { background: var(--color-secondary); transform: translateY(-2px); }

.site-header {
  background: #fff;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.site-header.scrolled {
  padding: 15px 0;
  box-shadow: var(--shadow-md);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.custom-logo { max-height: 60px; width: auto; transition: var(--transition); }
.site-header.scrolled .custom-logo { max-height: 50px; }

/* FIX: site-title (text logo fallback) should not use h1 default margin */
.site-title {
  font-family: var(--font-headings);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
  letter-spacing: -0.5px;
}
.site-title a { color: inherit; }
.site-title a:hover { color: var(--color-secondary); }
.site-description { font-size: 0.8rem; color: var(--color-text-light); margin: 0; }

.nav-menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 30px; }
.nav-item,
.nav-menu > li.menu-item { position: relative; }
.nav-link,
.nav-menu > li.menu-item > a {
  color: var(--color-text);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 0;
  display: inline-block;
  position: relative;
  text-decoration: none;
}
.nav-link::after,
.nav-menu > li.menu-item > a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--color-secondary);
  transition: var(--transition);
}
.nav-link:hover::after,
.nav-item.current-menu-item .nav-link::after,
.nav-menu > li.menu-item > a:hover::after,
.nav-menu > li.current-menu-item > a::after { width: 100%; }
.nav-link:hover,
.nav-menu > li.menu-item > a:hover { color: var(--color-primary); }

/* Mega Menu */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  width: max-content;
  max-width: 800px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  display: flex;
  gap: 30px;
  pointer-events: none;
  z-index: 100;
}
.nav-item.has-mega-menu:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.mega-menu-col h4 { font-size: 1rem; color: var(--color-primary); margin-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 10px; }
.mega-menu-col ul { list-style: none; padding: 0; margin: 0; }
.mega-menu-col ul li { margin-bottom: 8px; }
.mega-menu-col ul li a { color: var(--color-text-light); font-size: 0.9rem; }
.mega-menu-col ul li a:hover { color: var(--color-primary); padding-left: 5px; }

/* Mobile Menu */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 10px; z-index: 1001; }
.hamburger span { display: block; width: 25px; height: 2px; background: var(--color-primary); transition: var(--transition); border-radius: 2px; }

.mobile-menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10001; opacity: 0; visibility: hidden; transition: var(--transition); }
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu {
  position: fixed;
  top: 0; right: -320px;
  width: 300px; height: 100vh;
  background: #fff;
  z-index: 10002;
  box-shadow: var(--shadow-lg);
  transition: right 0.4s ease;
  overflow-y: auto;
  padding: 80px 30px 40px;
}
.mobile-menu.active { right: 0; }
.mobile-menu .nav-menu { flex-direction: column; gap: 0; }
.mobile-menu .nav-link,
.mobile-menu .nav-menu > li.menu-item > a {
  font-size: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: block;
  padding: 14px 0;
  width: 100%;
  color: var(--color-text);
  font-family: var(--font-headings);
  font-weight: 600;
  text-decoration: none;
}
.mobile-menu .nav-link::after,
.mobile-menu .nav-menu > li.menu-item > a::after { display: none; }
/* Sub-menus inside mobile drawer */
.mobile-menu .nav-menu .sub-menu {
  list-style: none;
  padding: 0 0 0 20px;
  margin: 0;
}
.mobile-menu .nav-menu .sub-menu li a {
  display: block;
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--color-text-light);
  border-bottom: 1px solid rgba(0,0,0,0.03);
  text-decoration: none;
}
.mobile-menu .nav-menu .sub-menu li a:hover { color: var(--color-primary); }
.no-scroll { overflow: hidden; }

/* --- FOOTER --- */
.site-footer {
  background: #0A2540;
  color: rgba(255,255,255,0.7);
  position: relative;
  overflow: hidden;
}
/* FIX: wave SVG needs negative margin to eliminate gap */
.section-wave {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: -4px;
}
.footer-main { padding: 80px 0; }
.footer-logo { max-width: 200px; margin-bottom: 25px; background: rgba(255,255,255,0.95); padding: 10px 15px; border-radius: var(--radius-sm); display: inline-block; }
.footer-logo-text {
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
  display: block;
  /* Remove the h3::after underline that looks wrong on logo text */
  padding-bottom: 0 !important;
}
.footer-logo-text::after { display: none !important; }

.footer-col h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 14px;
}
.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 2px;
  background: var(--color-secondary);
}
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.7); transition: var(--transition); font-size: 0.95rem; }
.footer-links a:hover { color: var(--color-accent); padding-left: 5px; }

.footer-contact .contact-item { display: flex; gap: 12px; margin-bottom: 18px; align-items: flex-start; }
.footer-contact .contact-icon {
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.footer-contact .contact-icon svg { width: 18px; height: 18px; }
.footer-contact .contact-text p { margin: 0; font-size: 0.9rem; line-height: 1.6; }
.footer-contact a { color: rgba(255,255,255,0.7); }
.footer-contact a:hover { color: var(--color-accent); }

.footer-social { display: flex; gap: 12px; margin-top: 25px; }
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: var(--transition);
}
.footer-social a svg { width: 18px; height: 18px; }
.footer-social a:hover { background: var(--color-secondary); transform: translateY(-3px); color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 25px 0;
  font-size: 0.9rem;
}
.footer-bottom .flex-between { flex-wrap: wrap; gap: 20px; }
.footer-bottom .copyright { color: rgba(255,255,255,0.7); }
.footer-legal-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal-links a { color: rgba(255,255,255,0.7); font-size: 0.875rem; }
.footer-legal-links a:hover { color: #fff; }

/* FIX: footer nav menu from wp_nav_menu – remove default styles */
.footer-links ul.menu,
.footer-legal-links ul.menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-legal-links ul.menu { flex-direction: row; gap: 20px; }
.footer-legal-links ul.menu li { margin: 0; }
.footer-links ul.menu li { margin: 0; }

/* --- BLOG --- */
.blog-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.blog-thumb { position: relative; height: 220px; overflow: hidden; background: #e9ecef; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.blog-card:hover .blog-thumb img { transform: scale(1.05); }
.blog-category-badge {
  position: absolute; top: 15px; left: 15px;
  background: var(--color-primary); color: #fff;
  padding: 5px 12px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; z-index: 2;
}
.blog-content { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.blog-meta { display: flex; gap: 15px; font-size: 0.85rem; color: var(--color-text-light); margin-bottom: 10px; flex-wrap: wrap; }
.blog-meta span { display: flex; align-items: center; gap: 5px; }
.blog-title { font-size: 1.2rem; margin-bottom: 12px; line-height: 1.4; }
.blog-title a { color: var(--color-text); }
.blog-title a:hover { color: var(--color-primary); }
.blog-excerpt { flex-grow: 1; margin-bottom: 20px; font-size: 0.95rem; }
.read-more { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.read-more svg { width: 16px; height: 16px; }

/* Single Post */
.post-content { padding-right: 40px; }
.entry-content p { font-size: 1.05rem; margin-bottom: 1.5rem; line-height: 1.7; }
.entry-content h2, .entry-content h3 { margin-top: 2rem; margin-bottom: 1rem; }
.entry-content img { border-radius: var(--radius-md); margin: 2rem 0; }
.post-author-box { display: flex; gap: 20px; background: var(--color-bg-alt); padding: 30px; border-radius: var(--radius-md); margin-top: 40px; align-items: center; }
.post-author-box img { width: 80px; height: 80px; border-radius: 50%; }
.post-tags { margin-top: 30px; display: flex; gap: 10px; flex-wrap: wrap; }
.post-tags a { background: rgba(0,0,0,0.05); padding: 5px 15px; border-radius: var(--radius-full); font-size: 0.85rem; color: var(--color-text); }
.post-tags a:hover { background: var(--color-primary); color: #fff; }

/* Sidebar */
.post-sidebar .widget { background: #fff; padding: 30px; border-radius: var(--radius-md); border: 1px solid rgba(0,0,0,0.05); margin-bottom: 30px; }
.widget-title { font-size: 1.15rem; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); position: relative; }
.widget-title::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 40px; height: 2px; background: var(--color-secondary); }
.widget ul { list-style: none; padding: 0; }
.widget ul li { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed rgba(0,0,0,0.06); }
.widget ul li:last-child { margin-bottom: 0; border-bottom: none; }
.widget ul li a { color: var(--color-text-light); font-size: 0.95rem; }
.widget ul li a:hover { color: var(--color-primary); }

/* --- PRODUCTS --- */
.product-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(10,77,140,0.1); }
.product-icon-wrapper {
  width: 80px; height: 80px;
  background: var(--color-bg-alt);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  color: var(--color-primary); font-size: 2rem;
}
.product-badge {
  position: absolute; top: 15px; right: -30px;
  background: var(--color-accent); color: #fff;
  padding: 5px 35px; transform: rotate(45deg);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
}
.product-title { font-size: 1.2rem; margin-bottom: 10px; }
.product-desc { font-size: 0.9rem; margin-bottom: 20px; }

/* FIX: product sidebar */
.product-sidebar .widget { margin-bottom: 25px; }
.product-sidebar .widget + .widget { margin-top: 0; }

/* product page layout */
.products-content .products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

/* Coming Soon Overlay */
.coming-soon-container { position: relative; }
.coming-soon-overlay { position: absolute; inset: 0; background: rgba(255,255,255,0.85); backdrop-filter: blur(5px); z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.coming-soon-content { background: #fff; padding: 40px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); max-width: 500px; }
.coming-soon-content h3 { font-size: 2rem; background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* --- FORMS --- */
.form-group { margin-bottom: 25px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.95rem; color: var(--color-text); }
.form-control, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: var(--transition);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.form-control:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 77, 140, 0.1);
}
/* FIX: select element styling */
select.form-control { 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='%236B7B8D' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; }
.form-textarea { min-height: 130px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.form-submit-wrapper { margin-top: 30px; }
.form-message { display: none; padding: 15px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 500; }
.form-message.success { display: block; background: rgba(42, 174, 102, 0.1); color: var(--color-secondary); border: 1px solid rgba(42, 174, 102, 0.2); }
.form-message.error { display: block; background: rgba(220, 53, 69, 0.1); color: #dc3545; border: 1px solid rgba(220, 53, 69, 0.2); }

/* --- TRUST BADGES & LICENSES --- */
.trust-section { position: relative; }
.license-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  padding: 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.05);
}
.license-icon {
  width: 52px; height: 52px;
  background: rgba(42, 174, 102, 0.1);
  color: var(--color-secondary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.license-icon svg { width: 24px; height: 24px; }
/* FIX: long license numbers overflow */
.license-info { min-width: 0; flex: 1; }
.license-info h4 { margin: 0 0 5px 0; font-size: 0.8rem; color: var(--color-text-light); text-transform: uppercase; letter-spacing: 1px; }
.license-info .trust-value {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  word-break: break-all;
  line-height: 1.3;
}

/* --- TIMELINE --- */
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding: 40px 0; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: rgba(10, 77, 140, 0.1); transform: translateX(-50%); }
.timeline-item { position: relative; margin-bottom: 60px; width: 50%; }
.timeline-item:nth-child(odd) { left: 0; padding-right: 50px; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; padding-left: 50px; }
.timeline-dot { position: absolute; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--color-secondary); border: 4px solid #fff; box-shadow: 0 0 0 4px rgba(42, 174, 102, 0.2); z-index: 2; }
.timeline-item:nth-child(odd) .timeline-dot { right: -10px; }
.timeline-item:nth-child(even) .timeline-dot { left: -10px; }
.timeline-date { display: inline-block; background: var(--color-primary); color: #fff; padding: 5px 15px; border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 600; margin-bottom: 15px; }
.timeline-content { background: #fff; padding: 30px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.timeline-content h4 { font-size: 1.2rem; margin-bottom: 10px; }

/* --- ACCORDION --- */
.accordion { margin-top: 40px; }
.accordion-item { border-bottom: 1px solid rgba(0,0,0,0.1); }
.accordion-header { padding: 20px 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.accordion-header h4 { margin: 0; font-size: 1.05rem; }
.accordion-icon { transition: transform 0.3s ease; color: var(--color-primary); flex-shrink: 0; }
.accordion-item.active .accordion-icon { transform: rotate(180deg); }
.accordion-content { padding: 0 0 20px 0; color: var(--color-text-light); line-height: 1.7; }

/* --- COUNTER --- */
.counter-box { text-align: center; }
.counter-value { font-family: var(--font-headings); font-weight: 700; font-size: 3rem; color: var(--color-primary); line-height: 1; margin-bottom: 10px; }
.counter-label { font-size: 1rem; font-weight: 500; color: var(--color-text); }

/* FIX: counter boxes inside grid need balanced padding */
.overview-stats.grid-2 .card { padding: 25px 20px; }
/* FIX: overview-stats alignment */
.overview-stats { align-content: start; }

/* --- CTA SECTION --- */
.cta-section { background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); padding: 80px 0; color: #fff; text-align: center; }
.cta-title { color: #fff; font-size: 2.5rem; margin-bottom: 20px; }
/* FIX: cta-text – use explicit left/right margin instead of margin-inline to avoid conflict */
.cta-text {
  font-size: 1.15rem;
  margin-bottom: 40px;
  opacity: 0.92;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255,255,255,0.92);
}
.cta-buttons { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.cta-buttons .btn-primary { background: #fff; color: var(--color-primary); }
.cta-buttons .btn-primary:hover { background: var(--color-bg-alt); color: var(--color-primary); }
.cta-buttons .btn-outline { border-color: rgba(255,255,255,0.6); color: #fff; }
.cta-buttons .btn-outline:hover { background: #fff; color: var(--color-primary); border-color: #fff; }

/* --- WHATSAPP FLOATING --- */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: var(--transition);
  animation: pulse 2s infinite;
}
.floating-whatsapp svg { width: 28px; height: 28px; }
.floating-whatsapp:hover { background: #128C7E; color: #fff; transform: scale(1.1); animation: none; }
.whatsapp-tooltip {
  position: absolute;
  right: 110%;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: var(--color-text);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.floating-whatsapp:hover .whatsapp-tooltip { opacity: 1; visibility: visible; }

/* --- COOKIE CONSENT --- */
.cookie-consent {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  padding: 18px 24px;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.5s ease;
  gap: 20px;
}
.cookie-consent.show { transform: translateY(0); }
.cookie-text { font-size: 0.9rem; flex: 1; }
.cookie-text p { margin: 0; color: var(--color-text-light); }
.cookie-text a { color: var(--color-primary); }

/* --- BACK TO TOP --- */
.back-to-top {
  position: fixed;
  bottom: 110px;
  right: 35px;
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--color-accent); transform: translateY(-3px); }

/* --- PAGINATION --- */
.pagination-wrapper { margin-top: 40px; }
.nav-links { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,0.12);
  color: var(--color-text);
  font-weight: 600;
  font-family: var(--font-headings);
  font-size: 0.9rem;
  transition: var(--transition);
}
.page-numbers.current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.page-numbers:hover:not(.current) { background: var(--color-bg-alt); border-color: var(--color-primary); color: var(--color-primary); }
.page-numbers.next, .page-numbers.prev { font-size: 1.1rem; }

/* --- ABOUT PAGE --- */
/* FIX: image-grid needs position:relative so experience-badge absolute positioning works */
.image-grid { position: relative; }
.experience-badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  padding: 20px 25px;
  border-radius: var(--radius-md);
  z-index: 2;
}

/* Team cards */
.team-card { overflow: hidden; transition: var(--transition); }
.team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.team-info { padding: 5px; }

/* Value boxes */
.value-box { padding: 20px 15px; text-align: center; }
.value-box .card-icon { margin: 0 auto 15px; }
.value-box h4 { font-size: 1.1rem; margin-bottom: 8px; }
.value-box p { font-size: 0.9rem; }

/* --- DISTRIBUTOR PAGE --- */
/* FIX: process steps grid needs position:relative for the line to work */
.grid-4.relative, .grid-4[class*="relative"] { position: relative; }
.process-line { pointer-events: none; }

/* Benefit items */
.benefit-item { padding: 5px 0; }
.benefit-item .icon svg { width: 22px; height: 22px; }

/* --- DOCTOR CONNECT PAGE --- */
/* FIX: wrong variable name --color-background-alt → --color-bg-alt */
.doctor-form { background: var(--color-bg-alt) !important; }

/* icon-box in doctor connect */
.icon-box { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; }
.icon-box svg { width: 18px; height: 18px; }

/* --- CONTACT PAGE --- */
.info-box .icon svg { width: 26px; height: 26px; }
.map-section { line-height: 0; }

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in-up { transform: translateY(30px); }
.fade-in-left { transform: translateX(-30px); }
.fade-in-right { transform: translateX(30px); }

/* FIX: JS adds 'animated' class (verified) and 'visible' – support BOTH */
.animate-on-scroll.animated,
.animate-on-scroll.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* --- UTILITIES --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-accent { color: var(--color-accent) !important; }
.text-white { color: #fff !important; }
.text-light { color: var(--color-text-light) !important; }
/* FIX: added .text-sm used in about, distributor, doctor pages */
.text-sm { font-size: 0.875rem !important; }

.gradient-text {
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}
.hero-title .gradient-text,
.hero-content .gradient-text {
  background: linear-gradient(90deg, #ffffff, var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bg-gradient { background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); color: #fff; }
.bg-alt { background: var(--color-bg-alt); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Spacing */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
/* FIX: padding utilities used in contact and doctor pages */
.p-4 { padding: 1.5rem; }

/* Display */
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-none { display: none; }
/* FIX: responsive display used in distributor page */
@media (min-width: 768px) { .d-md-block { display: block !important; } }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

/* FIX: gap utilities – added gap-5 used in contact page */
.gap-2 { gap: 10px; }
.gap-3 { gap: 15px; }
.gap-4 { gap: 20px; }
.gap-5 { gap: 30px; }

/* FIX: w-100 used in contact, distributor, doctor pages */
.w-100 { width: 100%; }

/* Position */
.relative { position: relative; }

/* Opacity */
.opacity-80 { opacity: 0.8; }

/* Font weight */
.font-weight-600 { font-weight: 600; }
.font-weight-700 { font-weight: 700; }

/* Blog Layout Grid */
.blog-layout-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 40px;
}
.single-post-article blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 1.5rem 2rem;
  background: linear-gradient(90deg, rgba(10, 77, 140, 0.03), rgba(255, 255, 255, 0));
  font-style: italic;
  font-size: 1.15rem;
  color: var(--color-text);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 2rem 0;
}
.comments-area-wrapper {
  background: #fff;
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.05);
}

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
  .container { padding: 0 20px; }
}

@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 2.8rem; }
  .section-title { font-size: 2.2rem; }
  .cta-title { font-size: 2.2rem; }

  /* Timeline responsive */
  .timeline::before { left: 30px; }
  .timeline-item { width: 100%; padding-left: 80px !important; padding-right: 0 !important; text-align: left !important; left: 0 !important; }
  .timeline-item:nth-child(even) { left: 0 !important; }
  .timeline-dot { left: 20px !important; right: auto !important; }

  /* Nav responsive – only hide the desktop nav, not the mobile drawer */
  .main-navigation .nav-menu { display: none; }
  .hamburger { display: flex; }
  .header-inner { position: relative; }

  /* Blog/post */
  .post-content { padding-right: 0; }
  .post-sidebar { margin-top: 50px; }
  .blog-layout-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Hero badge */
  .hero-badges-wrapper { bottom: 20px; right: 20px; }
  .hero-badge { padding: 12px 18px; font-size: 0.85rem; }
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }

  /* FIX: also collapse grid-2 inside forms on mobile */
  .grid-2.gap-3 { gap: 15px; }

  .hero-title { font-size: 2.2rem; }
  .section-title { font-size: 1.9rem; }
  .section { padding: 60px 0; }
  .section-alt { padding: 60px 0; }
  .footer-main { padding: 60px 0; }

  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { width: 100%; justify-content: center; }

  .top-bar { display: none; }

  .cta-title { font-size: 1.8rem; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .cta-buttons .btn { width: 100%; max-width: 320px; }

  /* Hero badge hide on very small screens */
  .hero-badges-wrapper { display: none; }

  .footer-col { margin-bottom: 35px; }
  .footer-bottom .flex-between { flex-direction: column; align-items: flex-start; gap: 15px; }
  .footer-legal-links { gap: 15px; }

  /* Counter grid on mobile */
  .overview-stats.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .overview-stats .counter-value { font-size: 2.2rem; }

  /* Contact info boxes */
  .info-box { flex-direction: column; gap: 12px; }

  /* process line hide on mobile */
  .process-line { display: none !important; }

  /* cookie consent stack */
  .cookie-consent { flex-direction: column; align-items: flex-start; gap: 15px; }

  .section-header { margin-bottom: 40px; }
  .counter-box.card { padding: 20px 15px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.9rem; }
  .section-title { font-size: 1.7rem; }
  .container { padding: 0 16px; }
  .card-elevated { padding: 30px 20px; }
  .blog-content { padding: 20px; }
  .footer-social { gap: 10px; }
  .license-card { flex-direction: column; text-align: center; }
  .license-icon { margin: 0 auto; }
  .license-info { text-align: center; }
}

/* --- PRODUCT PAGE LAYOUTS --- */
.products-grid-layout {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 40px;
}
.single-product-grid-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
  align-items: start;
}

@media (max-width: 768px) {
  .products-grid-layout,
  .single-product-grid-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .product-cta {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 15px;
  }
}
