/* Graceful Trauma Solutions - A Gentle Presence */

/* Smooth, unhurried experience */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Body - warm, never harsh */
body {
  color: #4A4A4A;
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
}

/* Typography that breathes */
p {
  margin-bottom: 1.75rem;
}

/* Gentle focus for accessibility */
*:focus-visible {
  outline: 2px solid #7A86B4;
  outline-offset: 4px;
  border-radius: 4px;
}

/* Flowing organic shapes */
.organic-shape {
  position: absolute;
  border-radius: 60% 40% 50% 50% / 50% 50% 40% 60%;
  opacity: 0.4;
  filter: blur(60px);
  pointer-events: none;
}

.organic-shape-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #E6E8F2 0%, #d4d8f0 100%);
  top: -100px;
  right: -150px;
  animation: drift 20s ease-in-out infinite;
}

.organic-shape-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #F5F6FA 0%, #E6E8F2 100%);
  bottom: 20%;
  left: -200px;
  animation: drift 25s ease-in-out infinite reverse;
}

.organic-shape-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #E6E8F2 0%, #d4d8f0 100%);
  top: 60%;
  right: -100px;
  animation: drift 18s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -20px) rotate(5deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(-3deg);
  }
}

/* Letter-like content flow */
.letter-content {
  max-width: 720px;
  margin: 0 auto;
}

/* Gentle emphasis - like a whisper */
.whisper {
  font-style: italic;
  color: #7A86B4;
}

/* Soft divider - like a breath between thoughts */
.breath {
  height: 2px;
  background: linear-gradient(90deg, transparent, #c8cce0, transparent);
  margin: 0.5rem auto 1.5rem auto;
  max-width: 200px;
}

@media (min-width: 768px) {
  .breath {
    margin: 1rem auto 2rem auto;
  }
}

/* Navigation - present but not demanding */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: #7A86B4;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.mobile-menu.active {
  max-height: 400px;
  opacity: 1;
}

/* Buttons that invite, not demand */
.btn-gentle {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: #7A86B4;
  color: white;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.4s ease;
  box-shadow: 0 4px 20px rgba(107, 117, 180, 0.25);
}

.btn-gentle:hover {
  background: #5A6694;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(107, 117, 180, 0.35);
}

.btn-soft {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: transparent;
  color: #7A86B4;
  border: 1px solid #E6E8F2;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.4s ease;
}

.btn-soft:hover {
  background: #F5F6FA;
  border-color: #7A86B4;
}

/* Mobile touch targets - minimum 44px for accessibility */
@media (max-width: 768px) {
  .btn-gentle,
  .btn-soft {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
  }
}

/* Photo frame - solid sage border, smooth fade outward */
.photo-frame {
  position: relative;
  max-width: 310px;
  margin: 0 auto;
  padding: 30px; /* space for the fade to breathe */
}

.photo-frame img {
  display: block;
  border-radius: 1rem;
  border: 5px solid #8B9B8B;
  box-shadow: 0 0 40px 15px rgba(139, 155, 139, 0.6);
}

/* Fade in on scroll - soft and unhurried */
.emerge {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1.4s ease-out, transform 1.6s ease-out;
}

.emerge.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -50px;
  left: 0;
  background: #7A86B4;
  color: white;
  padding: 12px 24px;
  z-index: 100;
  transition: top 0.3s ease;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
}

/* Footer - closing of the letter */
.footer-wave {
  background: linear-gradient(180deg, transparent 0%, #5A6694 100%);
  height: 100px;
  margin-bottom: -1px;
}

/* ===========================================
   ADMIN PANEL - Mobile First
   =========================================== */

/* Admin mobile menu - dropdown from top */
.admin-mobile-menu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

.admin-mobile-menu.active {
  max-height: 500px;
  opacity: 1;
}

/* Admin nav links - mobile first (used in mobile dropdown) */
.admin-nav-link {
  display: block;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
  min-height: 48px;
  display: flex;
  align-items: center;
  transition: background 0.2s ease;
}

.admin-nav-link:hover,
.admin-nav-link:active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.admin-nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 500;
}

/* Admin desktop nav (horizontal) */
.admin-nav a {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.admin-nav a:hover {
  background: #E6E8F2;
}

.admin-nav a.active {
  background: #7A86B4;
  color: white;
}

/* Admin cards - reduce padding on mobile */
.admin-card {
  background: white;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

@media (min-width: 768px) {
  .admin-card {
    padding: 1.5rem;
  }
}

/* Admin card that goes full-width on mobile (no card styling) */
.admin-card-mobile-full {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

@media (min-width: 768px) {
  .admin-card-mobile-full {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  }
}

/* Admin stat numbers - smaller on mobile */
.stat-number {
  font-size: 2.25rem;
  font-weight: 500;
  color: #7A86B4;
  line-height: 1;
}

@media (min-width: 768px) {
  .stat-number {
    font-size: 3rem;
  }
}

/* Admin page titles - smaller on mobile */
.admin-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  color: #7A86B4;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .admin-title {
    font-size: 1.875rem;
    margin-bottom: 2rem;
  }
}

/* Admin tables - horizontal scroll on mobile */
.admin-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1.25rem;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .admin-table-wrapper {
    margin: 0;
    padding: 0;
  }
}

/* Quick action buttons - full width on mobile, inline on desktop */
.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .admin-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
}

.admin-actions .btn-gentle,
.admin-actions .btn-soft {
  width: 100%;
  text-align: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .admin-actions .btn-gentle,
  .admin-actions .btn-soft {
    width: auto;
  }
}

/* Admin container - minimal padding on mobile (4px sides) */
.admin-container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 4px;
}

@media (min-width: 768px) {
  .admin-container {
    padding: 2rem 1.5rem;
  }
}

/* Admin container with minimal mobile padding for full-width forms */
.admin-container-tight {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 4px;
}

@media (min-width: 768px) {
  .admin-container-tight {
    padding: 2rem 1.5rem;
  }
}

/* Admin footer */
.admin-footer {
  padding: 2rem 1rem;
  text-align: center;
  color: rgba(74, 74, 74, 0.5);
  font-size: 0.875rem;
}

/* Admin form inputs - mobile first */
.admin-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #E6E8F2;
  border-radius: 0.75rem;
  font-size: 1rem;
  color: #4A4A4A;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 48px;
}

.admin-input:focus {
  outline: none;
  border-color: #7A86B4;
  box-shadow: 0 0 0 3px rgba(107, 117, 180, 0.1);
}

.admin-input::placeholder {
  color: #9CA3AF;
}

textarea.admin-input {
  min-height: 80px;
  resize: vertical;
}

.admin-label {
  display: block;
  font-size: 0.875rem;
  color: rgba(74, 74, 74, 0.7);
  margin-bottom: 0.5rem;
}

/* Summernote editor - mobile optimizations */
.note-editor.note-frame {
  border: 1px solid #E6E8F2 !important;
  border-radius: 0.75rem !important;
  overflow: hidden;
}

.note-editor .note-toolbar {
  background: #F5F6FA !important;
  border-bottom: 1px solid #E6E8F2 !important;
  padding: 0.5rem !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap !important;
  display: flex !important;
  gap: 0.25rem;
}

.note-editor .note-toolbar .note-btn-group {
  flex-shrink: 0;
}

.note-editor .note-toolbar .note-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 0.375rem !important;
}

.note-editor .note-editing-area {
  background: white;
}

.note-editor .note-editable {
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.8;
  color: #4A4A4A;
  padding: 1rem !important;
}

.note-editor .note-editable blockquote {
  border-left: 4px solid #7A86B4;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #666;
  font-style: italic;
}

@media (min-width: 768px) {
  .note-editor .note-toolbar {
    flex-wrap: wrap !important;
  }

  .note-editor .note-editable {
    padding: 1.25rem !important;
  }
}

/* Sticky action buttons for mobile forms */
.admin-sticky-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 639px) {
  .admin-sticky-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 0.5rem;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.08);
    z-index: 40;
    gap: 0.375rem;
  }

  .admin-sticky-actions .btn-gentle,
  .admin-sticky-actions .btn-soft,
  .admin-sticky-actions button,
  .admin-sticky-actions a {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-height: 36px;
  }

  /* Add padding to main content so sticky buttons don't cover content */
  .admin-has-sticky-actions {
    padding-bottom: 60px;
  }
}

/* Image upload area - mobile friendly */
.admin-upload-area {
  border: 2px dashed #E6E8F2;
  border-radius: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.admin-upload-area:hover,
.admin-upload-area:focus {
  border-color: #7A86B4;
  background: rgba(107, 117, 180, 0.02);
}

@media (min-width: 768px) {
  .admin-upload-area {
    padding: 3rem 2rem;
  }
}

/* Back link */
.admin-back-link {
  display: inline-flex;
  align-items: center;
  color: rgba(74, 74, 74, 0.6);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  min-height: 44px;
  transition: color 0.2s ease;
}

.admin-back-link:hover {
  color: #7A86B4;
}

.admin-back-link svg {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
}

/* ===========================================
   CONTENT IMAGES - Rounded, bordered, shadowed
   =========================================== */

/* Featured images on blog posts and newsletters */
.featured-image {
  width: 66%;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 1rem;
  border: 4px solid white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

/* Images within post/newsletter content */
.post-content img,
.newsletter-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  border: 3px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin: 1.5rem 0;
}

/* Slightly larger border on mobile for better visibility */
@media (max-width: 640px) {
  .featured-image {
    border-radius: 0.75rem;
    border-width: 3px;
  }

  .post-content img,
  .newsletter-content img {
    border-radius: 0.5rem;
    border-width: 2px;
  }
}
