/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {}

/* Extra large devices (large desktops, 1300px and up) */
@media (min-width: 1300px) {}

/* ========== MOBILE RESPONSIVE STYLES ========== */

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 100%;
        padding: 0 40px;
    }

    .nav-links li a {
        font-size: 14px;
        padding: 8px 14px;
    }

    .logo-text span.ankur-text {
        font-size: 30px;
    }

    .logo-area .header-left .logo-area img {
        width: 36px;
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        padding: 0 30px;
    }

    .header-area {
        padding: 15px 0;
    }

    .header-right {
        position: fixed;
        top: 0;
        right: auto;
        left: 50%;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        overflow: hidden;
        box-sizing: border-box;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 12px;
        padding: 0 20px;
        background: #040917;
        border: 1px solid #10182e;
        border-radius: 0;
        box-shadow: 0 20px 48px rgba(0, 0, 0, 0.58);
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, -8px);
        pointer-events: none;
        transition: all 0.25s ease;
        z-index: 998;
    }

    .header-right.mobile-open {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
        pointer-events: auto;
    }

    .header-quick-links {
        width: min(100%, 420px);
        align-self: center;
        flex-direction: column;
        gap: 0;
        background: rgba(10, 18, 38, 0.7);
        border: 1px solid #1a2744;
        border-radius: 16px;
        overflow: visible;
    }

    .header-link-btn {
        width: 100%;
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        border: 0;
        border-bottom: 1px solid #1a2744;
        background: transparent;
        border-radius: 0;
        padding: 12px 18px;
        font-size: 18px;
        font-weight: 600;
        color: #9ba4b8;
        box-shadow: none;
    }

    .header-link-btn:last-child {
        border-bottom: 0;
    }

    .header-link-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        width: 24px;
        min-width: 24px;
        margin-right: 12px;
        color: #8b94aa;
        transition: color 0.2s ease;
    }

    .lang-selector-wrap {
        width: 100%;
        align-self: auto;
        background: transparent;
        border: 0;
        border-radius: 0;
        padding: 0;
    }

    .lang-selector-btn {
        width: 100%;
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        border: 0;
        border-bottom: 1px solid #1a2744;
        border-radius: 0;
        background: transparent;
        color: #9ba4b8;
        padding: 12px 18px;
        font-size: 18px;
        font-weight: 600;
        text-align: left;
    }

    .lang-label {
        font-size: 18px;
        font-weight: 600;
        line-height: 1;
    }

    .lang-icon {
        font-size: 18px;
        font-weight: 600;
        letter-spacing: 0;
    }

    .lang-arrow {
        font-size: 14px;
    }

    .lang-dropdown {
        width: 100%;
        min-width: 0;
        background: #040917;
        border: 1px solid #1b2946;
        border-radius: 12px;
        padding: 6px;
    }

    .lang-dropdown::before {
        display: none;
    }

    .header-link-btn::before,
    .lang-selector-btn::before {
        display: none;
    }

    .header-link-btn:hover {
        color: #e5eaf5;
        background: #0e1529;
    }

    .header-link-btn:hover .header-link-icon {
        color: #e5eaf5;
    }

    .header-link-btn.is-active {
        color: #041118;
        background: var(--menu-accent, #73ef9f);
    }

    .header-link-btn.is-active .header-link-icon {
        color: #041118;
    }

    .header-link-btn.is-active::before {
        background: rgba(4, 17, 24, 0.25);
        border-color: rgba(4, 17, 24, 0.15);
    }

    .lang-selector-btn:hover,
    .lang-selector-wrap.open .lang-selector-btn {
        color: #e5eaf5;
        background: #0e1529;
    }

    .lang-option {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        font-size: 16px;
        font-weight: 600;
        color: #9ba4b8;
        gap: 10px;
        padding: 8px 12px;
        text-align: center;
    }

    .lang-opt-text {
        flex: 0 0 auto;
    }

    .lang-option:hover {
        color: #e5eaf5;
        background: #0e1529;
    }

    .lang-option.active {
        color: #041118;
        background: var(--menu-accent, #73ef9f);
    }

    .lang-option.active .lang-check {
        color: #041118;
    }

    .header-link-btn:active,
    .lang-option:active {
        background: var(--menu-accent, #73ef9f);
        border-color: var(--menu-accent, #73ef9f);
        color: #041118;
    }

    /* Hide desktop navigation */
    .main-nav-container {
        display: none;
    }

    /* Logo adjustments */
    .logo-text span.ankur-text {
        font-size: 26px;
    }

    .logo-area .header-left .logo-area img {
        width: 32px;
    }

    /* Mobile menu toggle button */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        padding: 10px 12px;
        cursor: pointer;
        z-index: 1000;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #ffffff;
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(44deg) translate(4px, 4px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -5px);
    }

    /* Mobile navigation styles */
    .main-nav-container.mobile-active {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        background: rgba(5, 10, 21, 0.98);
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        padding: 80px 20px 20px;
        overflow-y: auto;
        z-index: 999;
        animation: slideInRight 0.3s ease;
    }

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

        to {
            transform: translateX(0);
        }
    }

    .main-nav-container.mobile-active .nav-links {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .main-nav-container.mobile-active .nav-links li {
        width: 100%;
    }

    .main-nav-container.mobile-active .nav-links li a {
        width: 100%;
        justify-content: space-between;
        padding: 12px 18px;
    }

    /* Dropdown adjustments for mobile */
    .main-nav-container.mobile-active .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        margin-top: 10px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 10px 0;
        display: none;
    }

    .main-nav-container.mobile-active .dropdown-item-has-children.active .sub-menu {
        display: block;
    }

    .main-nav-container.mobile-active .sub-menu li a {
        color: rgba(255, 255, 255, 0.8) !important;
        padding: 10px 18px !important;
    }

    .main-nav-container.mobile-active .sub-menu li a:hover {
        color: #2aba66 !important;
        background: rgba(42, 186, 102, 0.1) !important;
    }

    /* Slider Responsive Styles */
    .banner-area {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .expand-card-slider {
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
    }

    .powered-by-fixed {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        max-width: 100%;
        text-align: center;
        padding-bottom: 10px;
        font-size: 14px;
        z-index: 3;
    }

    .slider-card {
        width: 100%;
        flex: 1;
        padding: 30px;
        transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
        border-bottom: 1px solid #dcd3d3;
        border-right: none;
        /* iOS Safari has historically treated `background-attachment: fixed`
           inconsistently. The desktop layout uses it to fix the bg-cover
           aspect-ratio "zoom" during the flex transition; on mobile (cards
           stacked vertically) we revert to the default scroll behavior so
           the bg renders predictably on touch devices. */
        background-attachment: scroll;
    }

    .slider-card.active {
        flex: 3 !important;
    }

    .slider-card::before,
    .slider-card:hover::before,
    .slider-card.active::before {
        background: rgba(5, 10, 21, 0.46);
    }

    .card-content {
        left: 30px;
        bottom: 77px;
        width: calc(100% - 60px);
        max-width: 100%;
    }

    .card-title {
        text-shadow:
            0 0 10px rgba(255, 255, 255, 0.65),
            0 0 22px rgba(255, 255, 255, 0.5),
            0 0 38px rgba(26, 188, 156, 0.4);
    }

    .card-desc {
        text-shadow:
            0 0 8px rgba(255, 255, 255, 0.5),
            0 0 18px rgba(255, 255, 255, 0.34),
            0 0 28px rgba(26, 188, 156, 0.2);
    }

    .card-number {
        text-shadow:
            0 0 14px rgba(255, 255, 255, 0.35),
            0 0 30px rgba(19, 186, 19, 0.36);
    }

    .explore-btn {
        text-shadow: none;
    }

    .expand-card-slider .slider-card .card-title img {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35))
            drop-shadow(0 0 22px rgba(243, 116, 41, 0.22));
    }

    /* Reset Desktop Vertical Text Styles */
    .slider-card:not(.active) .card-content,
    .expand-card-slider:hover .slider-card:not(:hover) .card-content {
        left: 30px;
        bottom: 0px;
        transform: none;
        width: calc(100% - 60px);
        opacity: 1;
    }

    /* Dedicated control for third slider card content */
    .slider-card:nth-child(3):not(.active) .card-content,
    .expand-card-slider:hover .slider-card:nth-child(3):not(:hover) .card-content {
        left: 30px;
        bottom: 10px;
        transform: none;
        width: calc(100% - 60px);
        opacity: 1;
    }

    .slider-card:not(.active) .card-title {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        font-size: 20px;
        opacity: 1;
        margin: 0;
        white-space: normal;
    }

    .slider-card.active .card-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .card-number {
        font-size: 40px;
        margin-bottom: 10px;
    }

    .card-desc {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .explore-btn {
        padding: 10px 25px;
        font-size: 14px;
    }

    /* Mobile specific Left to Right Animation */
    @keyframes slideInMobile {
        0% {
            transform: translateX(-50px);
            opacity: 0;
        }

        100% {
            transform: translateX(0);
            opacity: 1;
        }
    }

    .slider-card.active .card-number,
    .slider-card.active .card-title,
    .slider-card.active .card-desc,
    .slider-card.active .explore-btn {
        animation: slideInMobile 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    }

    .slider-card.active .card-number {
        animation-delay: 0.1s;
    }

    .slider-card.active .card-title {
        animation-delay: 0.2s;
    }

    .slider-card.active .card-desc {
        animation-delay: 0.3s;
    }

    .slider-card.active .explore-btn {
        animation-delay: 0.4s;
    }

    .slider-card:nth-child(3).active .card-content {
        bottom: 70px;
    }

    /* Specific adjustment for the first card title in mobile (resetting desktop specific rule) */
    .slider-card:nth-child(1):not(.active) .card-content,
    .expand-card-slider:hover .slider-card:nth-child(1):not(:hover) .card-content {
        bottom: -23px;
    }

    .hero-overlay-panel {
        right: 16px;
        width: calc(100vw - 32px);
        max-height: calc(100vh - var(--hero-overlay-top, 96px) - 16px);
        max-height: calc(100dvh - var(--hero-overlay-top, 96px) - 16px);
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767px) {

    .expand-card-slider .slider-card .card-title img {
        max-width: 100%;
    }

    .logo-img-wrap img {
        width: 142px;
    }

    .container {
        padding: 0 20px;
    }

    .header-area {
        padding: 12px 0;
    }

    /* Logo adjustments */
    .logo-text span.ankur-text {
        font-size: 22px;
    }

    .logo-area .header-left .logo-area img {
        width: 28px;
    }

    .logo-area {
        gap: 8px;
    }

    .hero-overlay-panel {
        right: 12px;
        width: calc(100vw - 24px);
    }

    .overlay-panel-head {
        padding: 16px 18px;
    }

    .overlay-panel-head h3 {
        font-size: 20px;
    }

    .overlay-panel-body {
        padding: 18px;
    }

    .overlay-info-grid,
    .team-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Mobile menu adjustments */
    .main-nav-container.mobile-active {
        width: 100%;
        padding: 70px 20px 20px;
    }

    .mobile-menu-toggle {
        right: 20px;
        padding: 8px 10px;
    }

    .mobile-menu-toggle span {
        width: 22px;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
    .container {
        padding: 0 15px;
    }

    .header-area {
        padding: 16px 0;
    }

    .header-link-btn,
    .lang-selector-btn,
    .lang-option {
        min-height: 52px;
        padding: 10px 14px;
        font-size: 16px;
    }

    /* Logo adjustments for very small screens */
    .logo-text span.ankur-text {
        font-size: 20px;
    }

    .logo-area .header-left .logo-area img {
        width: 26px;
    }

    .logo-area {
        gap: 6px;
    }

    /* Mobile menu */
    .mobile-menu-toggle {
        right: 15px;
        padding: 6px 8px;
    }

    .mobile-menu-toggle span {
        width: 20px;
        height: 2px;
        margin: 4px 0;
    }

    .main-nav-container.mobile-active {
        padding: 60px 15px 15px;
    }

    .main-nav-container.mobile-active .nav-links li a {
        font-size: 14px;
        padding: 10px 15px;
    }

    .ai-btn {
        font-size: 14px !important;
    }
}

/* Extra small devices (very small phones, 320px and below) */
@media(max-width: 320px) {
    .logo-text span.ankur-text {
        font-size: 18px;
    }

    .logo-area .header-left .logo-area img {
        width: 24px;
    }

    .main-nav-container.mobile-active .nav-links li a {
        font-size: 13px;
        padding: 8px 12px;
    }
}
