/* =============================================
   ALGO PORTFOLIO - PRICING PLANS
   ملف CSS منفصل - يُرفع في Elementor عبر:
   Custom Code / Additional CSS أو داخل قسم "Custom CSS" الخاص بالصفحة
   أو يُرفع كملف ويُستدعى بـ <link> في HTML Widget
============================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }

:root {
  --primary: #00BCD4;
  --primary-dark: #0097A7;
  --primary-light: #4DD0E1;
  --accent: #8BC34A;
  --success: #4CAF50;
  --dark: #FFFFFF;
  --dark-card: #F5F5F5;
  --text: #333333;
  --text-muted: #666666;
  --border: #E0E0E0;
  --card-bg: #FFFFFF;
  --excluded-bg: #9E9E9E;
  --link-hover: #1e88e5;
}

body { font-family: 'DM Sans', sans-serif; background: #F8FCFC; color: var(--text); margin: 0; overflow-x: clip; }
.algo-pricing-container { width: min(1240px, 100%); margin: 0 auto; padding-left: 20px; padding-right: 20px; box-sizing: border-box; }
.header { text-align: center; margin-bottom: 60px; margin-top: clamp(40px, 6vw, 100px); animation: fadeInDown 0.8s ease; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
.header h1 { font-size: 48px; font-weight: 700; margin-bottom: 16px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.toggle-container { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 60px; animation: fadeIn 1s ease 0.3s backwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.toggle-label { font-size: 24px; font-weight: 500; color: var(--text-muted); transition: all 0.3s ease; }
.cf-turnstile{ display:flex !important; justify-content:center !important; width:100%; }
.toggle-label.active { color: var(--primary); font-weight: 700; }
.toggle-savings-badge { display: inline-flex; align-items: center; padding: 6px 14px; background: rgba(156,204,101,0.15); color: #689F38; border-radius: 20px; font-size: 13px; font-weight: 800; letter-spacing: 0.3px; border: 1px solid rgba(156,204,101,0.3); box-shadow: 0 2px 8px rgba(156,204,101,0.1); animation: pulse 2s ease-in-out infinite; text-transform: uppercase; }
@keyframes pulse { 0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(156,204,101,0.1); } 50% { transform: scale(1.03); box-shadow: 0 3px 10px rgba(156,204,101,0.15); } }
.toggle-switch { position: relative; width: 60px; height: 32px; background: #FFFFFF; border-radius: 16px; cursor: pointer; transition: all 0.3s ease; border: 2px solid var(--border); }
.toggle-switch:hover { border-color: var(--primary); }
.toggle-slider { position: absolute; width: 24px; height: 24px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: 50%; top: 2px; left: 2px; transition: all 0.3s cubic-bezier(0.68,-0.55,0.265,1.55); box-shadow: 0 2px 8px rgba(0,188,212,0.4); }
.toggle-switch.yearly .toggle-slider { left: 30px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; animation: fadeInUp 1s ease 0.5s backwards; align-items: start; position: relative; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.pricing-card { background: var(--card-bg); border-radius: 24px; padding: 40px; border: 2px solid var(--border); position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275); box-shadow: 0 4px 20px rgba(0,0,0,0.08); text-align: center; height: auto; }
.pricing-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%); transform: scaleX(0); transition: transform 0.4s ease; }
.pricing-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: 0 20px 60px rgba(0,188,212,0.15); }
.pricing-card:hover::before { transform: scaleX(1); }
.pricing-card.featured { background: linear-gradient(135deg, rgba(0,188,212,0.05) 0%, rgba(77,208,225,0.05) 100%); border-color: var(--primary); transform: scale(1.03); box-shadow: 0 8px 30px rgba(0,188,212,0.2); }
.pricing-card.featured::before { transform: scaleX(1); }
.ribbon { position: absolute; top: 18px; left: -52px; width: 180px; display: flex; justify-content: center; text-align: center; padding: 8px 0; font-size: 12px; font-weight: 800; letter-spacing: 0.6px; color: #fff; transform: rotate(-45deg); box-shadow: 0 8px 20px rgba(0,0,0,0.12); z-index: 5; text-transform: uppercase; border-radius: 6px; }
html[lang="ar"] .ribbon { font-size: clamp(11px,2.6vw,14px); letter-spacing: 0; text-transform: none; display: flex; align-items: center; justify-content: center; text-align: center; width: clamp(150px,22vw,190px); padding: 8px 6px; line-height: 1.2; white-space: normal; word-break: break-word; overflow: hidden; }
html[lang="ar"] .ribbon span { display: block; text-align: center; line-height: 1.2; }
@media (max-width: 768px) { html[lang="ar"] .ribbon { font-size: clamp(10px,3vw,12px); padding: 6px 4px; } }
.ribbon.green { background: linear-gradient(135deg, var(--accent) 0%, #7CB342 100%); }
.ribbon.primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.ribbon.trial { top: 28px; left: -52px; width: 180px; padding: 8px 0; background: linear-gradient(90deg,#EDF2F7 0%,#FFFFFF 40%,#FFFFFF 60%,#EDF2F7 100%); color: #689F38; box-shadow: inset 0 0 0 1px rgba(148,163,184,.28), 0 6px 14px rgba(15,23,42,.06); font-size: 13px; font-weight: 800; line-height: 1; white-space: nowrap; letter-spacing: .45px; overflow: hidden; }
.plan-name { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.plan-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 30px; }
.price-container { margin-bottom: 30px; min-height: 80px; padding-inline: 6px; }
.price-row { display: inline-flex; align-items: baseline; justify-content: center; gap: 6px; max-width: 100%; white-space: nowrap; }
.price { font-family: 'Space Mono', monospace; font-weight: 700; line-height: 1; display: inline-block; font-size: clamp(34px,9vw,56px); max-width: 100%; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.price-period { font-size: clamp(12px,3.2vw,16px); color: var(--text-muted); font-weight: 400; font-family: 'DM Sans', sans-serif; white-space: nowrap; position: relative; top: -0.35em; }
@media (max-width: 380px) { .pricing-card { padding: 28px; } .price { font-size: clamp(30px,10vw,44px); } .price-period { font-size: 12px; top: -0.3em; } }
.savings-badge { padding: 4px 12px; background: rgba(156,204,101,0.15); color: #689F38; border: 1px solid rgba(156,204,101,0.3); border-radius: 12px; font-size: 11px; font-weight: 700; margin: 12px auto 0; display: block; width: fit-content; opacity: 0; transition: opacity 0.3s ease; }
.savings-badge.show { opacity: 1; }
.price-note { font-size: 12px; color: var(--text-muted); margin-top: 12px; }
.features { list-style: none; padding: 0; margin: 0 auto 30px; display: inline-block; text-align: left; }
.feature-item { display: grid; grid-template-columns: 20px minmax(0,1fr); column-gap: 12px; align-items: start; justify-items: start; margin-bottom: 16px; font-size: clamp(12px,1.05vw,14.5px); line-height: 1.35; overflow: visible; overflow-wrap: anywhere; word-break: normal; opacity: 0; animation: slideIn 0.5s ease forwards; }
.feature-item:nth-child(1) { animation-delay: 0.1s; } .feature-item:nth-child(2) { animation-delay: 0.2s; } .feature-item:nth-child(3) { animation-delay: 0.3s; } .feature-item:nth-child(4) { animation-delay: 0.4s; } .feature-item:nth-child(5) { animation-delay: 0.5s; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.feature-item.included { color: #00ACC1; -webkit-text-fill-color: #00ACC1; font-weight: 400; }
.feature-item.included::before { content: '✓'; width: 20px; height: 20px; background: transparent; border: 2px solid #00ACC1; color: #00ACC1; border-radius: 50%; display: grid; place-items: center; font-weight: 1000; font-size: 10px; grid-column: 1; grid-row: 1; -webkit-text-fill-color: #00ACC1; }
.feature-item.excluded::before { content: '✕'; width: 20px; height: 20px; background: transparent; border: 2px solid #9E9E9E; color: #9E9E9E; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 10px; grid-column: 1; grid-row: 1; -webkit-text-fill-color: #9E9E9E; }
.feature-item.excluded { color: #9E9E9E; -webkit-text-fill-color: #9E9E9E; text-decoration: none; }
.algo-pricing .divider { margin: 14px 0 18px !important; }
.checkbox-group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.checkbox-option { display: flex; align-items: center; gap: 12px; padding: 14px; background: #FFFFFF; border: 2px solid var(--border); border-radius: 8px; cursor: pointer; transition: all 0.3s ease; }
.checkbox-option:hover { border-color: var(--primary); background: rgba(0,188,212,0.05); }
.checkbox-option input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; accent-color: var(--primary); }
.checkbox-option.checked { border-color: var(--primary); background: rgba(0,188,212,0.05); }
.checkbox-text { font-size: 14px; font-weight: 500; flex: 1; }
.form-select { width: 100%; padding: 12px 16px; background: #FFFFFF; border: 2px solid var(--border); border-radius: 8px; color: var(--text); font-size: 14px; transition: all 0.3s ease; font-family: 'DM Sans', sans-serif; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666666' d='M6 9L1 4h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; min-height: 44px; line-height: 1.35; padding-top: 10px; padding-bottom: 10px; }
.form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,188,212,0.1); }
.btn { width: 100%; padding: 16px 32px; border-radius: 12px; font-size: clamp(14px,1.1vw,16px); font-weight: 700; cursor: pointer; border: none; transition: all 0.3s cubic-bezier(0.175,0.885,0.32,1.275); position: relative; overflow: hidden; }
.btn::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255,255,255,0.2); transform: translate(-50%,-50%); transition: width 0.6s, height 0.6s; }
.btn:hover::before { width: 300px; height: 300px; }
.btn span { position: relative; z-index: 1; }
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; box-shadow: 0 10px 30px rgba(0,188,212,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 40px rgba(0,188,212,0.4); }
.btn-secondary { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { border-color: var(--primary-dark); color: var(--primary-dark); background: rgba(0,188,212,0.05); transform: translateY(-2px); }
.pricing-card[data-plan="basic"] .btn { background: linear-gradient(135deg,#8BC34A 0%,#689F38 100%) !important; border: 2px solid #689F38 !important; color: #fff !important; box-shadow: 0 10px 24px rgba(104,159,56,0.28); }
.pricing-card[data-plan="basic"] .btn span { color: #fff !important; }
.pricing-card[data-plan="basic"] .btn:hover { background: linear-gradient(135deg,#7CB342 0%,#558B2F 100%) !important; border-color: #558B2F !important; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(85,139,47,0.35); }
.error-message { background: #FEE; border: 2px solid #F44; border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; color: #C00; font-size: 14px; display: none; animation: shake 0.5s; }
.error-message.show { display: block; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.form-section { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--border); text-align: left; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: clamp(12px,0.95vw,14px); color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.form-input { width: 100%; padding: 12px 16px; background: #FFFFFF; border: 2px solid var(--border); border-radius: 8px; color: var(--text); font-size: clamp(12px,0.95vw,14px); transition: all 0.3s ease; font-family: 'DM Sans', sans-serif; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,188,212,0.1); }
.radio-group { display: flex; gap: 16px; margin-bottom: 20px; }
.radio-option { flex: 1; position: relative; }
.radio-input { position: absolute; opacity: 0; cursor: pointer; }
.radio-label { display: flex; flex-direction: column; align-items: center; padding: 20px; background: #FFFFFF; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; transition: all 0.3s ease; }
.radio-input:checked + .radio-label { border-color: var(--primary); background: rgba(0,188,212,0.05); }
.radio-label:hover { border-color: var(--primary); }
.radio-icon { font-size: 24px; margin-bottom: 8px; }
.radio-text { font-size: 13px; font-weight: 600; }
.checkbox-wrapper { margin-bottom: 24px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
html[lang="ar"] .checkbox-label { gap: 6px; align-items: flex-start; }
.checkbox-input { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 4px; cursor: pointer; transition: all 0.3s ease; flex-shrink: 0; margin-top: 2px; }
.checkbox-input:checked { background: var(--primary); border-color: var(--primary); }
.legal-link { font-weight: 700; color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s ease, opacity .2s ease; cursor: pointer; }
.legal-link:hover { color: var(--link-hover); }
.legal-link:focus { outline: none; color: var(--link-hover); }
.carousel-nav { display: none; }
.carousel-dots-container { display: none; }
.plan-indicator { display: none; }
.icons { display: flex; gap: 6px; justify-content: center; }
.icons span { font-size: 18px; }
.alert-vertical { display: flex !important; flex-direction: column !important; align-items: center; gap: 4px; }
.alert-vertical .icon { font-size: 20px; }
.plan-subtitle { font-size: clamp(12px,1.05vw,14.5px); line-height: 1.35; text-overflow: clip; overflow: visible; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.algo-pricing { font-size: clamp(14px,0.9vw,16px); background: #f8fcfc; }
.algo-pricing h1, .algo-pricing .header h2 { font-size: clamp(28px,3vw,48px); font-weight: 700; background: linear-gradient(135deg,#00BCD4 0%,#0097A7 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.algo-pricing .plan-name { font-size: clamp(24px,2vw,34px); }
.pricing-card[data-plan="basic"] .plan-subtitle { font-size: clamp(14px,1.2vw,16px); font-weight: 700; }
.pricing-card[data-plan="advanced"] .plan-subtitle span:last-child, .pricing-card[data-plan="pro"] .plan-subtitle span:last-child { font-size: clamp(14px,1.4vw,16px); font-weight: 700; }
.algo-pricing .toggle-container { display: flex; align-items: center; justify-content: center; gap: clamp(10px,2.2vw,20px); flex-wrap: wrap; }
.algo-pricing .toggle-label { font-size: clamp(14px,2.8vw,24px); }
.algo-pricing .toggle-savings-badge { font-size: clamp(10px,2.4vw,13px); padding: clamp(4px,1vw,6px) clamp(10px,2.6vw,14px); border-radius: 999px; white-space: nowrap; flex: 0 0 auto; margin-left: 0; }
html[lang="ar"] .algo-pricing .price { font-size: clamp(28px,7vw,46px); }
html[lang="ar"] .algo-pricing .price-period { font-size: clamp(11px,2.8vw,14px); }
html[lang="ar"] .pricing-card, html[lang="ar"] .feature-item, html[lang="ar"] .features, html[lang="ar"] .form-label, html[lang="ar"] .form-input, html[lang="ar"] .form-select, html[lang="ar"] .checkbox-text, html[lang="ar"] .radio-text, html[lang="ar"] .price-note { text-align: right !important; direction: rtl !important; }
html[lang="ar"] .price-note { text-align: center !important; direction: ltr !important; }
[data-tooltip] a { text-decoration: underline !important; text-decoration-style: dotted !important; text-underline-offset: 3px; }
[data-tooltip] a:hover { color: #00ACC1 !important; -webkit-text-fill-color: #00ACC1 !important; }
body.is-arabic ul.features { display: block !important; width: 100% !important; text-align: right !important; margin-bottom: 16px !important; }
body.is-arabic .feature-item { display: flex !important; flex-direction: row-reverse !important; align-items: center !important; gap: 10px !important; width: 100% !important; justify-content: flex-end !important; }
body.is-arabic .feature-item::before { flex-shrink: 0 !important; order: 2 !important; }
.mobile-break { display: none; }

/* =============================================
   ALERT PILLS — 3-OPTION SELECTOR
============================================= */
.alert-pills { display: flex; gap: 8px; flex-wrap: nowrap; margin-bottom: 20px; }
.alert-pill { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px; border-radius: 10px; border: 1.5px solid var(--border); background: #fff; cursor: pointer; transition: border-color .2s, background .2s; position: relative; -webkit-user-select: none; user-select: none; }
.alert-pill input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.alert-pill svg { width: 20px; height: 20px; flex-shrink: 0; transition: stroke .2s; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alert-pill[data-val="email"] svg   { stroke: #EA4335; }
.alert-pill[data-val="telegram"] svg { stroke: #229ED9; }
.alert-pill[data-val="whatsapp"] svg { stroke: #25D366; }
.alert-pill .pill-lbl { font-size: 11px; font-weight: 600; color: #9E9E9E; white-space: nowrap; line-height: 1.2; transition: color .2s; }
.alert-pill.selected { border-color: var(--primary); background: rgba(0,188,212,0.06); }
.alert-pill.selected .pill-lbl { color: var(--primary-dark); }

@media (max-width: 768px) {
  .header h1 { font-size: 36px; }
  .toggle-container { flex-wrap: wrap; gap: 15px; }
  .toggle-label { font-size: 20px; }
  .toggle-savings-badge { font-size: 11px; padding: 5px 12px; }
  .pricing-grid { display: block; position: relative; padding: 0 12px; max-width: 100%; box-sizing: border-box; }
  .pricing-card { -webkit-user-select: none; user-select: none; display: none; width: 100%; margin: 0; }
  .pricing-card.active { display: block; animation: slideInMobile 0.4s ease; }
  @keyframes slideInMobile { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
  .pricing-card.featured { transform: scale(1); }
  .carousel-nav { display: flex !important; justify-content: space-between; align-items: center; position: absolute; top: 50%; transform: translateY(-50%); left: 0; right: 0; padding: 0; pointer-events: none; z-index: 100; }
  .carousel-btn { background: var(--primary); border: none; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease; box-shadow: 0 1px 6px rgba(0,188,212,0.2); color: white; font-size: 10px; font-weight: bold; flex-shrink: 0; pointer-events: all; user-select: none; }
  #prevBtn { position: relative; left: 12px; transform: translateX(-50%); }
  #nextBtn { position: relative; right: 12px; transform: translateX(50%); }
  #prevBtn:hover { background: var(--primary-dark); transform: translateX(-50%) scale(1.2); box-shadow: 0 2px 8px rgba(0,188,212,0.4); }
  #nextBtn:hover { background: var(--primary-dark); transform: translateX(50%) scale(1.2); box-shadow: 0 2px 8px rgba(0,188,212,0.4); }
  .carousel-btn:disabled { opacity: 0.3; cursor: not-allowed; }
  #prevBtn:active { transform: translateX(-50%) scale(0.9); }
  #nextBtn:active { transform: translateX(50%) scale(0.9); }
  .carousel-dots-container { display: flex !important; justify-content: center; margin-top: 20px; gap: 8px; }
  .carousel-dots { display: flex; gap: 8px; justify-content: center; }
  .carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); cursor: pointer; transition: all 0.3s ease; }
  .carousel-dot.active { background: var(--primary); width: 20px; border-radius: 3px; }
  .plan-indicator { display: block !important; text-align: center; margin-top: 15px; font-size: 13px; color: var(--text-muted); font-weight: 600; }
  .mobile-break { display: block; }
  .price-row { display: flex !important; flex-direction: row !important; direction: ltr !important; flex-wrap: nowrap !important; justify-content: center; align-items: baseline; }
  .price { order: 1; }
  .price-period { order: 2; margin-left: 6px; }
  @media (max-width: 480px) { .algo-pricing .yearly-label, .algo-pricing .toggle-savings-badge { order: 3; } .algo-pricing .toggle-savings-badge { margin-left: -6px; } }
}
@media (min-width: 480px) and (max-width: 768px) {
  .pricing-grid { padding: 0 14px; }
  #prevBtn { left: 14px; } #nextBtn { right: 14px; }
  .carousel-btn { width: 20px; height: 20px; font-size: 11px; }
  .carousel-dot { width: 7px; height: 7px; }
  .carousel-dot.active { width: 22px; border-radius: 3.5px; }
}
@media (min-width: 769px) {
  .algo-pricing .pricing-grid { grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); padding: 0; }
  .algo-pricing .pricing-card { display: block !important; }
}
@media (max-height: 800px) and (min-width: 769px) {
  .algo-pricing .pricing-card { padding: 22px; }
  .algo-pricing .header { margin-bottom: 26px; }
  .algo-pricing .toggle-container { margin-bottom: 26px; }
  .algo-pricing .price { font-size: 44px; }
  .algo-pricing .plan-subtitle { margin-bottom: 18px; }
  .algo-pricing .divider { margin: 18px 0; }
}