/*
Theme Name: Share a Memory
Theme URI: https://ptkinfotech.com
Author: ptkinfotech
Version: 1.0
License: GNU General Public License v2 or later
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #7B2D52;
  --primary-light: #9B3D6A;
  --accent:     #C0614A;
  --accent-light: #E8935A;
  --gold:       #C9933A;
  --bg:         #FDFAF7;
  --bg2:        #F5EFE8;
  --bg3:        #EDE4D8;
  --text:       #2A1A1A;
  --text2:      #6B4F4F;
  --text3:      #9E7E7E;
  --border:     rgba(123,45,82,0.15);
  --border2:    rgba(123,45,82,0.25);
  --white:      #ffffff;
  --radius:     14px;
  --radius-sm:  8px;
  --shadow:     0 2px 20px rgba(123,45,82,0.10);
  --shadow-lg:  0 8px 40px rgba(123,45,82,0.15);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'DM Sans', 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1,h2,h3,h4,h5 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

/* ===== GOOGLE FONTS (loaded in functions.php) ===== */

/* ===== SITE HEADER ===== */
#site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-logo span { font-style: italic; font-weight: 400; }
.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px;
}

#main-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
}
#main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 50px;
  transition: all 0.2s;
  text-decoration: none;
}
#main-nav a:hover, #main-nav .current-menu-item a {
  background: var(--bg2);
  color: var(--primary);
}

.header-cta {
  background: var(--primary);
  color: white !important;
  padding: 8px 18px !important;
  border-radius: 50px !important;
}
.header-cta:hover {
  background: var(--primary-light) !important;
  color: white !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--primary);
  font-size: 24px;
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(150deg, var(--primary) 0%, var(--accent) 55%, var(--accent-light) 100%);
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.hero-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 600;
  color: white;
  line-height: 1.05;
  margin-bottom: 8px;
}
.hero-title em { font-style: italic; font-weight: 400; }
.hero-date {
  font-family: var(--font-serif);
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  font-style: italic;
  margin-bottom: 20px;
}
.hero-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  max-width: 480px;
  margin: 0 auto 36px;
  font-weight: 300;
}
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-white {
  background: white;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); text-decoration: none; color: var(--primary); }
.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: white;
  font-weight: 400;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.35);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-ghost:hover { background: rgba(255,255,255,0.22); text-decoration: none; color: white; }

.hero-petal {
  position: absolute;
  border-radius: 0 70% 0 70%;
  background: rgba(255,255,255,0.10);
  transform: rotate(45deg);
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.stat-item {
  padding: 18px 40px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
}
.stat-label { font-size: 12px; color: var(--text3); margin-top: 3px; letter-spacing: 0.5px; }

/* ===== LAYOUT WRAPPER ===== */
.site-main { max-width: 1100px; margin: 0 auto; padding: 48px 24px; }

/* ===== SECTION HEADERS ===== */
.section-header { margin-bottom: 32px; }
.section-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text3);
  font-weight: 500;
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
}
.section-desc { font-size: 15px; color: var(--text2); margin-top: 8px; }

/* ===== MEMORY CARDS GRID ===== */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.memory-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
.memory-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.memory-card-media {
  position: relative;
  background: var(--bg2);
  overflow: hidden;
}
.memory-card-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.memory-card:hover .memory-card-media img { transform: scale(1.04); }
.memory-card-media .media-count {
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.55);
  color: white;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}
.memory-card-media .video-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(123,45,82,0.85);
  color: white;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
}
.no-media-card {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
}

.memory-card-body { padding: 18px 20px 16px; }
.memory-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.author-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 14px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-sans);
}
.author-name { font-weight: 500; font-size: 15px; }
.author-date { font-size: 12px; color: var(--text3); }

.memory-message {
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  color: var(--text2);
  line-height: 1.6;
  border-left: 3px solid var(--accent-light);
  padding-left: 12px;
  margin-bottom: 14px;
}
.memory-message::before { content: '\201C'; color: var(--accent); font-size: 20px; }
.memory-message::after  { content: '\201D'; color: var(--accent); font-size: 20px; }

.memory-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.memory-likes {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text3);
  cursor: pointer;
  background: none; border: none; font-family: var(--font-sans);
  transition: color 0.2s;
}
.memory-likes:hover, .memory-likes.liked { color: #D4537E; }
.memory-likes svg { width: 16px; height: 16px; }
.memory-comments-link {
  font-size: 13px; color: var(--text3);
  display: flex; align-items: center; gap: 5px;
  text-decoration: none;
}
.memory-comments-link:hover { color: var(--primary); text-decoration: none; }

/* ===== NO POSTS ===== */
.no-posts {
  text-align: center;
  padding: 80px 24px;
  color: var(--text3);
}
.no-posts-icon { font-size: 48px; margin-bottom: 16px; }
.no-posts h3 { font-family: var(--font-serif); font-size: 24px; color: var(--text2); margin-bottom: 8px; }

/* ===== PAGINATION ===== */
.memory-pagination { text-align: center; padding: 20px 0 40px; }
.memory-pagination .page-numbers {
  display: inline-flex; gap: 6px;
}
.memory-pagination a, .memory-pagination span {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border2);
  border-radius: 50%;
  font-size: 14px; color: var(--text2);
  text-decoration: none; transition: all 0.2s;
}
.memory-pagination .current, .memory-pagination a:hover {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* ===== SUBMISSION FORM ===== */
.submit-page-hero {
  background: linear-gradient(150deg, var(--bg2), var(--bg3));
  padding: 60px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.submit-page-hero h1 {
  font-family: var(--font-serif);
  font-size: 42px;
  color: var(--primary);
}
.submit-page-hero p { font-size: 16px; color: var(--text2); margin-top: 8px; }

.form-wrapper {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 24px;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 40px;
  box-shadow: var(--shadow);
}

.form-section { margin-bottom: 28px; }
.form-section-title {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  font-weight: 500;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}
.form-label .required { color: var(--accent); }

.form-input, .form-textarea, .form-select {
  width: 100%;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(123,45,82,0.10);
  background: var(--white);
}
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius-sm);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(123,45,82,0.04);
}
.upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-icon { font-size: 32px; color: var(--text3); margin-bottom: 8px; }
.upload-title { font-weight: 500; font-size: 15px; color: var(--text2); }
.upload-subtitle { font-size: 13px; color: var(--text3); margin-top: 4px; }
.upload-link { color: var(--primary); font-weight: 500; }

.upload-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.preview-thumb {
  width: 70px; height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--border2);
}

/* Post type tabs */
.post-type-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.post-type-tab {
  flex: 1; min-width: 120px;
  padding: 12px 16px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  background: var(--white);
  font-family: var(--font-sans);
}
.post-type-tab .tab-icon { font-size: 22px; display: block; margin-bottom: 5px; }
.post-type-tab .tab-label { font-size: 13px; font-weight: 500; color: var(--text2); }
.post-type-tab .tab-desc { font-size: 11px; color: var(--text3); margin-top: 2px; }
.post-type-tab.active {
  border-color: var(--primary);
  background: rgba(123,45,82,0.06);
}
.post-type-tab.active .tab-label { color: var(--primary); }

.form-notice {
  background: rgba(123,45,82,0.06);
  border: 1px solid rgba(123,45,82,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text2);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}
.form-notice-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.form-submit-area { text-align: center; padding-top: 8px; }
.btn-submit {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 48px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.3px;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(123,45,82,0.30); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.form-submit-note { font-size: 12px; color: var(--text3); margin-top: 12px; }

/* Success message */
.form-success {
  background: linear-gradient(135deg, #EAF3DE, #C0DD97);
  border: 1px solid #639922;
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  display: none;
}
.form-success h3 { font-family: var(--font-serif); font-size: 28px; color: #3B6D11; margin-bottom: 8px; }
.form-success p { color: #3B6D11; font-size: 15px; }

/* ===== SINGLE MEMORY (single post view) ===== */
.single-memory { max-width: 760px; margin: 0 auto; padding: 48px 24px; }
.single-memory-header { margin-bottom: 32px; }
.single-memory-author { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.single-memory-author .author-avatar { width: 52px; height: 52px; font-size: 18px; }
.single-memory-media { margin-bottom: 32px; }
.single-memory-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.single-memory-gallery img {
  width: 100%; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.single-memory-message {
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  color: var(--text2);
  line-height: 1.65;
  padding: 24px 28px;
  background: var(--bg2);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  margin-bottom: 32px;
}

/* ===== COMMENTS ===== */
.comments-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.comments-title {
  font-family: var(--font-serif);
  font-size: 24px;
  margin-bottom: 24px;
  color: var(--text);
}
.comment-list { list-style: none; }
.comment-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-author-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.comment-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--primary);
}
.comment-author-name { font-weight: 500; font-size: 14px; }
.comment-date { font-size: 12px; color: var(--text3); margin-left: auto; }
.comment-text { font-size: 14px; color: var(--text2); line-height: 1.6; padding-left: 42px; }

.comment-form-wrap { margin-top: 32px; }
.comment-form-title { font-size: 16px; font-weight: 500; margin-bottom: 16px; }
.comment-form .form-input,
.comment-form .form-textarea { margin-bottom: 12px; }
.btn-comment {
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s;
}
.btn-comment:hover { background: var(--primary-light); }

/* ===== MODERATION NOTICE (admin bar supplement) ===== */
.mod-pending-notice {
  background: #FAEEDA;
  border: 1px solid #FAC775;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 13px;
  color: #633806;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.mod-pending-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #EF9F27; flex-shrink: 0;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; } 50% { opacity: 0.4; }
}

/* ===== SIDEBAR / ABOUT PANEL ===== */
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.sidebar-card h3 {
  font-size: 16px;
  font-family: var(--font-serif);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ===== FOOTER ===== */
#site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  padding: 48px 24px 32px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { font-family: var(--font-serif); font-size: 24px; color: white; margin-bottom: 10px; }
.footer-brand p { font-size: 14px; line-height: 1.6; }
.footer-col h4 { color: white; font-family: var(--font-sans); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: rgba(255,255,255,0.65); font-size: 14px; text-decoration: none; transition: color 0.2s; }
.footer-col ul a:hover { color: white; }
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.footer-bottom-love {
  font-family: var(--font-serif);
  font-style: italic;
  color: rgba(255,255,255,0.6);
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #main-nav { display: none; }
  #main-nav.open { display: block; position: absolute; top: 64px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--border); padding: 12px; }
  #main-nav.open ul { flex-direction: column; gap: 4px; }
  .nav-toggle { display: block; }
  .hero-title { font-size: 40px; }
  .stats-inner { flex-wrap: wrap; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); width: 50%; }
  .memory-grid { grid-template-columns: 1fr; }
  .page-with-sidebar { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .form-card { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .post-type-tabs { flex-direction: column; }
}
