/* ============================================
   MOBILE-FIRST GLOBAL CSS — Abbvie PSS App
   ============================================ */

/* Base Design Tokens */
:root {
  --color-bg-body: #f3f4f6;
  --color-bg-white: #ffffff;
  --color-navy: #0f2756;
  --color-text-dark: #111827;
  --color-brand-red: #dc2626;
  --color-teal: #007B85;
  --color-teal-dark: #005f6b;
  --color-brand-blue: #1e3a8a;

  /* Icon Borders */
  --border-icon-1: #c7d2fe;
  /* indigo-200  */
  --border-icon-2: #a7f3d0;
  /* emerald-200 */
  --border-icon-3: #d1d5db;
  /* gray-300    */
  --border-icon-4: #fbd38d;
  /* orange-200  */
}

/* ── Phase 6: Global Image Safety ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* ── Phase 1: Body ── */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--color-bg-body);
  min-height: 100dvh;
  /* scrollable — no overflow hidden */
  display: flex;
  align-items: flex-start;
  /* allow natural flow, not center-clip */
  justify-content: center;
}

/* ── Phase 1 & 2: Mobile Container ── */
.mobile-container {
  background-color: var(--color-bg-white);
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(12px, 4vw, 20px);
  display: flex;
  flex-direction: column;
  /* NO overflow: hidden — allow scroll on small screens */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 640px) {
  .mobile-container {
    border-radius: 24px;
    min-height: 850px;
  }
}

/* ── Phase 3: Hero Section ── */
.hero-section {
  width: 100%;
  position: relative;
  flex-shrink: 0;
  background-color: var(--color-bg-white);
  margin-top: clamp(20px, 6vw, 60px);
  /* was fixed 80px */
  padding-bottom: 24px;
}

/* ── Phase 3 & Phase 4: Hero Image ── */
.hero-banner {
  width: 100%;
  height: auto;
  max-height: clamp(280px, 55vh, 400px);
  object-fit: contain;
  position: relative;
  z-index: 10;
  display: block;
  border: 4px solid #A5F3FC;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  margin-bottom: clamp(16px, 4vw, 24px);
}

/* ── Index Page Specific Layout ── */
.index-container {
  align-items: center;
  justify-content: space-between;
}

.index-hero {
  flex: 0 1 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  margin-top: clamp(32px, 8vw, 56px);
  padding-bottom: 0;
}

.index-branding {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  gap: clamp(6px, 2vw, 10px);
  width: 100%;
  min-height: 0;
  padding: clamp(4px, 1vw, 8px) 0 clamp(16px, 4vw, 24px);
}

.footer-logo {
  height: 55px;
  width: auto;
  display: block;
}

/* ── Overlapping Circular Icons ── */
.icons-container {
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 20;
}

.icon-wrapper {
  width: 56px;
  height: 56px;
  background-color: var(--color-bg-white);
  border-radius: 50%;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 3px solid;
}

.icon-1 {
  border-color: var(--border-icon-1);
}

.icon-2 {
  border-color: var(--border-icon-2);
}

.icon-3 {
  border-color: var(--border-icon-3);
}

.icon-4 {
  border-color: var(--border-icon-4);
}

.icon-wrapper img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
}

/* ── Main Content ── */
.main-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(24px, 6vw, 40px) clamp(16px, 5vw, 32px);
  text-align: center;
  background-color: var(--color-bg-white);
}

/* ── Phase 2: Heading Typography ── */
.main-title {
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1.3;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.025em;
}

/* Page heading (index.html h1) */
.page-heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 10vw, 54px);
  color: var(--color-brand-blue);
  margin: 0 0 clamp(24px, 6vw, 40px) 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.page-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 4.5vw, 22px);
  color: #4FA3B0;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.click-here-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: clamp(14px, 4vw, 18px);
  color: #4FA3B0;
}

/* ── Footer ── */
.footer {
  padding: clamp(16px, 4vw, 24px);
  padding-bottom: clamp(24px, 6vw, 56px);
  text-align: center;
  background-color: var(--color-bg-white);
  margin-top: auto;
}

.footer-text {
  font-size: clamp(12px, 3.5vw, 15px);
  font-weight: 700;
  color: var(--color-text-dark);
  letter-spacing: 0.025em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-direction: column;
}

.brand-highlight {
  font-weight: 800;
  color: #000;
  position: relative;
  display: inline-block;
  font-size: clamp(15px, 4vw, 18px);
  margin-left: 4px;
}

.brand-underline {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 6px;
  color: var(--color-brand-red);
}

/* ── Thumbnails Grid (home.html) ── */
.thumbnails-container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(12px, 4vw, 24px);
  gap: clamp(12px, 3vw, 20px);
  background-color: var(--color-bg-white);
}

.thumbnails-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 3vw, 16px);
}

.thumbnail-block {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-white);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 2.5px solid #38bdf8;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.thumbnail-block:hover {
  transform: translateY(-4px);
}

.thumbnail-img-wrapper {
  width: 100%;
  background: #f8fafc;
  padding: clamp(8px, 2.5vw, 12px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.thumbnail-img-wrapper.landscape {
  aspect-ratio: 16/10;
}

.thumbnail-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: top;
  display: block;
}

.thumbnail-text-section {
  flex: 0 0 auto;
  text-align: center;
  padding: clamp(6px, 2vw, 8px) clamp(8px, 2.5vw, 12px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.thumbnail-btn-text {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(11px, 3vw, 13px);
  color: var(--color-brand-blue);
  font-weight: 500;
  text-align: center;
}

.thumbnail-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(13px, 3.5vw, 16px);
  font-weight: 700;
  color: var(--color-brand-blue);
  text-align: center;
  line-height: 1.3;
}

.pss-wrapper {
  position: relative;
  display: inline-block;
}

.pss-underline {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 5px;
  color: var(--color-brand-red);
}

/* ── Language Selection (booklet pages) ── */
.language-view-body {
  background-color: var(--color-bg-white);
  flex-direction: column;
}

.booklet-preview-section {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin-bottom: 12px;
}

.booklet-preview-img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border: 1px solid #ddd;
  padding: 4px;
}

.language-grid-container {
  flex: 0 0 auto;
  width: 100%;
  padding: clamp(12px, 3vw, 20px) clamp(8px, 2vw, 16px);
}

.language-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 2.5vw, 12px);
  width: 100%;
  align-content: start;
}

/* ── Phase 2: Language Button — fluid scaling ── */
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--color-teal);
  color: white;
  border: none;
  border-radius: clamp(8px, 2vw, 14px);
  padding: clamp(10px, 3vw, 14px) clamp(16px, 5vw, 28px);
  font-size: clamp(16px, 5vw, 26px);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background-color: var(--color-teal-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.lang-btn:active {
  transform: translateY(2px);
}

/* ── Phase 5: Small Device Optimization (360px and below) ── */
@media (max-width: 360px) {
  .lang-btn {
    font-size: 15px;
    padding: 10px 14px;
    border-radius: 8px;
  }

  h1,
  .page-heading {
    font-size: 22px;
  }

  .thumbnail-title {
    font-size: 12px;
  }

  .thumbnail-btn-text {
    font-size: 10px;
  }
}