/* =============================================
   GOVRYX - FINAL UNIFIED RESPONSIVE ENGINE
   Total Mobile & Tablet Dominance
   Date: 2026-04-06
   ============================================= */

/* Universal Scroll Protection & Sizing */
html,
body {
    width: 100vw !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    position: relative;
    -webkit-text-size-adjust: 100%;
}

* {
    box-sizing: border-box !important;
}

/* Global Container Fix */
.container {
    width: 100% !important;
    max-width: 1200px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* =============================================
   TABLET LANDSCAPE / SMALL DESKTOP (< 1200px)
   ============================================= */
@media screen and (max-width: 1200px) {
    .beliefs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }
}

/* =============================================
   IPAD PRO & LARGE TABLETS (< 1024px)
   ============================================= */
@media screen and (max-width: 1024px) {
    .hero-container {
        display: flex !important;
        flex-direction: column !important;
        text-align: center !important;
        gap: 30px !important;
    }

    .hero-content {
        padding-left: 0 !important;
    }

    .hero-title {
        font-size: 48px !important;
    }

    .hero-subtitle {
        font-size: 20px !important;
    }

    .capabilities-grid,
    .features-grid,
    .why-grid,
    .industries-grid,
    .contact-options-grid,
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .section-title {
        font-size: 36px !important;
    }

    .btn {
        padding: 14px 24px !important;
        font-size: 14px !important;
        min-height: 44px !important;
    }

    .industry-card {
        flex: 0 0 calc(50% - 24px) !important;
        width: calc(50% - 24px) !important;
    }
}

/* =============================================
   IPAD PORTRAIT & SMALL TABLETS (< 896px)
   ============================================= */
@media screen and (max-width: 896px) {
    .hero-title {
        font-size: 42px !important;
    }

    .hero-subtitle {
        font-size: 18px !important;
    }

    .capabilities-grid,
    .features-grid,
    .why-grid,
    .industries-grid,
    .contact-options-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .section-title {
        font-size: 32px !important;
    }

    .btn {
        padding: 12px 20px !important;
        font-size: 14px !important;
        min-height: 44px !important;
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        min-height: 44px !important;
        font-size: 16px !important;
    }
}

/* =============================================
   LARGE PHONES (< 600px)
   ============================================= */
@media screen and (max-width: 600px) {
    .hero-title {
        font-size: 36px !important;
    }

    .hero-subtitle {
        font-size: 16px !important;
    }

    .capabilities-grid,
    .features-grid,
    .why-grid,
    .industries-grid,
    .contact-options-grid,
    .pricing-grid,
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .section-title {
        font-size: 28px !important;
    }

    .btn {
        padding: 12px 16px !important;
        font-size: 14px !important;
        min-height: 44px !important;
        width: 100% !important;
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        min-height: 44px !important;
        font-size: 16px !important;
    }

    .hero-container {
        gap: 20px !important;
    }

    .hero-content {
        padding-left: 0 !important;
    }
}

/* =============================================
   SMALL PHONES (< 480px)
   ============================================= */
@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 32px !important;
    }

    .hero-subtitle {
        font-size: 15px !important;
    }

    .section-title {
        font-size: 24px !important;
    }

    .btn {
        padding: 10px 14px !important;
        font-size: 13px !important;
        min-height: 44px !important;
        width: 100% !important;
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        min-height: 44px !important;
        font-size: 16px !important;
    }

    .hero-visual {
        min-height: 340px !important;
    }

    .carousel-item {
        width: 280px !important;
        height: 210px !important;
    }

    .carousel-control {
        width: 40px !important;
        height: 40px !important;
        left: -20px !important;
        right: -20px !important;
    }
}

/* =============================================
   VERY SMALL PHONES (< 320px)
   ============================================= */
@media screen and (max-width: 320px) {
    .hero-title {
        font-size: 28px !important;
    }

    .hero-subtitle {
        font-size: 14px !important;
    }

    .section-title {
        font-size: 20px !important;
    }

    .btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
        min-height: 44px !important;
        width: 100% !important;
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        min-height: 44px !important;
        font-size: 16px !important;
    }

    .carousel-item {
        width: 260px !important;
        height: 195px !important;
    }

    .hero-visual {
        min-height: 320px !important;
    }

    .carousel-control {
        width: 36px !important;
        height: 36px !important;
        left: -18px !important;
        right: -18px !important;
    }

    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* =============================================
   TABLET & BELOW (< 1100px) - THE STACKING ZONE
   ============================================= */
@media screen and (max-width: 1100px) {
    .nav-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column !important;
        padding: 10px 0 !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        z-index: 9999;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-toggle {
        display: flex !important;
    }

    .hero-container {
        display: flex !important;
        flex-direction: column !important;
        text-align: center !important;
        gap: 30px !important;
    }

    .industries-track,
    .industries-viewport,
    .capabilities-grid,
    .features-grid,
    .why-grid,
    .industries-grid,
    .origin-content,
    .origin-grid,
    .timeline-item-wrapper,
    .chart-container,
    .infrastructure-content,
    .contact-options-grid,
    .categories-grid,
    .newsletters-grid,
    .demo-container,
    .pricing-cards,
    .team-grid,
    .values-grid,
    .beliefs-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        width: 100% !important;
    }

    .industries-track {
        animation: none !important;
        transform: none !important;
        width: 100% !important;
    }

    .industry-card {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 20px !important;
        min-height: auto !important;
    }

    /* Timeline Section - CRITICAL FIX */
    .timeline-section {
        overflow: visible !important;
        height: auto !important;
        padding: 40px 0 20px !important;
    }

    .timeline-container {
        position: relative !important;
        height: auto !important;
        z-index: auto !important;
        max-width: 100% !important;
        padding: 0 18px !important;
    }

    .timeline-container::before {
        display: none !important;
    }

    .timeline-item-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
        margin-top: 20px !important;
        margin-bottom: 24px !important;
        position: relative !important;
        height: auto !important;
        z-index: auto !important;
    }

    .timeline-item {
        width: 100% !important;
        position: static !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        z-index: auto !important;
    }

    .timeline-label {
        display: none !important;
    }

    .timeline-content {
        width: 100% !important;
        min-height: auto !important;
        padding: 24px 18px !important;
        text-align: left !important;
        transform: none !important;
        position: static !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .timeline-content:hover {
        transform: none !important;
    }

    .timeline-content h4 {
        text-align: left !important;
        font-size: 20px !important;
    }

    .timeline-content p {
        text-align: left !important;
        display: block !important;
        margin-bottom: 16px !important;
    }

    .timeline-subtitle {
        display: block !important;
    }

    .about-cta {
        padding: 40px 0 !important;
        position: relative !important;
        height: auto !important;
    }
}

/* =============================================
   MOBILE VIEWPORT (< 768px)
   ============================================= */
@media screen and (max-width: 768px) {

    .about-hero,
    .blog-hero,
    .careers-hero,
    .product-hero,
    .pricing-hero,
    .page-header {
        padding-top: 170px !important;
    }

    .hero {
        padding-top: 40px !important;
    }

    .compliance-countdown {
        display: none !important;
    }

    .section-title {
        font-size: 28px !important;
    }

    .beliefs-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .belief-card {
        padding: 20px !important;
    }

    .timeline-title {
        font-size: 32px !important;
        margin-bottom: 12px !important;
    }

    .timeline-subtitle {
        display: block !important;
        font-size: 14px !important;
        margin-bottom: 18px !important;
        text-align: center !important;
    }

    .timeline-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 16px !important;
        position: relative !important;
        height: auto !important;
    }

    .timeline-item-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        margin-top: 20px !important;
        margin-bottom: 24px !important;
        position: relative !important;
        height: auto !important;
    }

    .timeline-item {
        width: 100% !important;
        position: static !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .timeline-content {
        width: 100% !important;
        padding: 24px 18px !important;
        min-height: auto !important;
        position: static !important;
        box-sizing: border-box !important;
        transform: none !important;
    }

    .timeline-content h4 {
        text-align: left !important;
        font-size: 20px !important;
    }

    .timeline-content p {
        text-align: left !important;
    }

    .btn {
        width: 100% !important;
        display: flex !important;
        margin-bottom: 8px !important;
        text-align: center;
        justify-content: center;
    }

    section {
        padding: 25px 0 !important;
    }

    .section-header {
        margin-bottom: 25px !important;
    }

    .infrastructure-section .section-header {
        margin-bottom: 30px !important;
    }

    .chart-container,
    .infrastructure-content {
        margin-top: 10px !important;
        gap: 30px !important;
    }

    .problem-intro,
    .problem-detail,
    .vision-paragraph {
        font-size: 15px !important;
        text-align: center !important;
        margin-bottom: 20px !important;
    }

    .stats-grid {
        margin-top: 40px !important;
        gap: 20px !important;
    }

    .stat-card {
        padding: 30px 20px !important;
        margin-bottom: 0 !important;
    }

    .chart-placeholder,
    .infra-diagram {
        margin-top: 5px !important;
        margin-bottom: 5px !important;
        background: none !important;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        height: auto !important;
        min-height: auto !important;
    }

    .chart-placeholder img,
    .infra-diagram img {
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    /* Fixed height fixes */
    .infra-diagram,
    .infra-screenshot,
    .capability-screenshot,
    .video-container,
    .why-chart {
        height: 250px !important;
    }

    .industry-card {
        min-height: 300px !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        margin-right: 0 !important;
    }

    .hero-visual {
        min-height: 350px !important;
    }

    .carousel-item {
        width: 300px !important;
        height: 225px !important;
    }

    .carousel-control {
        width: 40px !important;
        height: 40px !important;
        left: -20px !important;
        right: -20px !important;
    }
}

/* =============================================
   INDEX.HTML SPECIFIC FIXES
   ============================================= */
@media screen and (max-width: 768px) {
    footer {
        padding: 40px 0 20px !important;
        margin-top: 40px !important;
    }

    .alignment-label {
        padding-top: 20px !important;
        margin-bottom: 10px !important;
    }

    /* NAVBAR COUNTDOWN VERTICAL STACK FIX */
    #compliance-countdown {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        width: auto !important;
        min-width: 160px !important;
        /* Ensure enough space for the long label */
        margin: 0 !important;
        padding: 0 10px !important;
        height: auto !important;
    }

    #compliance-countdown .countdown-label {
        font-size: 11px !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
        /* FORCES ONTO ONE LINE */
        opacity: 0.8 !important;
        text-align: center !important;
    }

    #countdown-timer {
        font-size: 12px !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    .nav-logo img {
        height: 28px !important;
    }
}

/* Universal Media Fixes - CLEANER VERSION */
.fluid-img {
    max-width: 100% !important;
    height: auto !important;
}

/* Specific Logo Protections */
.nav-logo img,
.footer-logo img,
.logo-item img {
    height: 32px !important;
    /* Force standard height */
    width: auto !important;
    max-width: none !important;
}

.logo-item.large img,
.logo-item.large {
    height: 60px !important;
    width: auto !important;
}

.footer-logo img {
    height: 40px !important;
}

iframe,
video {
    width: 100% !important;
    max-width: 100% !important;
}

/* =============================================
   DYNAMIC FOOTER MOBILE FIX
   Targets the dynamically loaded footer columns
   ============================================= */
@media screen and (max-width: 768px) {
    .footer .container {
        padding: 0 15px !important;
        max-width: 100% !important;
    }

    .footer-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 40px !important;
        margin-bottom: 40px !important;
    }

    .footer-brand {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    .footer-nav {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        text-align: left !important;
    }

    .footer-nav-column h4 {
        margin-bottom: 12px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 8px;
    }

    .footer-newsletter {
        padding-top: 30px !important;
    }

    .newsletter-form {
        flex-direction: column !important;
        gap: 12px !important;
    }

    /* MOBILE SUB-MENU FIX */
    .nav-dropdown.active .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding: 5px 0 5px 20px !important;
        /* Indent sub-links */
        margin: 0 !important;
        transition: none !important;
    }

    .nav-dropdown.active>.nav-link::before {
        transform: rotate(135deg) !important;
        /* Rotate arrow when open */
    }

    .dropdown-menu a {
        padding: 10px 0 !important;
        color: #5f6d7a !important;
        /* Slightly distinct from main links */
        font-size: 14px !important;
    }
}