/**
 * SOFTSYSWORLD - Responsive Styles & Media Queries
 */

/* Laptops & Tablets Landscape (<= 1140px) */
@media (max-width: 1140px) {
    .hero-section {
        padding: 28px 0 24px;
    }

    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        align-items: center;
    }

    .hero-title {
        font-size: 32px;
        line-height: 1.2;
    }

    .hero-desc {
        font-size: 14.5px;
        line-height: 1.55;
        margin-bottom: 18px;
    }

    .hero-mockup-wrapper {
        max-width: 100%;
        margin: 0 auto;
    }

    .products-master-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .product-showcase-card.card-featured {
        grid-column: span 2 !important;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .footer-col.brand-col {
        grid-column: span 2;
    }

    .footer-col.contact-col {
        grid-column: span 2;
    }
}

/* Tablets Portrait (<= 1024px) */
@media (max-width: 1024px) {
    .main-nav {
        display: none; /* Mobile Drawer takes over */
    }

    .mobile-toggle {
        display: flex;
    }

    .header-container {
        height: 70px;
    }

    .site-logo-img {
        height: 42px;
        max-width: 168px;
    }

    .hero-slider-arrow {
        display: none; /* Touch swipe and dots take over on tablets & mobile */
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px;
    }

    .uniteone-grid {
        grid-template-columns: 1fr !important;
    }

    .module-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .grid-4-responsive {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 18px !important;
    }

    .grid-contact-responsive {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }

    .workflow-steps-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .demo-grid {
        grid-template-columns: 1fr !important;
    }

    .ai-suite-stage {
        grid-template-columns: 1fr !important;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .contact-tiles-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .hero-title {
        font-size: clamp(28px, 6vw, 36px);
    }

    .hero-desc {
        font-size: 15.5px;
    }

    .section-py {
        padding: 50px 0;
    }

    .section-title {
        font-size: clamp(24px, 5vw, 30px);
    }

    .products-master-grid {
        grid-template-columns: 1fr !important;
    }

    .product-showcase-card.card-featured {
        grid-column: span 1 !important;
    }

    .services-grid {
        grid-template-columns: 1fr !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .module-cards-grid {
        grid-template-columns: 1fr !important;
    }

    .grid-4-responsive {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .grid-3-responsive {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .grid-2-responsive {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .grid-founder-responsive {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }

    .grid-founder-responsive > div:first-child {
        margin: 0 auto 16px !important;
    }

    .workflow-steps-grid {
        grid-template-columns: 1fr !important;
    }

    .why-grid {
        grid-template-columns: 1fr !important;
    }

    .portfolio-grid {
        grid-template-columns: 1fr !important;
    }

    .team-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-cta-actions {
        width: 100%;
        flex-direction: column;
    }

    .footer-cta-actions .btn-primary-glow,
    .footer-cta-actions .btn-outline-gold,
    .footer-cta-actions .btn-outline-royal {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-col.brand-col,
    .footer-col.contact-col {
        grid-column: span 1 !important;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .form-row {
        grid-template-columns: 1fr !important;
    }

    .uniteone-hero-card,
    .demo-card-frame {
        padding: 24px 18px;
    }

    .dash-kpi-row {
        grid-template-columns: 1fr !important;
    }

    .dash-mid-row {
        grid-template-columns: 1fr !important;
    }

    .header-container {
        height: 64px;
    }

    .site-logo-img {
        height: 38px;
        max-width: 150px;
    }

    .hero-section {
        padding: 18px 0 20px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero-preheading {
        margin-bottom: 6px;
    }

    .hero-preheading .badge-pill-section {
        font-size: 11px;
        padding: 3px 9px;
    }

    .hero-title {
        font-size: clamp(21px, 5.5vw, 26px);
        line-height: 1.22;
        margin-bottom: 8px;
        letter-spacing: -0.02em;
    }

    .hero-desc {
        font-size: 13.5px;
        line-height: 1.5;
        margin-bottom: 12px;
        color: var(--color-slate-text);
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: row;
        gap: 8px;
        margin-bottom: 12px;
        width: 100%;
    }

    .hero-actions .btn-primary-glow,
    .hero-actions .btn-outline-royal {
        flex: 1;
        min-width: 135px;
        padding: 9px 12px;
        font-size: 12.5px;
        justify-content: center;
    }

    .hero-trust-bar {
        justify-content: center;
        flex-direction: row;
        text-align: left;
        gap: 8px;
        padding-top: 8px;
        margin-bottom: 0;
    }

    .avatar-circle {
        width: 28px;
        height: 28px;
        font-size: 9px;
        margin-left: -7px;
    }

    .hero-trust-text {
        font-size: 11px;
        line-height: 1.3;
    }

    /* Completely hide floating metric badges on mobile to remove 160px+ wasted height */
    .hero-floating-badge {
        display: none !important;
    }

    .hero-mockup-wrapper {
        max-width: 100%;
        margin: 0 auto;
    }

    .hero-showcase-frame {
        border-radius: 10px;
        margin: 0 auto;
        box-shadow: 0 8px 24px rgba(11, 30, 54, 0.2);
    }

    .showcase-window-bar {
        padding: 6px 10px;
    }

    .showcase-bar-title {
        font-size: 10.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 80px);
    }

    .showcase-status-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .showcase-img-container {
        aspect-ratio: 16 / 9;
    }

    .hero-mockup-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero-slider-arrow {
        display: none !important;
    }

    .hero-slider-dots {
        margin-top: 10px;
        gap: 6px;
    }

    .hero-dot {
        padding: 5px 10px;
        font-size: 10.5px;
    }

    .hero-dot .dot-label {
        display: none;
    }

    .whatsapp-tooltip {
        display: none !important;
    }
}

/* Small Smartphone adjustments (<= 480px) */
@media (max-width: 480px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .showcase-bar-title {
        font-size: 10px;
    }

    .showcase-status-badge {
        display: none; /* Keep header clean on narrow mobile */
    }

    .header-container {
        height: 60px;
    }

    .site-logo-img {
        height: 33px;
        max-width: 130px;
    }

    .header-actions .btn-ghost-sm {
        display: none;
    }

    .header-actions .btn-primary-glow.btn-sm span {
        display: none; /* Show icon only on micro screens to keep logo proportioned */
    }

    .header-actions .btn-primary-glow.btn-sm {
        padding: 8px 10px;
        border-radius: var(--radius-sm);
    }

    .hero-title {
        font-size: 23px;
        line-height: 1.2;
        letter-spacing: -0.02em;
    }

    .btn-primary-glow,
    .btn-outline-gold,
    .btn-outline-royal {
        width: 100%;
        padding: 10px 16px;
    }

    .top-bar-inner {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

    .top-bar-right {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
}

/* MOBILE DRAWER STYLES */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 86vw);
    height: 100%;
    background: var(--color-deep-navy);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -10px 0 35px rgba(16, 36, 58, 0.65);
    z-index: 2500;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-drawer.open {
    right: 0;
}

.mobile-drawer.open {
    right: 0;
}

.mobile-drawer-inner {
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-title {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
}

.drawer-close {
    background: transparent;
    font-size: 28px;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
}

.drawer-close:hover {
    color: #FFFFFF;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
}

.mobile-nav-list a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-body);
    transition: all var(--transition-fast);
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
}

.mobile-has-sub .mobile-sub-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: transparent;
    color: var(--color-text-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.mobile-sub-menu {
    display: none;
    padding-left: 14px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.mobile-sub-menu.open {
    display: block;
}

.mobile-sub-menu .sub-link {
    font-size: 13px;
    color: var(--color-text-muted);
    padding: 8px 12px;
}

.mobile-sub-menu .sub-link.highlight {
    color: var(--color-bright-cyan);
    font-weight: 700;
}

.mobile-drawer-actions {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-phone-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-bright-cyan);
    font-weight: 600;
    padding: 8px;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2400;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}
