/**
 * Feminism Magazine - PWA Styles
 * ===============================
 * Progressive Web App UI components, animations,
 * native app-like experience, device optimizations
 * @version 1.0.0
 */

/* ============================================
   CSS VARIABLES - PWA SPECIFIC
   ============================================ */
:root {
  /* Safe area insets */
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);

  /* PWA Colors */
  --pwa-primary: #c85a7a;
  --pwa-primary-dark: #a84464;
  --pwa-success: #4caf50;
  --pwa-warning: #ff9800;
  --pwa-error: #f44336;
  --pwa-info: #2196f3;

  /* Touch targets */
  --touch-target-min: 44px;
  --touch-target-comfortable: 48px;

  /* Animations */
  --animation-duration: 0.3s;
  --animation-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   PWA APP SHELL STYLES
   ============================================ */

/* App Shell Loader */
.app-shell-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-shell-loader__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f0f0f0;
  border-top-color: var(--pwa-primary);
  border-radius: 50%;
  animation: shellSpin 1s linear infinite;
}

@keyframes shellSpin {
  to { transform: rotate(360deg); }
}

/* Offline Indicator */
.offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--pwa-error);
  color: white;
  padding: 0.5rem;
  text-align: center;
  transform: translateY(-100%);
  transition: transform 0.3s var(--animation-timing);
  z-index: 10000;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.offline-indicator.active {
  transform: translateY(0);
}

/* Sync Indicator */
.sync-indicator {
  position: fixed;
  bottom: calc(1rem + var(--sab));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #333;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  opacity: 0;
  transition: all 0.3s var(--animation-timing);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sync-indicator.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sync-indicator__spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   TOUCH GESTURE STYLES
   ============================================ */

/* Swipe Indicators */
.swipe-indicator {
  position: fixed;
  top: 50%;
  background: rgba(200, 90, 122, 0.9);
  color: white;
  padding: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 100;
  transition: transform 0.3s var(--animation-timing);
  backdrop-filter: blur(4px);
}

.swipe-indicator--prev {
  left: 0;
  border-radius: 0 8px 8px 0;
  transform: translateX(-100%) translateY(-50%);
}

.swipe-indicator--next {
  right: 0;
  border-radius: 8px 0 0 8px;
  transform: translateX(100%) translateY(-50%);
}

.swipe-indicator.visible {
  transform: translateX(0) translateY(-50%);
}

/* Pull to Refresh */
.pull-indicator {
  position: fixed;
  top: -60px;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(to bottom, var(--pwa-primary), transparent);
  color: white;
  transition: transform 0.2s ease;
  z-index: 99;
}

.pull-indicator__spinner {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.pull-indicator__spinner--spinning {
  animation: spin 1s linear infinite;
}

/* Context Menu */
.context-menu {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.context-menu__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.context-menu__content {
  position: relative;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  min-width: 280px;
  max-width: 90vw;
  animation: menuSlideUp 0.2s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.context-menu__item {
  width: 100%;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none;
  background: none;
  border-bottom: 1px solid #f0f0f0;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.context-menu__item:last-child {
  border-bottom: none;
}

.context-menu__item:active {
  background: #f5f5f5;
}

.context-menu__icon {
  font-size: 1.25rem;
}

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

/* Heart Animation for Double Tap Like */
@keyframes heartPop {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -100px) scale(1);
    opacity: 0;
  }
}

/* ============================================
   NATIVE FEATURE UI
   ============================================ */

/* Reading Mode Toggle */
.reading-mode-toggle {
  position: fixed;
  bottom: calc(80px + var(--sab));
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--pwa-primary);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 100;
  font-size: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reading-mode-toggle:active {
  transform: scale(0.95);
}

/* Reading Mode Styles */
body.reading-mode {
  background: #fafafa;
}

body.reading-mode .article-content {
  font-size: 1.125rem;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
}

body.reading-mode .header,
body.reading-mode .sidebar,
body.reading-mode .footer {
  opacity: 0.3;
}

body.reading-mode .article-content img {
  border-radius: 8px;
}

/* Quick Actions Bar */
.quick-actions-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  padding-bottom: calc(1rem + var(--sab));
  background: white;
  border-top: 1px solid #eee;
  z-index: 99;
  transform: translateY(100%);
  transition: transform 0.3s var(--animation-timing);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.quick-actions-bar.visible {
  transform: translateY(0);
}

.quick-action {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: white;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.quick-action:active {
  background: #f5f5f5;
  transform: scale(0.95);
}

/* Text Size Controls */
body[data-text-size="large"] .article-content {
  font-size: 1.25rem;
}

body[data-text-size="xlarge"] .article-content {
  font-size: 1.5rem;
}

/* Toast Notifications */
.native-toast,
.offline-toast,
.gesture-toast,
.install-toast {
  position: fixed;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  z-index: 10001;
  animation: fadeInUp 0.3s ease;
  max-width: 90vw;
  text-align: center;
}

@keyframes fadeInUp {
  from {
    transform: translate(-50%, 20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   OFFLINE MANAGER UI
   ============================================ */

/* Download Queue Indicator */
.download-queue-indicator {
  position: fixed;
  top: 60px;
  right: 1rem;
  background: var(--pwa-primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  z-index: 99;
  display: none;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.3s ease;
}

.download-queue-indicator.active {
  display: flex;
}

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Offline Panel */
.offline-panel {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.offline-panel.active {
  display: block;
}

.offline-panel__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.offline-panel__content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 90%;
  max-width: 400px;
  background: white;
  transform: translateX(100%);
  transition: transform 0.3s var(--animation-timing);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.offline-panel.active .offline-panel__content {
  transform: translateX(0);
}

.offline-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.offline-panel__header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.offline-panel__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: #999;
}

.offline-panel__storage {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.storage-bar {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.storage-bar__fill {
  height: 100%;
  background: var(--pwa-primary);
  transition: width 0.3s ease;
}

.storage-bar__fill.high {
  background: var(--pwa-warning);
}

.storage-bar__fill.critical {
  background: var(--pwa-error);
}

.storage-text {
  font-size: 0.875rem;
  color: #666;
}

.offline-panel__sync {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.sync-status {
  font-size: 0.875rem;
  color: var(--pwa-success);
}

.sync-status.syncing {
  color: var(--pwa-warning);
}

.sync-status.error {
  color: var(--pwa-error);
}

.sync-btn {
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s ease;
}

.sync-btn:active {
  background: #e0e0e0;
}

.offline-articles-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.offline-article {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.15s ease;
}

.offline-article:active {
  background: #f9f5f5;
}

.offline-article__image {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.offline-article__content {
  flex: 1;
  min-width: 0;
}

.offline-article__title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offline-article__meta {
  font-size: 0.75rem;
  color: #999;
}

.offline-article__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.offline-article__btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.offline-article__btn:active {
  background: #e0e0e0;
}

.offline-empty {
  text-align: center;
  color: #999;
  padding: 2rem;
}

/* ============================================
   INSTALL EXPERIENCE UI
   ============================================ */

/* Install Banner */
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 1rem;
  padding-bottom: calc(1rem + var(--sab));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  display: none;
  transform: translateY(100%);
  transition: transform 0.3s var(--animation-timing);
}

.install-banner.active {
  display: flex;
  transform: translateY(0);
}

.install-banner__content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.install-banner__icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.install-banner__text {
  display: flex;
  flex-direction: column;
}

.install-banner__text strong {
  font-size: 1rem;
  color: #333;
}

.install-banner__text span {
  font-size: 0.875rem;
  color: #666;
}

.install-banner__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.install-banner__btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.install-banner__btn--install {
  background: var(--pwa-primary);
  color: white;
}

.install-banner__btn--install:active {
  background: var(--pwa-primary-dark);
}

.install-banner__btn--dismiss {
  background: none;
  font-size: 1.5rem;
  padding: 0.5rem;
  color: #999;
}

/* Install Modal */
.install-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.install-modal.active {
  display: flex;
}

.install-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.install-modal__content {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlide 0.3s ease;
}

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

.install-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

.install-modal__header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.install-modal__icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.install-modal__header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.install-modal__header p {
  margin: 0;
  color: #666;
}

.install-modal__features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.install-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f9f5f5;
  border-radius: 8px;
}

.install-feature__icon {
  font-size: 1.25rem;
}

.install-modal__platform {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f5f5f5;
  border-radius: 8px;
}

.install-modal__platform h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.install-modal__platform ol {
  margin: 0;
  padding-left: 1.5rem;
}

.install-modal__platform li {
  margin-bottom: 0.5rem;
}

.install-modal__btn {
  width: 100%;
  padding: 1rem;
  background: var(--pwa-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.install-modal__btn:hover {
  background: var(--pwa-primary-dark);
}

.install-modal__btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Update Notification */
.update-notification {
  position: fixed;
  top: 60px;
  left: 1rem;
  right: 1rem;
  background: var(--pwa-success);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease;
}

.update-notification.active {
  display: flex;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.update-notification__content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.update-notification__icon {
  font-size: 1.25rem;
}

.update-notification__btn {
  padding: 0.5rem 1rem;
  background: white;
  color: var(--pwa-success);
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.update-notification__btn:active {
  opacity: 0.8;
}

/* What's New Modal */
.whats-new-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.whats-new-modal.active {
  display: flex;
}

.whats-new-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.whats-new-modal__content {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  animation: modalSlide 0.3s ease;
}

.whats-new__header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.whats-new__header h2 {
  margin: 0 0 0.5rem;
}

.whats-new__version {
  color: var(--pwa-primary);
  font-weight: 600;
}

.whats-new__features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.whats-new__feature {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #f9f5f5;
  border-radius: 8px;
}

.whats-new__feature-icon {
  font-size: 1.5rem;
}

.whats-new__feature-text h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.whats-new__feature-text p {
  margin: 0;
  font-size: 0.875rem;
  color: #666;
}

.whats-new__btn {
  width: 100%;
  padding: 1rem;
  background: var(--pwa-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.whats-new__btn:active {
  background: var(--pwa-primary-dark);
}

/* ============================================
   RESPONSIVE IMAGES V2
   ============================================ */

/* Responsive picture element */
.responsive-image {
  display: block;
  max-width: 100%;
  height: auto;
}

.responsive-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Art direction breakpoints */
@media (max-width: 480px) {
  .responsive-image--crop img {
    object-position: center top;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .responsive-image--crop img {
    object-position: center center;
  }
}

@media (min-width: 769px) {
  .responsive-image--crop img {
    object-position: center;
  }
}

/* Lazy decoding */
img[decoding="async"] {
  content-visibility: auto;
}

/* Priority hints */
img[fetchpriority="high"] {
  will-change: transform;
}

img[fetchpriority="low"] {
  content-visibility: auto;
}

/* Modern image formats fallback */
picture {
  display: block;
}

picture img {
  width: 100%;
  height: auto;
}

/* ============================================
   DEVICE-SPECIFIC OPTIMIZATIONS
   ============================================ */

/* iOS Safe Area Support */
@supports (padding-top: env(safe-area-inset-top)) {
  .header {
    padding-top: env(safe-area-inset-top);
  }

  .mobile-menu {
    padding-top: calc(var(--header-height) + env(safe-area-inset-top));
  }

  .install-banner,
  .quick-actions-bar {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* iPhone SE / Small Devices */
@media (max-width: 375px) and (max-height: 667px) {
  :root {
    --header-height: 52px;
  }

  .card__title {
    font-size: 1rem;
  }

  .card__excerpt {
    font-size: 0.875rem;
  }
}

/* iPhone 12/14 Pro Max / Large Devices */
@media (min-width: 390px) and (min-height: 844px) {
  :root {
    --header-height: 60px;
  }

  .card {
    border-radius: 20px;
  }
}

/* Samsung Galaxy Fold */
@media (min-width: 280px) and (max-width: 653px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .card__image {
    aspect-ratio: 16 / 9;
  }
}

/* iPad / Tablets */
@media (min-width: 768px) and (max-width: 1024px) {
  .mobile-menu {
    width: 60%;
    max-width: 400px;
  }

  .offline-panel__content {
    width: 50%;
  }

  .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .install-banner,
  .quick-actions-bar {
    display: none !important;
  }

  .reading-mode-toggle {
    bottom: 1rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .offline-panel__content,
  .install-modal__content,
  .whats-new-modal__content,
  .context-menu__content {
    background: #1a1a1a;
    color: #fff;
  }

  .offline-article__title,
  .install-modal__header h2,
  .whats-new__header h2 {
    color: #fff;
  }

  .offline-article,
  .install-feature,
  .whats-new__feature,
  .offline-panel__storage,
  .offline-panel__sync,
  .install-modal__platform,
  .install-banner {
    background: #2a2a2a;
    border-color: #333;
  }

  .sync-btn,
  .offline-article__btn {
    background: #333;
    color: #fff;
  }

  .offline-empty,
  .storage-text,
  .install-modal__header p,
  .whats-new__feature-text p {
    color: #999;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .swipe-indicator,
  .pull-indicator,
  .context-menu,
  .install-banner,
  .install-modal__content,
  .whats-new-modal__content,
  .offline-panel__content,
  .update-notification {
    animation: none !important;
  }
}

/* Print Styles */
@media print {
  .install-banner,
  .install-modal,
  .update-notification,
  .whats-new-modal,
  .offline-panel,
  .reading-mode-toggle,
  .quick-actions-bar,
  .swipe-indicator,
  .pull-indicator {
    display: none !important;
  }
}

/* ============================================
   ANIMATION UTILITIES
   ============================================ */

.animate-fade-in {
  animation: fadeIn 0.3s ease;
}

.animate-fade-in-up {
  animation: fadeInUp 0.3s ease;
}

.animate-slide-in-right {
  animation: slideInRight 0.3s ease;
}

.animate-slide-down {
  animation: slideDown 0.3s ease;
}

/* Smooth scrolling for iOS */
@supports (-webkit-touch-callout: none) {
  .offline-articles-list,
  .mobile-menu {
    -webkit-overflow-scrolling: touch;
  }
}

/* Prevent callout menu on iOS for interactive elements */
.no-callout {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Touch action optimization */
.touch-pan-x {
  touch-action: pan-x;
}

.touch-pan-y {
  touch-action: pan-y;
}

.touch-none {
  touch-action: none;
}

/* GPU Acceleration for smooth animations */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* Content visibility for off-screen content */
.content-visibility-auto {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}
