:root {
    --mobile-pad: 16px;
}

/* ================================================================
   TABLET  —  max-width: 1200px
   ================================================================ */
@media (max-width: 1200px) {

    .navbar-menu {
        padding-right: 20px;
        gap: 10px;
    }

    .servers-cards-container {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 30px;
        padding: 20px 15px;
    }

    .server-card,
    .server-card--scorpion,
    .server-card--lion {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        width: 280px !important;
        height: 290px !important;
    }

    .posts-section-title__text,
    .servers-section-title__text {
        font-size: 42px !important;
        line-height: 1.2 !important;
    }

    .content-section-title__text {
        font-size: 42px !important;
        line-height: 1.3 !important;
    }
}



@media (max-width: 768px) {

    /* ── prevent horizontal scroll ── */
    body,
    html {
        overflow-x: hidden;
        width: 100%;
    }

    /* ════════════════════════════════
     NAVBAR
  ════════════════════════════════ */
    .navbar {
        height: auto;
        min-height: 50px;
        justify-content: center;
        padding: 6px 0;
    }

    #login-form {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 9999;
    }

    .navbar-menu {
        padding: 4px 10px;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar-item {
        height: 34px;
        padding: 0 10px;
    }

    .navbar-border-left,
    .navbar-border-right {
        height: 34px;
    }

    .navbar-item-text {
        font-size: 11px;
    }

    /* ════════════════════════════════
     HERO BACKGROUND
  ════════════════════════════════ */
    .hero-background {
        height: 380px !important;
        justify-content: center;
    }

    .hero-bg-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero-mask {
        width: 100%;
        height: auto;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        pointer-events: all;
    }

    .hero-mask-gradient {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg,
                rgba(94, 74, 16, 0.9) 0%,
                rgba(30, 20, 5, 0.85) 100%) !important;
    }

    .hero-mask {
        background: none !important;
    }

    .hero-mask {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100vh;
    }

    .page-wrapper {
        padding: 0 !important;
    }

    .mask-Img {
        display: none;
    }

    .page-wrapper {
        width: 350px !important;
        height: auto !important;
        position: relative !important;
        display: flex !important;
        justify-content: center;
        padding: 20px var(--mobile-pad) 30px;
        box-sizing: border-box;
    }

    .bg-image-bottom {
        display: none !important;
    }

    .hero-images-container {
        display: none !important;
    }

    .card-wrapper {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 400px !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column;
    }

    .card-inner {
        width: 100% !important;
        position: relative !important;
    }

    .form-panel {
        width: 100% !important;
        padding: 24px 20px 30px !important;
        position: relative !important;
        background: rgba(16, 19, 20, 0.95);
        border-radius: 20px;
        border: 1px solid rgba(255, 215, 0, 0.15);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        box-sizing: border-box;
        z-index: 10 !important;
        pointer-events: all !important;
    }

    .form-content {
        width: 100% !important;
        align-items: center !important;
    }

    .form-header {
        height: auto !important;
        width: 100% !important;
        margin-bottom: 12px;
    }

    .header-row {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        gap: 8px;
    }

    .form-body {
        width: 100% !important;
        align-items: center !important;
    }

    .inputs-group {
        width: 100% !important;
        align-items: center !important;
    }

    .input-row {
        width: 100% !important;
        align-items: center !important;
    }

    .input-bg {
        width: 100% !important;
        max-width: 320px !important;
        box-sizing: border-box;
        background-image: none !important;
        background-color: #1B1E20 !important;
        border: 1px solid rgba(255, 215, 0, 0.2) !important;
        border-radius: 10px !important;
    }

    .input-field-wrapper {
        width: 100% !important;
        justify-content: center !important;
    }

    .input-field {
        width: 85% !important;
        left: 7% !important;
    }

    .submit-row {
        width: 100% !important;
        align-items: center !important;
    }

    button.submit-btn {
        width: 100% !important;
        max-width: 280px !important;
        font-size: 22px !important;
    }

    .terms-row {
        width: 100% !important;
        max-width: 300px;
        justify-content: center !important;
    }

    .terms-container {
        width: 100% !important;
        max-width: 300px;
        position: relative !important;
    }

    .social-login-row {
        height: auto !important;
        position: relative !important;
        width: 100% !important;
    }

    .social-login-label-wrapper {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        text-align: center;
        margin-bottom: 8px;
    }

    .slider-wrapper {
        height: 380px;
        /* تقليل الارتفاع للموبايل */
        padding: 10px;
    }

    .carousel-item img {
        width: 95%;
        /* يخليها تملى الشاشة */
        height: 260px;
        /* تقليل الارتفاع */
        border-radius: 16px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 44px;
        height: 44px;
    }

    .carousel-control-prev {
        left: 8px;
    }

    .carousel-control-next {
        right: 8px;
    }

    .carousel-control-prev img,
    .carousel-control-next img {
        width: 14px;
        height: 14px;
    }

    .posts-page {
        height: auto !important;
        min-height: unset !important;
        padding-bottom: 50px;
    }

    .posts-section-shadow {
        position: relative !important;
        height: auto !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }

    .posts-section-title {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        text-align: center;
        padding: 30px var(--mobile-pad) 16px;
        box-sizing: border-box;
    }

    .posts-section-title__text {
        font-size: 30px !important;
        line-height: 1.3 !important;
    }

    .posts-content-wrapper {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 var(--mobile-pad);
        box-sizing: border-box;
    }

    .posts-cards-list {
        position: relative !important;
        width: 100% !important;
        left: auto !important;
        top: auto !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        gap: 24px;
        overflow: visible !important;
        padding: 10px 0 20px;
    }

    .post-card,
    .post-card--1,
    .post-card--2 {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 420px;
        height: 480px !important;
        margin: 0 !important;
        flex-shrink: 0;
    }

    .posts-all-news-link {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        margin: 20px auto 0;
        display: block;
    }

    .posts-nav-btn-prev {
        display: none !important;
    }

    /* ════════════════════════════════
     CONTENT SECTION
  ════════════════════════════════ */
    .content-section {
        height: auto !important;
        padding-bottom: 40px;
    }

    .content-wrapper {
        position: relative !important;
        height: auto !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
    }

    .content-bg-image {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        top: 0;
        left: 0;
    }

    .content-section-title {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        text-align: center;
        padding: 30px var(--mobile-pad) 10px;
        box-sizing: border-box;
    }

    .content-section-title__text {
        font-size: 26px !important;
        line-height: 1.4 !important;
    }

    .content-cards-container {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column;
        gap: 36px;
        padding: 10px var(--mobile-pad) 20px;
        box-sizing: border-box;
    }

    /* ── Discovery card ── */
    .content-card__image--discovery {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: 200px !important;
        object-fit: cover;
        border-radius: 20px !important;
        display: block;
    }

    .content-card__title--discovery {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        text-align: right;
        margin-top: 10px;
        display: block;
    }

    .content-card__body--discovery {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        margin-top: 8px;
        display: block;
    }

    .content-card__cta--discovery {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        display: block;
        margin-top: 14px;
        width: 160px;
        margin-right: auto;
    }

    /* ── Story card ── */
    .content-card__image--story {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: 200px !important;
        object-fit: cover;
        border-radius: 20px !important;
        display: block;
    }

    .content-card__title--story {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        text-align: right;
        margin-top: 10px;
        display: block;
    }

    .content-card__body--story {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        margin-top: 8px;
        display: block;
    }

    .content-card__cta--story {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        display: block;
        margin-top: 14px;
        width: 160px;
        margin-right: auto;
    }

    .servers-page {
        height: auto !important;
        padding-bottom: 40px;
    }

    .servers-section-shadow {
        position: relative !important;
        height: auto !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }

    .servers-section-title {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        text-align: center;
        padding: 30px var(--mobile-pad) 16px;
        box-sizing: border-box;
        justify-content: center !important;
    }

    .servers-section-title__text {
        font-size: 30px !important;
        line-height: 1.3 !important;
    }

    .servers-cards-container {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        gap: 24px;
        padding: 10px var(--mobile-pad) 30px;
        box-sizing: border-box;
    }

    .server-card,
    .server-card--scorpion,
    .server-card--lion {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 280px !important;
        height: 290px !important;
        display: block;
    }

    .server-card__bg {
        width: 280px !important;
        height: 280px !important;
        border-radius: 40px !important;
    }

    /* ════════════════════════════════
     FOOTER
  ════════════════════════════════ */
    .footer-bar {
        min-width: unset !important;
        width: 100% !important;
    }

    .footer-inner {
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        padding: 20px var(--mobile-pad);
        gap: 20px;
        position: relative !important;
    }

    .footer-offers,
    .footer-social,
    .footer-copyright {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        gap: 8px;
    }

    .footer-offers__label,
    .footer-social__label,
    .footer-copyright__label,
    .footer-copyright__brand {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: auto !important;
        height: auto !important;
        text-align: center;
    }

    .footer-offers__paypal-logo,
    .footer-offers__vodafone-logo {
        position: relative !important;
        left: auto !important;
        top: auto !important;
    }

    .footer-social {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px !important;
    }

    .footer-social__btn,
    .footer-social__btn--twitter,
    .footer-social__btn--facebook,
    .footer-social__btn--youtube {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        display: inline-block;
    }

    #over_lay {
        align-items: flex-start !important;
        overflow-y: auto !important;
        padding: 20px 0;
    }

    .signup-card {
        width: 92vw !important;
        max-width: 440px !important;
        min-height: auto !important;
        border-radius: 24px !important;
        overflow: visible !important;
        margin: auto;
    }

    .signup-card__inner {
        overflow: visible !important;
    }

    .signup-card__bg-mask {
        border-radius: 24px;
        overflow: hidden;
    }

    .signup-card__form-panel {
        padding: 8px 20px 36px !important;
    }

    .signup-card__hero {
        width: 260px !important;
        height: 110px !important;
        margin-top: 16px !important;
    }

    .signup-card__game-logo {
        width: 140px !important;
    }

    .signup-card__border-logo {
        width: 260px !important;
    }

    .signup-form {
        gap: 12px !important;
    }

    .signup-form__input-wrap {
        height: 48px !important;
    }

    .signup-form__submit-row {
        display: flex !important;
        justify-content: center !important;
        margin-top: 10px !important;
        padding-bottom: 10px;
    }

    .signup-form__submit-btn,
    #join-submit {
        width: 260px !important;
        height: 64px !important;
        font-size: 22px !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background-size: 100% 100% !important;
        background-repeat: no-repeat !important;
        z-index: 10 !important;
    }

    #close-signup {
        font-size: 18px !important;
        top: 14px !important;
        right: 14px !important;
    }
}


@media (max-width: 400px) {

    .navbar-item-text {
        font-size: 10px;
    }

    .posts-section-title__text,
    .servers-section-title__text {
        font-size: 24px !important;
    }

    .content-section-title__text {
        font-size: 20px !important;
    }

    .post-card,
    .post-card--1,
    .post-card--2 {
        max-width: 100% !important;
        height: 450px !important;
    }

    .post-card__title-text {
        font-size: 17px !important;
        line-height: 1.4 !important;
    }

    .server-card,
    .server-card--scorpion,
    .server-card--lion {
        width: 240px !important;
        height: 255px !important;
    }

    .server-card__bg {
        width: 240px !important;
        height: 240px !important;
        border-radius: 34px !important;
    }

    .signup-card {
        width: 96vw !important;
    }

    .signup-form__submit-btn,
    #join-submit {
        width: 230px !important;
        height: 58px !important;
        font-size: 20px !important;
    }
}