/* Connect Tag - Shared Styles */

/* 1. Root Variables */
:root {
  --ct-primary: #0077b6;
  --ct-primary-hover: #005b8a;
  --ct-secondary: #25d366;
  --ct-dark-bg: #0d001a;
  --ct-card-bg: #1a0033;
  --ct-text-light: #ffffff;
  --ct-text-muted: #a0a0a0;
  --ct-text-dark: #222222;
  --ct-border: rgba(255,255,255,0.1);
  --ct-shadow: 0 10px 30px rgba(0,0,0,0.25);
  --ct-font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  --ct-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-display: swap;
}

/* 2. Base & Global Reset */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  font-family: 'Cairo', 'Cairo-Fallback', sans-serif;
}

#home-content {
  opacity: 1;
  visibility: visible;
  filter: blur(5px);
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.page-entered #home-content,
#home-content.visible {
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
}

/* Zero CLS Font Matching & Font Display */
@font-face {
  font-family: 'Cairo-Fallback';
  src: local('Arial');
  ascent-override: 105%;
  descent-override: 35%;
  line-gap-override: 0%;
  size-adjust: 106%;
}

/* Force Font Display Swap for FontAwesome */
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.0/webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
  font-family: 'Font Awesome 6 Brands';
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.0/webfonts/fa-brands-400.woff2') format('woff2');
}

/* 3. Preloader Styles */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #050505;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  transition: all 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
  overflow: hidden;
}

.preloader-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 20%, rgba(0, 119, 182, 0.15) 0%, transparent 40%), radial-gradient(circle at 80% 80%, rgba(37, 211, 102, 0.1) 0%, transparent 40%);
  filter: blur(80px);
  animation: bgMove 10s ease infinite alternate;
}

@keyframes bgMove {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.2) translate(2%, 2%); }
}

.preloader-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 20px;
}

.loader-logo {
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.loader-logo i {
  font-size: 40px;
  color: #0077b6;
}

.loader-logo span {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
}

.progress-container {
  width: 280px;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00adef, #25d366);
  transition: width 0.4s ease;
}

.preloader-hidden {
  opacity: 0;
  visibility: hidden;
}

/* 4. Common Layout Styles */
.page-header-unified {
  background: #fff;
  color: #0077b6;
  border-bottom: 1px solid #eee;
  padding: 150px 0 50px;
  text-align: center;
}

.page-header-unified h1 {
  color: #0077b6;
  font-weight: 800;
  margin-bottom: 10px;
}

/* 5. Breadcrumb Styling */
.breadcrumb-custom {
  padding: 0;
  margin: 0;
  list-style: none;
  display: inline-block;
}

.breadcrumb-custom li {
  display: inline-flex;
  align-items: center;
  color: #777 !important;
}

.breadcrumb-custom li:not(:last-child)::after {
  content: ">";
  margin: 0 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: bold;
}

.breadcrumb-custom li a {
  color: #0077b6 !important;
  text-decoration: none;
}

.breadcrumb-custom li.active {
  color: #1a0033 !important;
  font-weight: 700;
}

/* site-breadcrumb overrides for unified header */
.page-header-unified site-breadcrumb {
  display: inline-block;
  margin-top: 10px;
}

/* 6. Utility Classes */
.display-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.text-center { text-align: center !important; }
.mb-20 { margin-bottom: 20px !important; }
.mt-20 { margin-top: 20px !important; }

/* 7. Policy Page Styles */
.ct-policy-container {
  padding: 80px 0;
  background: #fff;
  min-height: 60vh;
}

.ct-policy-container h1 {
  color: #0077b6;
  margin-bottom: 30px;
  font-weight: 800;
  text-align: center;
}

.ct-policy-container h2 {
  font-size: 24px;
  color: #1a0033;
  margin-top: 40px;
  margin-bottom: 20px;
}

.ct-policy-container p,
.ct-policy-container li {
  line-height: 1.8;
  color: #555;
  font-size: 16px;
}

.ct-policy-container ul {
  padding-right: 25px;
  margin-bottom: 20px;
}

[dir="ltr"].ct-policy-container h2 {
  text-align: left;
}
[dir="ltr"].ct-policy-container ul {
  padding-left: 25px;
  padding-right: 0;
}

/* 8. Blog Post Styles */
.post-content {
  padding: 80px 0;
  background: #fff;
  width: 100%;
}

.post-content h1 {
  color: #0077b6;
  font-weight: 800;
  margin-bottom: 30px;
  line-height: 1.4;
}

.post-content h2 {
  font-size: 22px;
  color: #1a0033;
  margin-top: 40px;
  margin-bottom: 20px;
}

.post-content p {
  line-height: 1.8;
  color: #444;
  font-size: 16px;
  margin-bottom: 25px;
}

.post-content img {
  border-radius: 20px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.sidebar-card {
  background: #fdfdfd;
  padding: 30px;
  border-radius: 20px;
  border: 1px solid #eee;
  margin-top: 40px;
}

.post-content ul, .post-content ol {
  padding-right: 2px;
  margin-bottom: 10px;
}

.post-content li {
  line-height: 2;
  color: #444;
  font-size: 17px;
  margin-bottom: 10px;
}

/* --- Metadata Design (Desktop & Mobile) --- */
.ct-modern-meta {
  display: flex;
  align-items: center;
  margin-bottom: 25px !important;
  font-family: system-ui, -apple-system, sans-serif !important;
}

/* Mobile: Two-column layout with separator */
@media (max-width: 768px) {
  .ct-modern-meta {
    flex-direction: row !important;
    justify-content: space-around;
    background: #f8faff;
    border: 1px solid #f0f0f0;
    padding: 15px 5px !important;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  }
  .meta-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .meta-label {
    font-size: 10px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }
  .meta-value {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    color: #444;
  }
  .meta-dm { font-size: 15px; line-height: 1.2; }
  .meta-y { font-size: 11px; opacity: 0.5; }
  .meta-sep {
    width: 1px;
    height: 35px;
    background: #e2e8f0;
    display: block !important;
  }
}

/* Desktop: Clean single row without box */
@media (min-width: 769px) {
  .ct-modern-meta {
    gap: 25px;
    background: transparent;
    border: none;
    padding: 0 !important;
    color: #888;
  }
  .meta-col {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .meta-label {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .meta-label i { font-size: 14px; color: #94a3b8; }
  .meta-value {
    display: flex;
    gap: 5px;
    color: #64748b;
    font-weight: 500;
    font-size: 13px;
  }
  .meta-sep {
    width: 1px;
    height: 15px;
    background: #e2e8f0;
  }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .container {
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin: 0 !important;
  }
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .col-md-offset-2, .col-md-8 {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    margin-left: 0 !important;
  }

  .post-content {
    padding-top: 90px;
    padding-bottom: 40px;
  }

  /* Breadcrumb Mobile */
  site-breadcrumb {
    margin-bottom: 12px !important;
    padding: 0 !important;
  }
  .ct-breadcrumb-list {
    font-size: 10.5px !important;
    color: #999 !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ct-breadcrumb-list::-webkit-scrollbar { display: none; }
  .ct-breadcrumb-item span, .ct-breadcrumb-item a { white-space: nowrap; }

  /* Title Mobile */
  .post-content h1 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 15px;
    font-weight: 800;
    color: #0d001a;
    text-align: right !important;
    display: block;
    width: 100%;
  }

  /* Metadata Mobile Overrides */
  .ct-modern-meta {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    gap: 5px !important;
    padding: 12px 5px !important;
    text-align: center;
    background: #f8faff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  }
  .meta-col {
    flex: 1 !important;
    display: flex;
    flex-direction: column !important;
    gap: 2px !important;
    width: auto !important;
  }
  .meta-label {
    font-size: 9px !important;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
  }
  .meta-value {
    display: flex;
    flex-direction: row !important;
    justify-content: center;
    gap: 4px !important;
    align-items: baseline;
  }
  .meta-dm { font-size: 13.5px !important; line-height: 1.2; font-weight: 700; color: #444; }
  .meta-y { font-size: 11px !important; opacity: 0.5; font-weight: 600; }
  .meta-sep {
    width: 1px !important;
    height: 30px !important;
    background: #e2e8f0 !important;
    display: block !important;
    margin: 0 !important;
  }

  .post-content p {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
    text-align: justify;
  }
  .post-content h2 {
    font-size: 18px;
    margin-top: 30px;
    color: #1a0033;
    border-right: 4px solid #0077b6;
    padding-right: 10px;
  }
}

/* 9. Related Tools Section */
.related-tools-section {
    padding: 60px 0;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    margin-top: 50px;
}
.related-tools-section h2 {
    font-weight: 800;
    color: #006b98;
    text-align: center;
    margin-bottom: 40px;
}
.mini-tool-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: 0.3s;
    border: 1px solid #eee;
    height: 100%;
    display: block;
    text-decoration: none !important;
    color: inherit;
}
.mini-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: #006b98;
}
.mini-tool-card i {
    font-size: 30px;
    color: #006b98;
    margin-bottom: 15px;
}
.mini-tool-card h4 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #333;
}
.mini-tool-card p {
    font-size: 12px;
    color: #777;
    margin: 0;
    line-height: 1.5;
}

/* 10. PWA Install Prompt - Consolidated & Responsive */
.pwa-prompt-container {
    position: fixed;
    bottom: 25px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999999;
    display: none;
    justify-content: center;
    padding: 0 15px;
    direction: rtl;
    pointer-events: none;
}

.pwa-prompt-container.is-visible {
    display: flex;
    pointer-events: auto;
    animation: slideUpPWA 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideUpPWA {
    from { transform: translateY(120%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pwa-prompt-content {
    background: #0d001a !important;
    border: 2px solid #0077b6 !important;
    border-radius: 20px;
    padding: 15px 20px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.8);
    position: relative;
}

.pwa-prompt-body {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    text-align: right;
}

.pwa-prompt-icon {
    width: 50px !important;
    height: 50px !important;
    flex-shrink: 0;
    background: #000;
    border-radius: 12px;
    padding: 5px;
    border: 1px solid rgba(0, 119, 182, 0.3);
}

.pwa-prompt-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pwa-prompt-text {
    flex-grow: 1;
}

.pwa-prompt-text h3 {
    margin: 0 !important;
    font-size: 16px !important;
    color: #fff !important;
    font-weight: 800 !important;
}

.pwa-prompt-text p {
    margin: 4px 0 0 !important;
    font-size: 12px !important;
    color: #aaa !important;
    line-height: 1.4 !important;
}

.pwa-install-button {
    background: linear-gradient(135deg, #0077b6 0%, #00adef 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 22px !important;
    border-radius: 30px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 119, 182, 0.3);
    transition: 0.3s;
}

.pwa-install-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.pwa-prompt-close {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 28px;
    height: 28px;
    background: #fff !important;
    color: #000 !important;
    border-radius: 50% !important;
    border: none !important;
    font-size: 20px !important;
    line-height: 28px !important;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .pwa-prompt-container { bottom: 15px; }
    .pwa-prompt-content { padding: 12px 15px; }
    .pwa-prompt-body { gap: 10px !important; }
    .pwa-prompt-icon { width: 40px !important; height: 40px !important; }
    .pwa-prompt-text h3 { font-size: 14px !important; }
    .pwa-prompt-text p { font-size: 11px !important; }
    .pwa-install-button { padding: 8px 16px !important; font-size: 12px !important; }
}

/* 11. Skeleton Screens & Shimmer Animation */
.skeleton-box {
    display: inline-block;
    height: 1em;
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.skeleton-box::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.05) 20%,
        rgba(255, 255, 255, 0.1) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
    content: '';
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

#preloader-skeleton {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #050505;
    z-index: 999999;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.skeleton-header {
    height: 60px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.skeleton-logo { width: 120px; height: 30px; }
.skeleton-nav { width: 200px; height: 20px; }

.skeleton-hero {
    height: 300px;
    width: 80%;
    margin: 0 auto;
    border-radius: 20px;
}

.skeleton-text-center {
    width: 60%;
    height: 20px;
    margin: 20px auto;
}

.skeleton-btn {
    width: 180px;
    height: 50px;
    margin: 30px auto;
    border-radius: 30px;
}

/* 12. Table of Contents & FAQ Section */
.toc-container { background: #f8faff; border: 1px solid #e2e8f0; padding: 20px; border-radius: 12px; margin: 30px 0; }
.toc-title { font-weight: 700; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; color: #334155; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 8px; }
.toc-list a { color: #0077b6; text-decoration: none; font-size: 15px; transition: color 0.2s; }
.toc-list a:hover { color: #005b8a; text-decoration: underline; }

.faq-section { margin-top: 60px; border-top: 2px solid #eee; padding-top: 40px; }
.faq-item { margin-bottom: 30px; }
.faq-question { font-weight: 700; color: #333; font-size: 18px; margin-bottom: 10px; display: flex; gap: 10px; }
.faq-question i { color: #0077b6; margin-top: 4px; }
.faq-answer { color: #666; line-height: 1.7; padding-right: 28px; }

.summary-box { background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%); color: white; padding: 25px; border-radius: 15px; margin-bottom: 40px; }
.summary-box h3 { color: white; margin-top: 0; font-size: 18px; margin-bottom: 15px; }
.summary-list { padding-right: 20px; margin: 0; }
.summary-list li { color: rgba(255,255,255,0.95) !important; font-size: 15px !important; margin-bottom: 5px !important; }

