/* GLOBAL STYLES & HEAVENLY BACKGROUND */
:root {
  /* A soft, warm deep twilight */
  --space-midnight: #1A1829; 
  /* A dusty, muted plum for cards to blend gently with the background */
  --deep-nebula: #2D2743;    
  /* A soft amethyst */
  --cosmic-purple: #785A9E;  
  /* A warm, creamy off-white */
  --stardust-silver: #E2DEE8;
  /* An elegant champagne/rose-gold */
  --lunar-gold: #E8D09E;     
  /* A subtle, warm border tint matching the champagne/rose gold */
  --glass-border: rgba(232, 208, 158, 0.12); 
  /* Rainbow gradient setup */
  --rainbow-color: linear-gradient(90deg, #ff9aa2, #ffb7b2, #ffdac1, #e2f0cb, #b5ead7, #c7ceea);
}

@keyframes pulse-gold-glow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.6)); }
  50% { filter: drop-shadow(0 0 12px rgba(255, 215, 0, 1)); }
}

@keyframes rainbowShift {
  to { background-position: 200% center; }
}

@font-face {
  font-family: 'Playfair';
  src: url('../assets/fonts/Playfair.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
}

@font-face {
  font-family: 'Playfair';
  src: url('../assets/fonts/Playfair-Italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../assets/fonts/Montserrat.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../assets/fonts/Montserrat-Italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  font-family: 'Montserrat', sans-serif;
  color: var(--stardust-silver);
  line-height: 1.6;
  padding: 0 5px;
  background-color: var(--space-midnight);
  overflow-x: hidden;
}

body::before {
  content: "";               
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/pawprintsmemorialbg.png');
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
  opacity: 0.25;
  z-index: -1;
}

/* PREMIUM NAVIGATION STYLES */
.site-nav-wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
  top: 0;
  z-index: 1000;
  padding: 5px;
}

.premium-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 2rem;
}

.nav-brand {
  font-family: 'Playfair', serif;
  font-size: 2.5rem;
  color: var(--cosmic-purple);
  font-weight: 900;
}

.header-paw {
  width: 40px;
  height: auto;
  margin-right: 20px; 
  vertical-align: top;
}

.search-container {
  display: flex;
  justify-content: flex-end;
}

.search-container input {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid var(--stardust-silver);
}

.premium-navbar {
  display: flex;
  justify-content: flex-start;
}

.nav-links {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.dogbone-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 10px 20px;
  text-decoration: none;
  will-change: transform;
  transform: translateZ(0);
  vertical-align: middle;
  align-self: flex-start;
  transition: transform 0.3s ease;
}

.dogbone-btn img {
  width: auto;
  height: 32px;
  display: block;
  image-rendering: auto;
  backface-visibility: hidden;
}

.dogbone-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  color: var(--space-midnight);
  font-weight: 800;
  font-size: 0.50rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  pointer-events: none;
  text-align: center;
}

.dogbone-btn:hover {
  transform: rotate(15deg) scale(1.1);
}

.dogbone-btn:hover img {
  filter: drop-shadow(0 0 5px var(--lunar-gold));
}

/* FLASH ALERTS */
.alert-success {
  background: rgba(254, 240, 138, 0.1);
  border: 1px solid var(--lunar-gold);
  color: var(--lunar-gold);
  padding: 14px 20px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.1rem;
  backdrop-filter: blur(4px);
}

/* RAINBOW BRIDGE POEM */
.rainbow-bridge-section {
  max-width: 800px;
  margin: 10px auto;
  padding: 30px;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  color: var(--stardust-silver);
  text-align: center;
  max-height: 350px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.rainbow-divider {
  height: 1px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 0 auto;
  background: linear-gradient(90deg, #ff9aa2, #ffb7b2, #ffdac1, #e2f0cb, #b5ead7, #c7ceea);
}

.rainbow-bridge-section p {
  font-size: 0.60rem;
  margin-bottom: 15px;
  text-align: justify;
  text-justify: inter-word;
}

.rainbow-bridge-section p.climax-stanza {
  color: var(--lunar-gold);
  font-weight: 500;
}

.rainbow-text {
  background: linear-gradient(to left, #ff595e, #ffca3a, #8ac926, #1982c4, #6a4c93);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent; 
  background-size: 200% auto;
  animation: rainbowShift 5s linear infinite reverse;
  font-family: 'Playfair', serif;
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin: -20px;
}

/* HERO SECTION */
.hero-section {
  text-align: center;
  margin: 60px auto;
  padding: 0 20px;
  max-width: 800px;
}

.hero-section h2 {
  font-family: 'Playfair', serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--lunar-gold);
  margin-bottom: 15px;
  text-shadow: 0 0 15px rgba(254, 240, 138, 0.3);
  line-height: 1.1;
}

.hero-section p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  color: var(--stardust-silver);
  max-width: 400px;
  margin: 0 auto;
}

/* SLIDE OUT FORM */
.slide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 24, 41, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.slide-overlay.active {
  visibility: visible;
  opacity: 1;
}

.slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 1024px;
  height: 100%;
  background: var(--space-midnight);
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.slide-overlay.active .slide-panel {
  transform: translateX(0);
}

.slide-panel-scroll {
  flex: 1;
  overflow-y: auto; 
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.close-panel-btn {
  background: transparent;
  border: none;
  color: var(--lunar-gold);
  cursor: pointer;
  font-size: 1.2rem;
  margin-bottom: 20px;
  align-self: flex-start;
}

/* PREMIUM FORM GLASSMORPHISM */
.form-card {
  background: var(--deep-nebula);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 20px;
  max-width: 1024px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.form-card h2 {
  font-size: 1.75rem;
  margin-bottom: 30px;
  color: var(--lunar-gold);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 12px;
  letter-spacing: 0.05em;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

label {  
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lunar-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.form-control, textarea {
  width: 100%;
  box-sizing: border-box;
  background-color: rgba(11, 15, 25, 0.7);
  border: 1px solid rgba(254, 240, 138, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 1.05rem;
  color: #ffffff;
  font-family: inherit;
  transition: all 0.25s ease-in-out;
  outline: none;
}    

.form-control:focus, textarea:focus {
  border-color: var(--lunar-gold); 
  box-shadow: 0 0 12px rgba(254, 240, 138, 0.2);
  background-color: rgba(30, 27, 75, 0.8);
}
    
select.form-control {
  cursor: pointer;
  appearance: none;
}

.form-group.date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.date-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* PREMIUM DESIGN TOGGLES AND CONTROL BUTTONS */
.button-group {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.btn-submit, .btn-reset {
  background-color: rgba(254, 240, 138, 0.05);
  color: var(--lunar-gold);
  border: 1px solid var(--lunar-gold);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 1.1rem;
  font-family: inherit;
  cursor: pointer;
  width: 50%;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-submit {
  background-color: var(--lunar-gold);
  color: var(--space-midnight);
  font-weight: bold;
}

.btn-submit:hover {
  background-color: var(--stardust-silver);
  border-color: var(--stardust-silver);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(254, 240, 138, 0.3);
}

.btn-reset:hover {
  background-color: rgba(254, 240, 138, 0.15);
  transform: translateY(-2px);
}

.btn-submit:active, .btn-reset:active {
  transform: translateY(0);
}

/* DISPLAY TILES AND LAYOUT TILES GRID */
.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--lunar-gold);
  margin-bottom: 40px;
  font-family: 'Playfair', serif;
  text-shadow: 0 0 10px rgba(254, 240, 138, 0.2);
}

.memorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-auto-rows: auto;
  gap: 20px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
}

.memorial-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--glass-border); 
  border: 2px solid var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.memorial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.pet-meta {
    color: var(--lunar-gold);
    font-size: 0.85rem;
    margin: 0 0 5px 0;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.pet-img, .pet-img-placeholder {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-bottom: 1px solid var(--lunar-gold);
}

.preview-box {
  margin-top: 15px;
  width: 100%;
  max-width: 1024px;
  overflow: hidden;
}

.preview-title {
  font-size: 0.9em;
  color: var(--lunar-gold);
  margin-bottom: 5px;
}

.preview-image {
  max-width: 100%;
  max-height: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 10px auto;
  border-radius: 8px;
  border: 1px solid var(--deep-nebula);
}

.card-male { border-bottom: 4px solid #5899d9; }
.card-female { border-bottom: 4px solid #d9588e; }
.card-neutral { border-bottom: 4px solid var(--cosmic-purple); }

.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 8px 12px;
	gap: 2px;
}

.card-content h4 {
	font-family: 'Playfair', serif;
	font-size: 1.6rem;
	color: var(--lunar-gold);
	text-align: center;
	width: 100%;
	margin: 0;
}

.card-header-row {
  display: flex;
  flex-direction: row;
  align-items: center;       
  justify-content: center; 
  width: 100%;
  margin: 0 0 4px 0;       
}

.pet-dates {
  color: var(--lunar-gold);
  font-weight: 400; 
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
}

/* DYNAMIC MEMORIAL CARD FOOTER ENGINE LOOKS */
.candle-text-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.card-candle-canvas {
  width: 60px;
  height: 60px;
  display: block;
  background: transparent;
  flex-shrink: 0;
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.dynamic-candle-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 16px;
  overflow: visible;
}

.card-candle-container {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.card-candle-container canvas {
  margin-bottom: 0;
  display: block;
}

.card-candle-container .candle-wick {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 3px;
  background-color: var(--space-midnight);
  z-index: 2;
}

.card-candle-container .candle-wax-body {
  position: absolute;
  top: 33px; 
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 26px; 
  background: linear-gradient(to right, #f59e0b, #fef08a, #d97706); 
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2), 
              inset 0 0 10px rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  z-index: 1;
}

.card-candle-container .candle-wax-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: radial-gradient(ellipse at center, #ffffff 10%, #fef08a 60%, #f59e0b 100%);
}

.dynamic-candle-footer .footer-msg {
  display: inline-block;
  margin: 0;
  line-height: 1;
}

/* INTERACTIVE CANDLE ENGINE LAYOUT (FORM) */
.candle-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px auto;
  width: 100%;
  max-width: 650px;
}

.candle-label-wrapper {
  box-sizing: border-box;
  background: transparent; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; 
  padding: 8px 16px;                  
  transition: all 0.3s ease;
  cursor: pointer;
  width: auto;
  min-width: fit-content;
  border: none;
}

.candle-label-wrapper:hover {
  background: transparent;
  border: none;
  transform: translateY(-2px);
}

.hidden-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.candle-label-wrapper canvas {
  display: block;
  width: 80px;
  height: 80px;
  background: transparent;
  filter: drop-shadow(0 0 0px transparent);
  flex-shrink: 0;
  transition: filter 0.4s ease;
}

.candle-selection .candle-wick {
  background-color: var(--space-midnight); 
  width: 2px;
  height: 8px;
  margin-bottom: -1px;
  z-index: 2;
}

.candle-selection .candle-wax-body {
  position: relative;
  width: 16px;            
  height: 60px;             
  background: linear-gradient(to right, #4a453e, #8c8273, #38342f); 
  border-radius: 4px 4px 3px 3px;
  box-shadow: inset 0 0 10px rgba(255,255,255,0.2), 0 0 10px rgba(0,0,0,0.2);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.candle-selection .candle-wax-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.2), rgba(0,0,0,0.2));
  border-radius: 4px 4px 50% 50%;
}

.candle-selection .status-text {
  font-family: 'Montserrat', sans-serif;
  color: var(--stardust-silver);
  font-weight: 300;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 12px;
  width: 100%;
}

/* STATE COUPLING (CHECKBOX TO GRAPHIC STYLES) */
.hidden-checkbox:checked + .candle-label-wrapper canvas {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2))
          drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.hidden-checkbox:checked + .candle-label-wrapper .candle-wax-body {
  background: linear-gradient(to right, #f59e0b, #fef08a, #d97706); 
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2), 
              inset 0 0 10px rgba(255, 255, 255, 0.2),
              inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.hidden-checkbox:checked + .candle-label-wrapper .candle-wax-body::before {
  background: radial-gradient(ellipse at center, #ffffff 10%, #fef08a 60%, #f59e0b 100%);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.hidden-checkbox:checked + .candle-label-wrapper .status-text {
  color: var(--lunar-gold);
  font-weight: 400;
}
    
/* ==========================================================================
   SITE FOOTER STYLES
   ========================================================================== */
.zen-footer {
  padding: 60px 20px 20px 20px;
  margin-top: 80px;
  border-top: 1px solid var(--glass-border);
  font-family: 'Montserrat', sans-serif;
  transition: background 2s ease, color 1s ease;
}

.zen-footer-content {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.zen-brand-block a {
  font-family: 'Playfair', serif;
  text-decoration: none;
  color: var(--lunar-gold);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
  margin: 0;
}

.zen-subtitle {
  margin: 6px 0 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.zen-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 24px;
}

.zen-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
}

.zen-bottom {
  text-align: center;
  margin-top: 40px;
  font-size: 0.6rem;
  opacity: 0.5;
  border-top: 1px solid rgba(232, 208, 158, 0.05);
  padding-top: 20px;
}

/* --- THEME VARIATIONS --- */

/* 1. Morning State (Soft Amber Sunrise) */
.zen-morning {
  background: linear-gradient(to top, rgba(232, 208, 158, 0.25), rgba(26, 24, 41, 0.95));
  color: var(--stardust-silver);
}
.zen-morning h4 { color: var(--lunar-gold); }
.zen-morning .zen-links a { color: var(--stardust-silver); }
.zen-morning .zen-links a:hover { color: var(--lunar-gold); text-shadow: 0 0 5px rgba(232,208,158,0.3); }

/* 2. Twilight State (Your Deep Muted Plum Theme) */
.zen-twilight {
  background: linear-gradient(to top, var(--space-midnight), var(--deep-nebula));
  color: var(--stardust-silver);
}
.zen-twilight h4 { color: var(--lunar-gold); }
.zen-twilight .zen-links a { color: var(--stardust-silver); }
.zen-twilight .zen-links a:hover { color: var(--lunar-gold); }

/* 3. Night State (Deep Celestial Midnight & Glowing Text Aura) */
.zen-night {
  background: linear-gradient(to top, #0b0f19, var(--space-midnight));
  color: #a8a29e;
}
.zen-night h4 { 
  color: var(--lunar-gold); 
  text-shadow: 0 0 12px rgba(232, 208, 158, 0.6); 
}
.zen-night .zen-links a { color: var(--stardust-silver); }
.zen-night .zen-links a:hover { 
  color: var(--lunar-gold); 
  text-shadow: 0 0 8px var(--lunar-gold); 
}

.zen-time-alert {
    margin-top: 8px;
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.9;
}

/* --- FULLY RESPONSIVE MEDIA QUERIES --- */
@media screen and (max-width: 768px) {
  /* Global Adjustments */
  body {
    padding: 0 10px;
  }

  /* Header & Navigation Layout Collapse */
  .premium-header {
    flex-direction: column;
    gap: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
  }

  .nav-brand {
    font-size: 2rem;
  }

  .header-paw {
    margin-right: 10px;
    width: 32px;
  }

  .search-container {
    justify-content: center;
    width: 100%;
  }

  .search-container input {
    width: 100%;
    max-width: 400px;
  }

  .premium-navbar {
    justify-content: center;
    width: 100%;
  }

  .nav-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
  }

  /* Section Structural Tweak */
  .rainbow-bridge-section {
    padding: 20px 15px;
    max-height: none; /* Allows natural scrolling if text gets clipped */
  }

  /* Hero Adjustments */
  .hero-section {
    margin: 30px auto;
  }

  .hero-section h2 {
    font-size: 1.35rem;
  }

  /* Layout Grid Adjustments */
	.memorial-grid {
    grid-template-columns: 1fr !important; 
    display: grid !important;
    gap: 16px;
    width: 100%;
    padding: 0 10px;
  }

  .memorial-card {
    width: 100% !important; /* Ensure the cards don't shrink horizontally */
    max-width: 100%;
  }

  .pet-img, .pet-img-placeholder {
    height: 250px; /* Marginally lower heights to maintain composition ratio */
  }

  /* Form & Interactive Slide Panels */
  .slide-panel {
    max-width: 100%; /* Spans full width on tablet and mobile viewports */
  }

  .form-group.date-row {
    grid-template-columns: 1fr; /* Stack month and year drop-downs vertically */
    gap: 12px;
  }
  
  .zen-footer-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  .zen-links {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}
