/* Base: Mobile (1 column) */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;  /* clip no soportado en Safari iOS < 16 */
  margin: 0 auto;
  min-height: 100vh;
  padding: 0;
  box-sizing: border-box;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, #FF6B00 0%, #FF9800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}

.nav-item {
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255, 107, 0, 0.1);
  color: var(--color-primary);
}

.nav-item.active {
  color: var(--color-primary);
}

/* Mobile Header */
.mobile-header {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 20px;
  border-radius: 0 0 24px 24px;
  border-top: none;
  gap: 6px;
  overflow: visible;
}

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

/* Reduce header padding more on very small screens */
@media (max-width: 380px) {
  .mobile-header {
    padding: 10px 10px;
    gap: 4px;
  }
}

/* Mobile Footer */
.mobile-footer {
  position: fixed;
  bottom: 0px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px 16px;
  border-radius: 24px 24px 0 0;
  border-bottom: none;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 -4px 20px rgba(30,36,24,0.05);
  overflow: visible;
  gap: 8px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.mobile-footer.footer-hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1023px) {
  .main-content {
    /* Add extra bottom padding so nothing overlaps with footer */
    padding-bottom: 90px !important;
  }
}

.mobile-footer::-webkit-scrollbar {
  display: none;
}

.mobile-footer .nav-item {
  padding: 4px;
  flex-shrink: 0;
}

.mobile-footer .nav-text {
  display: none;
}

/* Desktop layout (3 Columns) */
@media (min-width: 1024px) {
  .app-container {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    max-width: 1200px;
    height: 100vh; /* Fijamos altura al viewport */
    overflow: hidden; /* Evitamos scroll global */
    gap: 30px;
    padding: 0 20px;
  }

  /* Professional Admin Layout - Always horizontal/flex */
  .app-container.admin-layout {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    padding: 0;
    gap: 0;
    display: flex;
    flex-direction: row;
    background: #1c2116; 
  }

  @media (max-width: 1023px) {
    .app-container.admin-layout {
      flex-direction: column; /* Stack on mobile, but we'll fix the sidebar position */
    }
  }

  .admin-layout .main-content {
    max-width: none;
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 32px 40px;
    background: transparent;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  @media (max-width: 768px) {
    .admin-layout .main-content {
      padding: 20px 16px 100px 16px; /* Extra padding bottom for the mobile admin bar */
    }
  }

  .admin-layout .main-content::-webkit-scrollbar {
    display: none;
  }

  .mobile-header, .mobile-footer {
    display: none !important;
  }


  .left-sidebar {
    width: 275px;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  .left-sidebar::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
  }

  .right-sidebar {
    width: 320px;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  .right-sidebar::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
  }

  .main-content {
    max-width: 600px;
    width: 100%;
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 20px 0 80px 0;
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 24px);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  /* Wide content for Blog, adjust for readability */
  .main-content.wide-content {
    max-width: 720px; 
    margin: 0;
    padding: 20px 0;
  }

  /* Layout for Botanical AI (keeps standard 600px middle column width but fixes scrolling) */
  .main-content.ai-content {
    max-width: 600px;
    margin: 0;
    padding: 10px 0 !important;
    height: 100vh;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
  }

  .main-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
  }

  .mobile-only-trends {
    display: none !important;
  }
}

/* Main content for Mobile */
@media (max-width: 1023px) {
  .left-sidebar { display: none !important; }
  .right-sidebar { display: none !important; }
  .main-content {
    max-width: 100vw;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px 80px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .main-content.ai-content {
    height: 100vh !important;
    overflow: hidden !important;
    padding: 60px 16px 80px 16px !important;
  }

  .mobile-only-trends {
    display: block !important;
  }
}

/* Auth / Create Post / Everything else */
.botanical-header-group {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.botanical-messages-scroll {
  padding-top: 20px;
}

.feed-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.create-post {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.create-post-header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.icon-button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.icon-button:hover {
  color: var(--color-primary);
}

.tooltip-container {
  position: relative;
  display: inline-flex;
}

.tooltip-container:hover .custom-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.custom-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text-main);
  color: var(--bg-color);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.70rem;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
  pointer-events: none;
  margin-bottom: 8px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.custom-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -4px;
  border-width: 4px;
  border-style: solid;
  border-color: var(--text-main) transparent transparent transparent;
}

.tooltip-bottom.custom-tooltip {
  bottom: auto;
  top: 100%;
  transform: translateX(-50%) translateY(-4px);
  margin-bottom: 0;
  margin-top: 8px;
}

.tooltip-container:hover .tooltip-bottom.custom-tooltip {
  transform: translateX(-50%) translateY(0);
}

.tooltip-bottom.custom-tooltip::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent var(--text-main) transparent;
}

.avatar.placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}

.post-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s ease;
}

.post-card:hover {
  transform: translateY(-2px);
}

.post-header {
  display: flex;
  gap: 14px;
  align-items: center;
}

.post-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.post-time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-main);
}

.post-image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 550px;
  border-radius: 16px;
  background: rgba(0,0,0,0.02);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.post-image-container {
  aspect-ratio: 1 / 1 !important;
  max-height: 550px !important;
  width: 100% !important;
  background: rgba(0,0,0,0.02) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.post-image-container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block;
}

.post-actions {
  display: flex;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

.content-box {
  padding: 40px;
  text-align: center;
}

/* Premium Glassmorphism */
.botanical-liquid-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
}

.glass-panel-premium {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.glass-badge-red {
  background: rgba(239, 68, 68, 0.1);
  color: #c2410c; 
  border-color: rgba(239, 68, 68, 0.2);
}

.glass-badge-orange-crystal {
  background: rgba(255, 107, 0, 0.7);
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.close-button-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.close-button-glass:hover {
  background: var(--textarea-bg);
  transform: scale(1.05);
}

.mention {
  color: #3b82f6; /* Blue matching interactive links */
  font-weight: 600;
  text-decoration: none;
}
.mention:hover {
  text-decoration: underline;
}

.hashtag {
  color: var(--color-primary); /* Uses the sunset orange variables automatically */
  font-weight: 600;
  cursor: pointer;
}
.hashtag:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .mobile-only-btn {
    display: flex !important;
  }
}
@media (min-width: 769px) {
  .mobile-only-btn {
    display: none !important;
  }
}

.post-thumbnail {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.post-thumbnail-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: white;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: inherit;
}

.post-thumbnail:hover .post-thumbnail-overlay {
  opacity: 1;
}

.post-thumbnail-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}
@media (max-width: 768px) {
  .mobile-hide {
    display: none !important;
  }
}

/* Skeletons & Performance */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  width: 100%;
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
}

/* PWA Installation Button */
.mobile-only-install {
  display: block;
}

@media (min-width: 768px) {
  .mobile-only-install {
    display: none !important;
  }
}

/* Notifications Header Layout */
.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.notifications-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 768px) {
  .notifications-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .notifications-actions {
    width: 100%;
    gap: 12px;
  }
}
/* Admin Dashboard Specific Styles */
.admin-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--glass-border);
}

.admin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--color-primary);
}

.campaign-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(16, 185, 129, 0.1);
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.campaign-row:hover {
  background: rgba(16, 185, 129, 0.02);
  border-color: var(--color-primary);
}

.admin-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.banner-preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--glass-border);
  transition: all 0.3s ease;
}

.banner-preview-item:hover {
  transform: scale(1.05);
  border-color: var(--color-primary);
}

.banner-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  padding: 4px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.banner-preview-item:hover .banner-delete-btn {
  opacity: 1;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-section {
  animation: fadeIn 0.5s ease forwards;
}

@media (max-width: 640px) {
  .collection-tabs-container {
    display: flex !important;
    gap: 4px !important;
    padding: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  .collection-tabs-container button {
    flex: 1 !important;
    padding: 8px 2px !important;
    font-size: 0.75rem !important;
    border-radius: 10px !important;
    justify-content: center !important;
    min-width: 0 !important; /* Allow shrinking */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Prevent any drift in the alerts area - Ultra aggressive */
  .alerts-tab-content {
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    padding: 0 4px !important;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center boxes if needed, but boxes will be 100% */
  }

  .weather-card {
    width: 100% !important;
    max-width: 800px !important; /* Elegant max width for desktop */
    margin: 0 auto 16px auto !important;
    padding: 24px !important;
    box-sizing: border-box !important;
  }

  @media (max-width: 640px) {
    .weather-card {
      max-width: 340px !important;
      padding: 12px !important;
      margin-bottom: 12px !important;
    }
    
    .alerts-tab-content * {
      max-width: 100% !important;
      box-sizing: border-box !important;
    }
  }

  /* Specific exception for Leaflet internal markers */
  .leaflet-marker-icon {
    max-width: none !important;
  }
}

/* Premium Neon Crystal Icon Container (Neon Glass Aesthetic) */
.nav-icon-glass {
  width: 42px;
  height: 42px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 107, 0, 0.05);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1.5px solid rgba(255, 107, 0, 0.25);
  box-shadow: 
    0 8px 32px 0 rgba(255, 107, 0, 0.08),
    inset 0 0 10px rgba(255, 107, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-icon-glass svg {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  stroke-width: 2.2px;
  filter: drop-shadow(0 0 2px rgba(255, 107, 0, 0.2));
}

.nav-item:hover .nav-icon-glass {
  background: rgba(255, 107, 0, 0.12);
  border-color: rgba(255, 107, 0, 0.5);
  color: var(--color-primary);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 12px 40px 0 rgba(255, 107, 0, 0.2),
    inset 0 0 15px rgba(255, 107, 0, 0.1);
}

.nav-item:hover .nav-icon-glass svg {
  filter: drop-shadow(0 0 5px rgba(255, 107, 0, 0.5));
}

.nav-item.active .nav-icon-glass {
  background: rgba(255, 107, 0, 0.18);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 
    0 0 25px rgba(255, 107, 0, 0.35),
    inset 0 0 12px rgba(255, 107, 0, 0.2);
}

.nav-item.active .nav-icon-glass svg {
  filter: drop-shadow(0 0 8px rgba(255, 107, 0, 0.7));
  stroke-width: 2.5px;
}

.dark .nav-icon-glass {
  background: rgba(255, 107, 0, 0.12) !important;
  border-color: rgba(255, 107, 0, 0.4) !important;
  box-shadow: 
    0 0 20px rgba(255, 107, 0, 0.15),
    inset 0 0 10px rgba(255, 107, 0, 0.15) !important;
}

.dark .nav-icon-glass svg {
  color: #fff;
  filter: drop-shadow(0 0 6px rgba(255, 107, 0, 0.5));
}

.dark .nav-item.active .nav-icon-glass {
  background: rgba(255, 107, 0, 0.25) !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 35px rgba(255, 107, 0, 0.45) !important;
}

/* Colored Glass Themes */
.nav-item.active.nav-green .nav-icon-glass {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  box-shadow: 
    0 0 25px rgba(16, 185, 129, 0.3),
    inset 0 0 10px rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.nav-item.active.nav-green .nav-icon-glass svg {
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
  stroke-width: 2.5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-item.active {
  background: transparent;
  color: var(--color-primary);
}

.nav-item.active.nav-green {
  background: transparent;
  color: #10b981;
}

.nav-text {
  font-size: 1rem;
  font-weight: 600;
}

/* Original Glassmorphism Crystal Badge */
.glass-badge-orange-crystal {
  background: rgba(255, 87, 0, 0.9); /* Darker, more opaque orange for readability */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(255, 87, 0, 0.3);
  z-index: 100;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  animation: badgeFadeIn 0.3s ease-out;
}


@keyframes badgeFadeIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

/* Premium Icon Glow for PRO Users & Achievements */
.icon-glow-pro {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-glow-pro::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: inherit;
  filter: blur(12px);
  opacity: 0.5;
  z-index: -1;
  animation: glowPulse 3s infinite ease-in-out;
}

.icon-glow-pro svg {
  filter: drop-shadow(0 0 5px currentColor);
  animation: iconFloat 3s infinite ease-in-out;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

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

.merit-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: help;
  position: relative;
  overflow: visible;
}


/* Markdown Content Styling */
.markdown-content {
  font-size: 0.95rem;
  line-height: 1.6;
}
.markdown-content p {
  margin-top: 0;
  margin-bottom: 8px;
}
.markdown-content p:last-child {
  margin-bottom: 0;
}
.markdown-content ul, .markdown-content ol {
  padding-left: 24px;
  margin-top: 4px;
  margin-bottom: 8px;
}
.markdown-content li {
  margin-bottom: 4px;
}
.markdown-content strong {
  font-weight: 700;
  color: inherit;
}


/* Neon Icon Button Effect */
.neon-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.neon-icon:hover {
  background: rgba(255, 107, 0, 0.1) !important;
  color: var(--color-primary) !important;
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.2);
  transform: scale(1.1);
}

.neon-icon svg {
  filter: drop-shadow(0 0 0px transparent);
  transition: filter 0.3s ease;
}

.neon-icon:hover svg {
  filter: drop-shadow(0 0 8px rgba(255, 107, 0, 0.5));
}
/* Blog del Territorio - Estándares de Usabilidad WCAG */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.blog-post-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  border: 1.5px solid var(--glass-border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  height: 100%;
}

.blog-post-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-primary);
  box-shadow: 0 20px 40px rgba(255, 107, 0, 0.15);
}

.blog-post-card img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-post-card:hover img {
  transform: scale(1.05);
}

/* Reading Experience Typography - WCAG Optimized */
.markdown-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  line-height: 1.8;
  font-size: clamp(1rem, 1.1vw + 0.5rem, 1.125rem); /* Fluid font size */
  text-align: left !important;
  max-width: min(72ch, 100%);
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  padding: 0 clamp(16px, 5vw, 32px); /* Responsive horizontal padding */
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-top: 2.5em;
  margin-bottom: 0.8em;
  color: var(--text-main);
  line-height: 1.1;
}

.markdown-body h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
.markdown-body h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
.markdown-body h3 { font-size: clamp(1.3rem, 4vw, 1.6rem); }

.markdown-body p {
  margin-bottom: 1.6em;
  text-align: left !important;
}

.markdown-body blockquote {
  border-left: 4px solid var(--color-primary);
  padding: clamp(16px, 4vw, 24px) clamp(20px, 5vw, 32px);
  margin: 32px 0;
  font-style: italic;
  color: var(--text-muted);
  background: rgba(255, 107, 0, 0.03);
  border-radius: 0 16px 16px 0;
  font-size: clamp(1rem, 3vw, 1.15rem);
}

.markdown-body img {
  width: 100%;
  max-width: 100%;
  border-radius: clamp(16px, 4vw, 24px);
  margin: clamp(24px, 8vw, 48px) 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--glass-border);
  object-fit: cover;
}

/* Glass panels responsive fixes */
@media (max-width: 480px) {
  .glass-panel {
    padding: 20px 16px !important;
    border-radius: 20px !important;
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px;
  }
}

/* Modern AI Sparkle Animation */
@keyframes soft-pulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.sparkle-container {
  width: 32px;
  height: 32px;
  background: rgba(255, 107, 0, 0.08);
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: all 0.3s ease;
}

.ai-sparkle-icon {
  animation: soft-pulse 4s infinite ease-in-out;
}

.ai-scanner-card:hover .sparkle-container {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: scale(1.05);
}

/* Knight Rider (KITT) Separator Animation */
.knight-rider-separator {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  margin: 20px 0;
}





/* Botanical AI - Responsive Input Area */
.botanical-input-row {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.botanical-actions-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.botanical-icon-btn {
  padding: 10px;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}

.botanical-text-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 24px;
}

.botanical-send-btn {
  padding: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .botanical-input-row { padding: 12px 10px; gap: 8px; }
  .botanical-actions-group { gap: 4px; }
  .botanical-icon-btn { padding: 8px; }
  .botanical-text-input { padding: 10px 14px; font-size: 0.9rem; }
  .botanical-send-btn { padding: 10px; }
}

/* SCOPED Neon-morphism Scrollbar (Only for Botanical AI) */
.botanical-main-wrapper ::-webkit-scrollbar {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

.botanical-main-wrapper ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02) !important;
  border-radius: 10px !important;
}

.botanical-main-wrapper ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3) !important;
  border-radius: 99px !important;
  border: 7px solid transparent !important;
  background-clip: content-box !important;
  transition: all 0.3s ease;
}

.botanical-main-wrapper ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5) !important;
}

.botanical-main-wrapper ::-webkit-scrollbar-button:single-button {
  background-color: transparent !important;
  display: block !important;
  height: 24px !important;
  width: 20px !important;
  background-repeat: no-repeat !important;
  background-size: 12px !important;
  background-position: center !important;
  opacity: 0.6 !important;
}

.botanical-main-wrapper ::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M18 15l-6-6-6 6'/></svg>") !important;
}

.botanical-main-wrapper ::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") !important;
}

/* Botanical AI - Liquid Glass Sections */
.botanical-liquid-glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
  backdrop-filter: blur(14px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%) !important;
  border: none !important;
  position: relative;
  z-index: 10;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.05),
    inset 0 0 30px rgba(255, 255, 255, 0.5) !important;
}

.dark .botanical-liquid-glass {
  background: rgba(15, 25, 20, 0.5) !important;
  border: none !important;
  box-shadow: none !important;
}

.botanical-main-wrapper {
  position: relative;
  border: none !important;
  background: linear-gradient(135deg, #eef5f2 0%, #ffffff 100%) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08) !important;
}

.dark .botanical-main-wrapper {
  background: #0f1914 !important;
}

.botanical-liquid-glass::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Botanical AI - Flex Layout */
.botanical-header-group {
  position: relative;
  z-index: 50;
  width: 100%;
}

.botanical-messages-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-padding-top: 20px;
}

@media (max-width: 600px) {
  .botanical-messages-scroll {
    padding: 16px 12px !important;
  }
}

/* Helper to hide scrollbars while keeping functionality */
.hide-scrollbar {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}
.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

@media (max-width: 480px) {
  .hidden-xs {
    display: none !important;
  }
}

/* Doctor Modes Grid System */
.doctor-modes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
}

@media (max-width: 600px) {
  .doctor-modes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 400px) {
  .doctor-modes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Botanical AI - Doctor Mode Buttons Hover */
.glass-button-botanica.active {
  transform: translateY(-2px);
}

/* Subtle sweep light effect on hover */
.doctor-mode-btn::after {
  content: '';
  position: absolute;
  top: -50%; left: -150%;
  width: 200%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  pointer-events: none;
}

.doctor-mode-btn:hover::after {
  left: 150%;
}



/* Admin Newsletter Responsive Layout */
.admin-newsletter-container {
  padding: 40px;
  min-height: 100vh;
  background: radial-gradient(circle at top right, rgba(255,107,0,0.05), transparent 400px), radial-gradient(circle at bottom left, rgba(255,107,0,0.05), transparent 400px);
}
.admin-newsletter-header {
  margin-bottom: 50px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}
.admin-newsletter-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 1024px) {
  .admin-newsletter-container {
    padding: 20px;
  }
  .admin-newsletter-grid {
    grid-template-columns: 1fr;
  }
  .admin-newsletter-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 480px) {
  .admin-newsletter-container {
    padding: 10px;
  }
}

/* Multi-platform Share Menu styles */
.share-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  box-sizing: border-box;
}

.share-menu-item:hover {
  background: rgba(255, 107, 0, 0.08);
  border-color: rgba(255, 107, 0, 0.35);
  transform: translateX(3px);
}

.dark .share-menu-item {
  background: rgba(0, 0, 0, 0.2);
}

.dark .share-menu-item:hover {
  background: rgba(255, 107, 0, 0.12);
  border-color: rgba(255, 107, 0, 0.5);
}

@keyframes slideUpShare {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
