/* ═══════════════════════════════════════════════════════════════
   GIFTED TALES — CLEAN & ELEGANT DESIGN
   ═══════════════════════════════════════════════════════════════ */

/* Load custom fonts */
@font-face {
  font-family: 'Magical Neverland';
  src: url('/fonts/Magical Neverland.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Beyond Wonderland';
  src: url('/fonts/Beyond Wonderland.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Cute Monster';
  src: url('/fonts/Cute_Monster.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Yellow Banana Demo';
  src: url('/fonts/Yellow_Banana_Demo.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Wildflower School';
  src: url('/fonts/Wildflower_School.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Hearty Kitten Demo';
  src: url('/fonts/HeartyKittenDemoRegular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Holwyn Dream Personal Use Only';
  src: url('/fonts/Holwyn_Dream_Personal_Use_Only.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

/* ═══════════════════════════════════════════════════════════════
   CORE ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 40px rgba(212, 175, 55, 0.5);
  }
}

@keyframes sparkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ═══════════════════════════════════════════════════════════════
   ROOT & BASE STYLES
   ═══════════════════════════════════════════════════════════════ */

:root {
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --radius-md: 8px;
  --radius-lg: 12px;
  --gold-accent: #d4af37;
}

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

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

body {
  font-family: Calibri, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a1a !important;
  min-height: 100vh;
}

/* PAGE-SPECIFIC BACKGROUNDS - FULL COVERAGE */
body.page-home {
  background: linear-gradient(135deg, #f0e8d8 0%, #f8ede8 100%) !important;
}
body.page-about {
  background: linear-gradient(135deg, #e0f0d8 0%, #f0fae8 100%) !important;
}
body.page-how {
  background: linear-gradient(135deg, #ffe8c0 0%, #fff0d0 100%) !important;
}
body.page-contact {
  background: linear-gradient(135deg, #e8d0f0 0%, #f8e8ff 100%) !important;
}
body.page-create {
  background: linear-gradient(135deg, #d0f0f0 0%, #e8ffff 100%) !important;
}
body.page-babies {
  background: linear-gradient(135deg, #e0f8e0 0%, #f0fff8 100%) !important;
}
body.page-children {
  background: linear-gradient(135deg, #f0f8d8 0%, #fafef8 100%) !important;
}
body.page-teenagers {
  background: linear-gradient(135deg, #d8d0f0 0%, #e8e0ff 100%) !important;
}
body.page-ya {
  background: linear-gradient(135deg, #f8f0c8 0%, #fff8d8 100%) !important;
}
body.page-adults {
  background: linear-gradient(135deg, #f0d0d0 0%, #f8e0e0 100%) !important;
}
body.page-keepsakes {
  background: linear-gradient(135deg, #ffe8d8 0%, #fff0e0 100%) !important;
}
body.page-cart {
  background: linear-gradient(135deg, #f8f0c8 0%, #fff8d8 100%) !important;
}
body.page-bookshelf {
  background: linear-gradient(135deg, #f8e0d0 0%, #ffe8d8 100%) !important;
}

body, p, div, span, li, a, label, button, h1, h2, h3, h4, h5, h6, input, textarea, select {
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-style: normal !important;
}

/* Ensure paragraphs are black Calibri */
p {
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-style: normal !important;
  font-weight: normal !important;
}

/* Headings stay serif but enforce black */
h1, h2, h3, h4, h5, h6 {
  color: #1a1a1a !important;
  font-style: normal !important;
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY — PLAIN, CLASSY FONTS
   ═══════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: Calibri, 'Segoe UI', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0px;
  animation: fadeInDown 0.8s ease-out;
  color: #1a1a1a !important;
}

h1 {
  font-size: 3.45rem;
  font-weight: normal;
  animation: fadeInDown 0.8s ease-out;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

h4 {
  font-size: 1.2rem;
  font-weight: 600;
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

p {
  font-family: Calibri, 'Segoe UI', sans-serif;
  margin-bottom: var(--spacing-md);
  color: #1a1a1a !important;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER & NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

header {
  background: white;
  padding: var(--spacing-md) 0;
  border-bottom: 2px solid #ccc;
  position: sticky;
  top: 0;
  z-index: 999;
  animation: fadeInDown 0.6s ease-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav a {
  font-family: Calibri, 'Segoe UI', sans-serif;
  text-decoration: none;
  color: #1a1a1a !important;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
}

nav a:hover {
  color: #1a1a1a;
  text-shadow: none;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #1a1a1a;
  transition: width 0.3s ease;
  box-shadow: none;
}

nav a:hover::after {
  width: 100%;
}

.logo {
  background: transparent !important;
}

.logo img {
  background: transparent !important;
  max-height: 60px;
  width: auto;
  padding: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn {
  font-family: Calibri, 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  color: #1a1a1a !important;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: #826085;
  color: #ffffff !important;
}

.btn-primary:hover {
  background: #6a4e6d;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(130, 96, 133, 0.4);
}

.btn-primary:active {
  transform: translateY(-1px);
  animation: sparkle 0.4s ease-out;
}

/* DYNAMIC BUTTON COLORS */
body.page-home .btn-page { background: #6b5533 !important; }
body.page-home .btn-page:hover { background: #5a4727 !important; }
body.page-about .btn-page { background: #4a6a52 !important; }
body.page-about .btn-page:hover { background: #3a5a42 !important; }
body.page-how .btn-page { background: #8b5a2b !important; }
body.page-how .btn-page:hover { background: #7a4a1a !important; }
body.page-contact .btn-page { background: #5a3d7a !important; }
body.page-contact .btn-page:hover { background: #4a2d6a !important; }
body.page-create .btn-page { background: #3a8a9a !important; }
body.page-create .btn-page:hover { background: #2a7a8a !important; }
body.page-babies .btn-page { background: #3a7a7a !important; }
body.page-babies .btn-page:hover { background: #2a6a6a !important; }
body.page-children .btn-page { background: #6a7b3a !important; }
body.page-children .btn-page:hover { background: #5a6b2a !important; }
body.page-teenagers .btn-page { background: #5a4a9a !important; }
body.page-teenagers .btn-page:hover { background: #4a3a8a !important; }
body.page-ya .btn-page { background: #8a7a3a !important; }
body.page-ya .btn-page:hover { background: #7a6a2a !important; }
body.page-adults .btn-page { background: #8a5a6a !important; }
body.page-adults .btn-page:hover { background: #7a4a5a !important; }
body.page-keepsakes .btn-page { background: #9a5a4a !important; }
body.page-keepsakes .btn-page:hover { background: #8a4a3a !important; }
body.page-cart .btn-page { background: #8a7a3a !important; }
body.page-cart .btn-page:hover { background: #7a6a2a !important; }
body.page-bookshelf .btn-page { background: #9a6a3a !important; }
body.page-bookshelf .btn-page:hover { background: #8a5a2a !important; }

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION WITH BACKGROUND IMAGE
   ═══════════════════════════════════════════════════════════════ */

.hero {
  padding: 4rem 2rem;
  text-align: center;
  aspect-ratio: 1774 / 887; /* matches the 2:1 ratio of all hero photos except Teenagers (overridden below) */
  min-height: 200px;
  max-height: 1280px;
  height: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Teenagers.png has a different native aspect ratio (1659x948) than the other hero photos */
body.page-teenagers .hero {
  aspect-ratio: 1659 / 948;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.hero-content {
  max-width: 100%;
  animation: scaleUp 0.8s ease-out;
  order: 2;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  margin-bottom: var(--spacing-lg);
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.4);
}

/* Page-specific H1 fonts (must be !important to beat the sitewide Calibri lock) */
body.page-keepsakes .hero-content h1 {
  font-family: 'Beyond Wonderland', Calibri, 'Segoe UI', sans-serif !important;
}

body.page-children .hero-content h1 {
  font-family: 'Cute Monster', Calibri, 'Segoe UI', sans-serif !important;
  font-weight: normal !important;
}

body.page-babies .hero-content h1 {
  font-family: 'Yellow Banana Demo', Calibri, 'Segoe UI', sans-serif !important;
}

body.page-ya .hero-content h1 {
  font-family: 'Wildflower School', Calibri, 'Segoe UI', sans-serif !important;
}

body.page-adults .hero-content h1 {
  font-family: 'Hearty Kitten Demo', Calibri, 'Segoe UI', sans-serif !important;
}

body.page-home .hero-content h1 {
  font-family: 'Holwyn Dream Personal Use Only', Calibri, 'Segoe UI', sans-serif !important;
}

.hero-subtitle {
  font-family: Calibri, 'Segoe UI', sans-serif;
  font-size: 1.2rem;
  font-style: normal;
  margin-bottom: var(--spacing-lg);
  opacity: 1;
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
  color: #ffffff !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* Plain description paragraph inside the hero (e.g. "Upload a photo, choose a theme...")
   also inherits black from the sitewide default — same contrast problem, same fix. */
.hero-content p:not(.hero-subtitle) {
  color: #ffffff !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-image {
  margin: 2rem auto;
  max-width: 100%;
  animation: fadeInUp 0.8s ease-out;
  order: 1;
}

.hero-image img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════ */

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  animation: fadeInUp 0.8s ease-out;
  background: transparent !important;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  background: transparent !important;
}

.section-title h2 {
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
  color: #1a1a1a !important;
}

.section-title h2::after {
  content: '';
  display: none !important;
}

.section-title p {
  font-size: 1.1rem;
  margin: 0;
  color: #1a1a1a !important;
}

/* ═══════════════════════════════════════════════════════════════
   TWO-COLUMN LAYOUT FOR SIDE-BY-SIDE SECTIONS
   ═══════════════════════════════════════════════════════════════ */

.two-column-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  background: transparent !important;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.column-item {
  animation: fadeInUp 0.8s ease-out;
  background: transparent !important;
}

.column-item h3 {
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  text-align: left;
}

.column-item p {
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
}

@media (max-width: 768px) {
  .two-column-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* When two-column-section collapses to a single column, center its content
     instead of leaving it left-aligned (which looked off-center on a full-width column) */
  .column-item {
    text-align: center;
  }

  .column-item h3 {
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CARDS & CONTENT
   ═══════════════════════════════════════════════════════════════ */

.card {
  background: transparent !important;
  padding: 2rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.2);
}

.card h3 {
  color: #1a1a1a !important;
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-weight: 600;
}

.card p {
  color: #1a1a1a !important;
  font-size: 1.2rem;
  line-height: 1.6;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

footer {
  width: 100%;
  padding: 1rem 1.5rem;
  margin-top: 1.5rem;
  animation: fadeInUp 0.8s ease-out;
  background: transparent !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1rem;
  background: transparent !important;
  padding: 0 2rem;
}

.footer-section {
  text-align: center;
}

.footer-section h4 {
  font-family: Calibri, 'Segoe UI', sans-serif;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
  color: #1a1a1a !important;
}

.footer-section a {
  display: block;
  font-family: Calibri, 'Segoe UI', sans-serif;
  text-decoration: none;
  color: #1a1a1a !important;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.footer-section a:hover {
  opacity: 0.7;
  text-decoration: underline;
  color: var(--gold-accent) !important;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.footer-bottom {
  width: 100%;
  max-width: 1200px;
  margin: 1.25rem auto 0;
  padding-top: 0.75rem;
  padding-left: 2rem;
  padding-right: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
  font-size: 0.9rem;
  opacity: 1;
  background: transparent !important;
  color: #1a1a1a !important;
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING ICON
   ═══════════════════════════════════════════════════════════════ */

.floating-icon {
  display: inline-block;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
  transition: all 0.3s ease;
}

.floating-icon:hover {
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.8));
  animation-duration: 1.5s;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

input[type="text"],
input[type="email"],
input[type="file"],
select,
textarea {
  font-family: Calibri, 'Segoe UI', sans-serif;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: #1a1a1a;
  background: rgba(255, 255, 255, 0.7);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: #999;
}

/* CHECKBOX STYLING */
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #1a5d4f;
}

input[type="checkbox"]:hover {
  filter: brightness(0.9);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold-accent);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   EMAIL CAPTURE / SUBSCRIPTION SECTION
   ═══════════════════════════════════════════════════════════════ */

.email-capture {
  background: transparent !important;
  padding: var(--spacing-lg);
  text-align: center;
}

.email-capture h3 {
  color: #1a1a1a !important;
  margin-bottom: var(--spacing-md);
}

.email-capture p {
  color: #1a1a1a !important;
  margin-bottom: var(--spacing-lg);
}

.email-capture form {
  max-width: 500px;
  margin: 0 auto;
  background: transparent !important;
}

.email-capture .form-group {
  margin-bottom: var(--spacing-md);
  background: transparent !important;
}

.email-capture label {
  display: block;
  font-weight: 600;
  color: #1a1a1a !important;
  margin-bottom: 0.5rem;
  text-align: left;
}

.email-capture input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  font-family: Calibri, 'Segoe UI', sans-serif;
  font-size: 1rem;
  color: #1a1a1a;
  background: rgba(255, 255, 255, 0.7) !important;
  transition: all 0.3s ease;
}

.email-capture input::placeholder {
  color: #999;
}

.email-capture input:focus {
  outline: none;
  border-color: var(--gold-accent);
  background: white !important;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.email-capture button {
  margin-top: var(--spacing-lg);
}

/* ═══════════════════════════════════════════════════════════════ */

/* GRID 2 COLUMNS */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
}

/* FEATURE BOX */
.feature-box {
  background: transparent !important;
  border: 3px solid;
  border-radius: 12px;
  padding: 2.5rem;
  animation: fadeInUp 0.8s ease-out;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Page-specific frame colors (darker shades) */
body.page-ya .feature-box {
  border-color: #6a6a2a;
}

body.page-home .feature-box {
  border-color: #5a4327;
}

body.page-about .feature-box {
  border-color: #3a5a3a;
}

body.page-how .feature-box {
  border-color: #7a4a1a;
}

body.page-contact .feature-box {
  border-color: #4a2d5a;
}

body.page-create .feature-box {
  border-color: #2a6a7a;
}

body.page-babies .feature-box {
  border-color: #2a6a6a;
}

body.page-children .feature-box {
  border-color: #5a6b2a;
}

body.page-teenagers .feature-box {
  border-color: #4a3a7a;
}

body.page-adults .feature-box {
  border-color: #7a4a5a;
}

body.page-keepsakes .feature-box {
  border-color: #8a4a3a;
}

body.page-cart .feature-box {
  border-color: #7a6a2a;
}

body.page-bookshelf .feature-box {
  border-color: #8a5a2a;
}

.feature-box h3 {
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  text-shadow: none !important;
  font-weight: 600;
  text-align: center;
}

.feature-box p {
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-size: 1rem;
  line-height: 1.6;
  text-shadow: none !important;
  text-align: center;
  margin: 0 0 1rem 0;
}

.feature-list {
  list-style: disc;
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  text-align: center;
  margin: 1rem auto;
  display: inline-block;
  padding-left: 1.5rem;
}

.feature-list li {
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  text-shadow: none !important;
  margin-bottom: 0.75rem;
  text-align: center;
}

@media (max-width: 768px) {
  h1 { font-size: 2.484rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
  .hero { padding: 2rem 1rem; }
  .hero-image img { max-height: 400px; }
  .section { padding: 2rem 1rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.794rem; }
  h2 { font-size: 1.1rem; }
  .btn { padding: 0.6rem 1rem; font-size: 0.9rem; }
}

/* ═══════════════════════════════════════════════════════════════
   REMOVE ALL WHITE BACKGROUNDS
   ═══════════════════════════════════════════════════════════════ */

div, section:not(.bookshelf-hero):not(.hero), article, main, footer, .section, .card, 
.step-section, .form-group, .container {
  background: transparent !important;
}

/* Header must always stay opaque (never transparent) so page content/photos can never
   bleed through it. Each page's header uses that page's own theme color (first gradient
   stop), matching the pattern established on bookshelf.html. */
header, header nav {
  background: #ffffff !important; /* fallback for any page without a body.page-X class */
}

body.page-home header, body.page-home header nav { background: #f0e8d8 !important; }
body.page-about header, body.page-about header nav { background: #e0f0d8 !important; }
body.page-how header, body.page-how header nav { background: #ffe8c0 !important; }
body.page-contact header, body.page-contact header nav { background: #e8d0f0 !important; }
body.page-create header, body.page-create header nav { background: #d0f0f0 !important; }
body.page-babies header, body.page-babies header nav { background: #e0f8e0 !important; }
body.page-children header, body.page-children header nav { background: #f0f8d8 !important; }
body.page-teenagers header, body.page-teenagers header nav { background: #d8d0f0 !important; }
body.page-ya header, body.page-ya header nav { background: #f8f0c8 !important; }
body.page-adults header, body.page-adults header nav { background: #f0d0d0 !important; }
body.page-keepsakes header, body.page-keepsakes header nav { background: #ffe8d8 !important; }
body.page-cart header, body.page-cart header nav { background: #f8f0c8 !important; }
/* body.page-bookshelf's header color is set in bookshelf.html's own <style> block */

/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   GRID & CARD LAYOUT - 2 Columns × 2 Rows
   ═══════════════════════════════════════════════════════════════ */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* If a .grid ends on an odd item count (e.g. 5 cards in 2 columns), center the
   leftover last item instead of leaving it stranded in the left column. Only
   activates when the count is actually odd — harmless no-op on even-count pages. */
.grid > .card:nth-child(odd):last-child {
  grid-column: 1 / -1;
  max-width: 50%;
  margin-left: auto;
  margin-right: auto;
}

/* Force 3-column layout for testimonial grids with exactly 3 cards */
.grid:has(> .card:nth-child(3):last-child) {
  grid-template-columns: repeat(3, 1fr) !important;
}

.grid > .card:nth-child(3):last-child {
  grid-column: auto;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}


/* Mobile responsive */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid > .card:nth-child(odd):last-child {
    grid-column: 1;
    max-width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════
   OCCASIONS GRID - 2 Columns with Odd Item Centering
   ═══════════════════════════════════════════════════════════════ */

.occasions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.occasions-grid .card {
  background: transparent !important;
  padding: 2.5rem;
  border: 3px solid;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.occasions-grid .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.2);
}

.occasions-grid .card h3 {
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  text-shadow: none !important;
  font-weight: 600;
  text-align: center;
}

.occasions-grid .card p {
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-size: 1.2rem;
  line-height: 1.6;
  text-shadow: none !important;
  text-align: center;
  margin: 0;
}

/* Odd item (last item if uneven number) centered below */
.occasions-grid .card:nth-child(odd):last-child {
  grid-column: 1 / -1;
  max-width: 50%;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .occasions-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .occasions-grid .card:nth-child(odd):last-child {
    grid-column: 1;
    max-width: 100%;
  }
}


/* Page-specific border colors for occasions-grid */
body.page-ya .occasions-grid .card {
  border-color: #6a6a2a;
}

body.page-teenagers .occasions-grid .card {
  border-color: #4a3a7a;
}

body.page-home .occasions-grid .card {
  border-color: #5a4327;
}

body.page-about .occasions-grid .card {
  border-color: #3a5a3a;
}

body.page-how .occasions-grid .card {
  border-color: #7a4a1a;
}

body.page-contact .occasions-grid .card {
  border-color: #4a2d5a;
}

body.page-create .occasions-grid .card {
  border-color: #2a6a7a;
}

body.page-babies .occasions-grid .card {
  border-color: #2a6a6a;
}

body.page-children .occasions-grid .card {
  border-color: #5a6b2a;
}

body.page-adults .occasions-grid .card {
  border-color: #7a4a5a;
}

body.page-keepsakes .occasions-grid .card {
  border-color: #8a4a3a;
}

body.page-cart .occasions-grid .card {
  border-color: #7a6a2a;
}


/* ═══════════════════════════════════════════════════════════════
   TESTIMONIALS GRID - 4 Columns with Centered Wrap
   ═══════════════════════════════════════════════════════════════ */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1600px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.testimonials-grid .card {
  background: transparent !important;
  padding: 2.5rem;
  border: 3px solid;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 280px;
  transition: all 0.3s ease;
}

.testimonials-grid .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.2);
}

.testimonials-grid .card p {
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-size: 1.25rem;
  line-height: 1.8;
  text-shadow: none !important;
  text-align: center;
  margin: 0 0 1rem 0;
  font-style: normal !important;
}

.testimonials-grid .card em {
  font-style: normal !important;
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
}

.testimonials-grid .card p:last-child {
  font-size: 1.15rem;
  margin: 0;
  margin-top: 0.5rem;
}

/* Center single remaining item in last row */
.testimonials-grid .card:nth-child(4n+1):last-child {
  grid-column: 2 / span 2;
}

/* Center 2 remaining items in last row */
.testimonials-grid .card:nth-child(4n+3):nth-last-child(2) {
  grid-column: 1 / span 1;
}
.testimonials-grid .card:nth-child(4n+4):nth-last-child(1) {
  grid-column: 3 / span 1;
}

/* Center 3 remaining items in last row */
.testimonials-grid .card:nth-child(4n+2):nth-last-child(3) {
  grid-column: 1 / span 1;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .testimonials-grid .card:nth-child(4n+1):last-child,
  .testimonials-grid .card:nth-child(4n+3):nth-last-child(2),
  .testimonials-grid .card:nth-child(4n+2):nth-last-child(3) {
    grid-column: auto;
  }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Page-specific border colors for testimonials-grid */
body.page-ya .testimonials-grid .card {
  border-color: #6a6a2a;
}

body.page-teenagers .testimonials-grid .card {
  border-color: #4a3a7a;
}

body.page-babies .testimonials-grid .card {
  border-color: #2a6a6a;
}

body.page-home .testimonials-grid .card {
  border-color: #5a4327;
}

body.page-about .testimonials-grid .card {
  border-color: #3a5a3a;
}

body.page-how .testimonials-grid .card {
  border-color: #7a4a1a;
}

body.page-contact .testimonials-grid .card {
  border-color: #4a2d5a;
}

body.page-create .testimonials-grid .card {
  border-color: #2a6a7a;
}

body.page-adults .testimonials-grid .card {
  border-color: #7a4a5a;
}

body.page-keepsakes .testimonials-grid .card {
  border-color: #8a4a3a;
}

body.page-cart .testimonials-grid .card {
  border-color: #7a6a2a;
}

body.page-bookshelf .testimonials-grid .card {
  border-color: #8a5a2a;
}


/* ═══════════════════════════════════════════════════════════════
   SUBSCRIPTION FORMS IN CTA SECTIONS
   ═══════════════════════════════════════════════════════════════ */

.column-item form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.column-item .form-group {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.column-item .form-group label {
  color: #1a1a1a !important;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-align: center;
}

.column-item .form-group input {
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  font-size: 1rem;
  color: #1a1a1a !important;
  background: rgba(255, 255, 255, 0.7);
}

.column-item .form-group input::placeholder {
  color: #999 !important;
}

/* Subscription button in CTA section - smaller, centered, page-specific color */
.column-item button.btn-page {
  max-width: 280px;
  margin: 1rem auto 0;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}


/* ═══════════════════════════════════════════════════════════
   NAVIGATION IMPROVEMENTS
   ═══════════════════════════════════════════════════════════ */

.nav-links a {
  font-family: Calibri, 'Segoe UI', sans-serif !important;
  color: #1a1a1a !important;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.nav-links a:hover {
  color: #7D5BA8 !important;
  text-decoration: underline;
}

nav div a.btn {
  font-size: 1rem;
  padding: 0.75rem 1.5rem !important;
  font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════
   HEADER — BALANCED SIZING (fits real viewports, no clipping)
   ═══════════════════════════════════════════════════════════ */

header {
  min-height: 105px !important;
  display: flex !important;
  align-items: center !important;
  width: 100%;
  overflow: visible;
}

header nav {
  width: 100%;
  max-width: 100%;
  flex-wrap: nowrap;
}

/* Logo never shrinks below usable size, never overflows */
header nav > a:first-child {
  flex-shrink: 0;
}

header img {
  max-height: 85px;
  width: auto;
  display: block;
}

/* Nav links: larger text, spread evenly to fill the space between logo and cart */
nav ul.nav-links {
  margin-left: 1.5rem !important;
  gap: 1.2rem !important;
  font-size: 1.15rem !important;
  justify-content: space-between !important;
  flex-shrink: 1;
  min-width: 0;
}

nav ul.nav-links li a {
  white-space: nowrap;
}

/* Button group never shrinks/wraps, never clips off the right edge */
nav > div:last-child {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Larger screens: allow the branding a bit more room */
@media (min-width: 1600px) {
  header {
    min-height: 125px !important;
  }
  header img {
    max-height: 105px;
  }
  nav ul.nav-links {
    margin-left: 2.5rem !important;
    gap: 1.5rem !important;
    font-size: 1.25rem !important;
  }
}

@media (max-width: 1400px) {
  nav ul.nav-links {
    gap: 0.9rem !important;
    font-size: 1rem !important;
    margin-left: 1rem !important;
  }
  header img {
    max-height: 75px;
  }
}

@media (max-width: 1024px) {
  header {
    min-height: 95px !important;
  }

  header img {
    max-height: 68px;
  }

  nav ul.nav-links {
    margin-left: 0.75rem !important;
    gap: 0.75rem !important;
    font-size: 0.95rem !important;
  }
}

@media (max-width: 900px) {
  /* Nav text no longer fits in one row alongside logo + button — wrap it below */
  header nav {
    flex-wrap: wrap;
  }

  nav ul.nav-links {
    order: 3;
    flex-basis: 100%;
    justify-content: center !important;
    margin: 0.75rem 0 0 0 !important;
    gap: 1rem !important;
    font-size: 1rem !important;
  }
}

@media (max-width: 768px) {
  header {
    min-height: 78px !important;
  }

  header img {
    max-height: 56px;
  }

  nav ul.nav-links {
    gap: 0.7rem !important;
    font-size: 0.85rem !important;
  }
}

@media (max-width: 480px) {
  header {
    min-height: 65px !important;
  }

  header img {
    max-height: 48px;
  }

  nav ul.nav-links {
    gap: 0.5rem !important;
    font-size: 0.75rem !important;
  }

  nav div a.btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem !important;
  }
}

