/* =========================
   Font Definition
========================= */
@font-face {
    font-family: "jazeera";
    src: url("../fonts/jazeera.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* =========================
   Root Variables
========================= */
:root {
    /* Font */
    --font-main: "jazeera", Tahoma, Arial, sans-serif;
    --font-size-base: 15px;

    /* Blue */
    --blue-main: #0d6efd;
    --blue-dark: #084298;
    --blue-light: #e7f1ff;

    /* Orange Accent */
    --orange-main: #fd7e14;
    --orange-dark: #dc6502;

    /* Neutral */
    --white-main: #ffffff;
    --gray-dark: #343a40;
    --gray-soft: #6c757d;
    --gray-light: #f8f9fa;
}

/* =========================
   Global
========================= */
html {
    font-size: var(--font-size-base);
}

body {
    color: var(--gray-dark);
    background: var(--gray-light);
    padding-bottom: 0; /* كان للفوتر الثابت */
    font-family: var(--font-main);
    line-height: 1.6;

    /* Sticky footer */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1; /* يدفع الفوتر لأسفل الشاشة عند قلة المحتوى */
}

/* =========================
   Typography
========================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 700;
}

p, span, label, a, button, input, textarea, select {
    font-family: var(--font-main);
    font-size: 1rem;
}

/* =========================
   Navbar
========================= */
.navbar {
    background: linear-gradient(135deg, var(--blue-main), var(--blue-dark));
}

.navbar-brand {
    font-weight: 800;
    color: #fff !important;
}

.nav-bold .nav-link {
    font-weight: 700;
    font-size: 1rem;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-bold .nav-link:hover {
    color: var(--orange-main) !important;
}

.navbar-brand img {
    max-width: 80px;
}

@media (max-width: 576px) {
    .navbar-brand img {
        max-width: 55px;
    }
}

/* =========================
   Hero Section
========================= */
.hero-section {
    background: linear-gradient(135deg, var(--blue-main), var(--blue-dark));
    padding: 30px 0;
    color: #fff;
}

/* =========================
   Stats / Services
========================= */
.stat-box,
.service-card {
    background: var(--white-main);
    padding: 30px;
    border-radius: 20px;
}

.stat-box i,
.service-card i {
    font-size: 2.2rem;
    color: var(--blue-main);
    margin-bottom: 15px;
}

.service-card {
    text-align: center;
    transition: 0.3s;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(13,110,253,0.15);
}

.service-card a {
    display: inline-block;
    margin-top: 10px;
    color: var(--orange-main);
    font-weight: 700;
    text-decoration: none;
}
.stat-box {
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

/* =========================
   Buttons
========================= */
.btn {
    font-family: var(--font-main);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--blue-main);
    border-color: var(--blue-main);
}

.btn-primary:hover {
    background-color: var(--blue-dark);
    border-color: var(--blue-dark);
}

.btn-accent {
    background-color: var(--orange-main);
    border-color: var(--orange-main);
    color: #fff;
}

.btn-accent:hover {
    background-color: var(--orange-dark);
    border-color: var(--orange-dark);
}

/* =========================
   Carousel
========================= */
.carousel-item {
    transition: transform 0.8s ease-in-out;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--orange-main);
    border-radius: 50%;
    padding: 15px;
}

/* =========================
   Scroll Buttons
========================= */
.scroll-btn {
    position: fixed;
    right: 20px;
    z-index: 999;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--blue-main);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-btn:hover {
    background: var(--orange-main);
}

.scroll-top {
    bottom: 120px;
}

.scroll-bottom {
    bottom: 60px;
}

.scroll-btn.show {
    opacity: 1;
    visibility: visible;
}

/* =========================
   Social Footer
========================= */
.social-footer {
    font-size: 1.5rem;
}

.social-icon {
    margin: 0 6px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.social-icon:hover {
    transform: scale(1.15);
}

.social-icon.x { color: #000; }
.social-icon.instagram { color: #E1306C; }
.social-icon.snapchat { color: var(--orange-main); }
.social-icon.youtube { color: #FF0000; }
.social-icon.tiktok { color: #000; }

/* =========================
   Auth Pages (Login / OTP)
========================= */
.auth-page {
  font-family: var(--font-main, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
}

/* ✅ Screen-fit wrapper (mobile friendly) */
.auth-wrapper {
  /* Fix mobile browser bars (iOS/Android) */
  min-height: 75dvh;
  min-height: 75vh; /* fallback */

  display: flex;
  align-items: center;
  justify-content: center;

  /* Safe area for notches + comfortable padding */
  padding: calc(env(safe-area-inset-top, 0px) + 16px)
           calc(env(safe-area-inset-right, 0px) + 16px)
           calc(env(safe-area-inset-bottom, 0px) + 16px)
           calc(env(safe-area-inset-left, 0px) + 16px);

  background: linear-gradient(135deg, var(--blue-main), var(--blue-dark));
  overflow: hidden;
}

/* ✅ Card fits inside screen */
.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 16px;

  /* Never exceed viewport height */
  max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: auto; /* if content is tall, scroll inside the card */
  -webkit-overflow-scrolling: touch;
}

/* ✅ Google button enhancement (keeps your original look) */
.btn-google {
  background: #fff;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;

  border-radius: 12px;
  padding: 12px 14px;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.btn-google:hover {
  transform: translateY(-1px);
  border-color: #cfcfcf;
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
}

.btn-google:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

.btn-google:focus,
.btn-google:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.20);
}

/* ✅ Google icon */
.google-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  background: url("https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg") no-repeat center;
  background-size: contain;
}

/* ✅ Extra: better fit on small screens */
@media (max-height: 720px), (max-width: 420px) {
  .auth-wrapper {
    align-items: flex-start; /* prevents top clipping */
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  }

  .auth-card {
    max-width: 100%;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 14px;
  }
}


/* =========================
   packages.php Custom Styles
========================= */

.package-card {
    transition: all .2s ease-in-out;
}

.package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}

/* Best deals (أقل سعر لكل دولة) */
.best-deal-logo{
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    padding: 6px;
    flex: 0 0 auto;
}

.best-deal-badge{
    font-weight: 700;
    padding: .55rem .7rem;
    border: 1px solid rgba(0,0,0,.06);
}

.country-section {
    display: none;
}

/* عناوين الكروت */
.card-title {
    text-align: center;
    direction: ltr;
}

/* أيقونات القائمة */
ul li {
    padding-right: 0;
}

/* محاذاة السعر والزر */
.price-row {
    flex-direction: row-reverse;
}

/* تحسين Select */
.form-select {
    background-position: left 0.75rem center;
}

.operator-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #eee;
    padding: 4px;
    cursor: pointer;
    transition: transform .2s ease;
}

.operator-logo:hover {
    transform: scale(1.1);
}

.operator-logo-lg {
    width: 80px;
    height: 64px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    padding: 6px;
    cursor: pointer;
    transition: transform .2s ease;
}

.operator-logo-lg:hover {
    transform: scale(1.05);
}

.install-box {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.9;
    direction: ltr;
    text-align: left;
}

.install-box p {
    margin-bottom: 0.75rem;
}

.install-box ul {
    padding-left: 1.2rem;
}

.install-box a {
    display: none !important;
    /* إخفاء أي رابط */
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, .5);
    border-radius: 50%;
    background-size: 60% 60%;
}

/* =========================
   Lowest Package Highlight
========================= */
.operator-logo-zoom {
    width: 48px;
    height: 48px;
    object-fit: contain;
    cursor: pointer;
    transition: transform .2s ease;
}

.operator-logo-zoom:hover {
    transform: scale(1.2);
}

/* =========================
   Packages Price Sort
========================= */
.price-sort-static {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    direction: ltr;
    text-align: left;
    margin-top: -6px;
    margin-bottom: 18px;
}

.price-sort-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
    border: 1px solid rgba(108, 117, 125, 0.25);
    border-radius: 999px;
    padding: 6px 10px;
    background: #fff;
}

.price-sort-label {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d4af37;
    line-height: 1;
    margin-inline-end: 2px;
}

.price-sort-label i {
    font-size: 15px;
    line-height: 1;
}

.price-sort-static .price-sort-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--gray-soft);
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    opacity: 0.75;
}

.price-sort-static .price-sort-btn i {
    font-size: 18px;
    line-height: 1;
}

.price-sort-static .price-sort-btn:hover {
    background: rgba(108, 117, 125, 0.12);
    color: var(--gray-soft);
    opacity: 1;
}

.price-sort-static .price-sort-btn.active {
    background: var(--gray-soft);
    color: #fff;
    opacity: 1;
}

@media (max-width: 576px) {
    .price-sort-static {
        margin-top: -2px;
        margin-bottom: 16px;
    }

    .price-sort-box {
        padding: 5px 8px;
        gap: 4px;
    }

    .price-sort-label {
        width: 26px;
        height: 26px;
    }

    .price-sort-label i {
        font-size: 14px;
    }

    .price-sort-static .price-sort-btn {
        width: 30px;
        height: 30px;
    }

    .price-sort-static .price-sort-btn i {
        font-size: 16px;
    }
}
