/* ============================================
   AL-HAYAT PHARMACIES — GLOBAL STYLES
   ============================================ */

@font-face {
  font-family: 'Somar Sans';
  src: url('../fonts/SomarSans-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Somar Sans';
  src: url('../fonts/SomarSans-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Somar Sans';
  src: url('../fonts/SomarSans-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Somar Sans';
  src: url('../fonts/SomarSans-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colors — per official Al-Hayat Brand Guidelines */
  --navy: #053654;        /* Prussian Blue */
  --navy-light: #0C4A70;
  --coral: #FF7865;       /* Bittersweet */
  --coral-dark: #F0573F;
  --cream: #FDEFE4;       /* Linen */
  --cream-alt: #FFF8F3;
  --gold: #FFA800;        /* Chrome Yellow (secondary) */
  --white: #FFFFFF;

  /* Secondary palette (per guidelines, for occasional accents/badges) */
  --sec-blue: #82BCF4;    /* Jordy Blue */
  --sec-yellow: #E5CC38;  /* Sandstorm Yellow */
  --sec-orange: #FFA800;  /* Chrome Yellow */
  --sec-red: #DD4F00;     /* Flame Red */
  --sec-green: #017F67;   /* Tropical Rain Forest */

  /* Text */
  --text-dark: #141414;   /* Eerie Black */
  --text-muted: #5A5F63;
  --text-on-dark: #FDEFE4;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(5, 54, 84, 0.08);
  --shadow-md: 0 8px 24px rgba(5, 54, 84, 0.12);
  --shadow-lg: 0 16px 40px rgba(5, 54, 84, 0.16);
  --shadow-coral: 0 8px 24px rgba(255, 120, 101, 0.28);

  /* Fonts */
  --font-en: 'Poppins', sans-serif;
  --font-ar: 'Somar Sans', sans-serif;

  /* Layout */
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.35s var(--ease);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-en);
  color: var(--text-dark);
  background: var(--cream);
  overflow-x: hidden;
  line-height: 1.6;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container { padding: 0 40px; }
}

@media (min-width: 1200px) {
  .container { padding: 0 24px; }
}

section {
  padding: 64px 0;
}

@media (min-width: 992px) {
  section { padding: 100px 0; }
}

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

/* ============ Placeholder blocks (swap with real assets) ============ */
.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    rgba(27, 46, 59, 0.06),
    rgba(27, 46, 59, 0.06) 10px,
    rgba(27, 46, 59, 0.02) 10px,
    rgba(27, 46, 59, 0.02) 20px
  );
  border: 2px dashed rgba(27, 46, 59, 0.25);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 12px;
}

.placeholder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 116, 88, 0.12);
  border: 2px dashed var(--coral);
  color: var(--coral-dark);
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--coral);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(255, 120, 101, 0.22);
}

.btn-primary:hover {
  background: var(--coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(255, 120, 101, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-3px);
}

.btn-light {
  background: var(--white);
  color: var(--navy);
}

.btn-light:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-3px);
}

/* ============ Header / Nav ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(253, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(27, 46, 59, 0.08);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
}

.logo .placeholder-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 0.5rem;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  position: relative;
  padding: 10px 18px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--navy);
  border-radius: 50px;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a.active {
  color: var(--coral-dark);
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid rgba(27, 46, 59, 0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  transition: border-color var(--transition), background var(--transition);
}

.lang-switch:hover {
  border-color: var(--coral);
  background: rgba(255, 116, 88, 0.06);
}

@media (min-width: 992px) {
  .nav-links { display: flex; }
  .nav-actions { display: flex; }
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 24px;
  justify-content: center;
  cursor: pointer;
  z-index: 1100;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 992px) {
  .menu-toggle { display: none; }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transform: translateY(-100%);
  transition: transform 0.45s var(--ease);
  z-index: 1050;
}

.mobile-menu.open {
  transform: translateY(0);
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-on-dark);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.mobile-menu.open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open a:nth-child(1) { transition-delay: 0.08s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.14s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.26s; }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.32s; }

body.menu-open {
  overflow: hidden;
}

/* ============ Footer ============ */
.site-footer {
  background: var(--navy);
  color: var(--text-on-dark);
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

.footer-brand .placeholder-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.05);
  margin-bottom: 14px;
}

.footer-brand p {
  color: rgba(245, 240, 236, 0.7);
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--gold);
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(245, 240, 236, 0.75);
  font-size: 0.9rem;
  transition: color var(--transition), padding var(--transition);
}

.footer-col a:hover {
  color: var(--coral);
  padding-inline-start: 4px;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.footer-social .placeholder-icon {
  width: 40px;
  height: 40px;
  font-size: 0.5rem;
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06);
  color: rgba(245,240,236,0.6);
  transition: transform var(--transition), border-color var(--transition);
}

.footer-social .placeholder-icon:hover {
  transform: translateY(-3px);
  border-color: var(--coral);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(245, 240, 236, 0.5);
}

/* ============ Site footer (simplified) ============ */
.site-footer-simple {
  padding: 56px 0 28px;
  text-align: center;
}

.footer-logo-stacked {
  height: 100px;
  width: auto;
  margin: 0 auto 20px;
  display: block;
}

.footer-copyright {
  color: rgba(245, 240, 236, 0.6);
  font-size: 0.85rem;
}

/* ============ Reveal-on-scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.in-view > * {
  transition-delay: calc(var(--i, 0) * 0.09s);
}

/* ============ Shared keyframes ============ */
@keyframes pulseLine {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes softPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.7; }
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-dark);
  margin-bottom: 14px;
}

.section-eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  animation: softPulse 2s ease-in-out infinite;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 18px;
  line-height: 1.25;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
}

/* ============ Petal pattern background (utility) ============ */
.petal-bg {
  background-image: url('../images/patterns/petal-pattern.svg');
  background-repeat: repeat;
  background-size: 240px 240px;
}

.coming-soon-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: var(--text-on-dark);
  padding: 14px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  z-index: 2000;
  white-space: nowrap;
}

.coming-soon-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
