/* ===== RESPONSIVE DESIGN - FRANCMATIC TECHNOLOGIES ===== */

/* ===== LARGE TABLETS / SMALL DESKTOPS ===== */
@media (max-width: 1024px) {
    .hero-line {
        font-size: 2.8rem;
    }

    .hero-highlight {
        font-size: 3.6rem;
    }

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

    .software-slide-image {
        height: 210px;
    }

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

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

    .footer .container {
        grid-template-columns: 1.2fr 1fr 1fr;
        gap: 35px;
    }

    .section-heading {
        font-size: 2rem;
    }
}

/* ===== TABLETS ===== */
@media (max-width: 992px) {
    .hero-line {
        font-size: 2.4rem;
    }

    .hero-highlight {
        font-size: 3rem;
    }

    .mission-vision .container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .footer .container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-section:last-child {
        grid-column: 1 / -1;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem 1.5rem;
    }

    .footer-links li {
        border-bottom: none;
    }

    .footer-links a {
        padding: 0.35rem 0;
        white-space: nowrap;
    }

    .footer-links a::before {
        font-size: 0.95rem;
    }

    .cta-section h2,
    .partnership-section h2 {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

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

/* ===== MOBILE LANDSCAPE / SMALL TABLETS ===== */
@media (max-width: 768px) {
    /* Top Bar */
    .top-bar-left {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 8px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .top-bar-right {
        width: 100%;
        justify-content: center;
    }

    /* === Navigation (Nugsoft-style dropdown) === */
    .top-bar {
        position: relative;
        z-index: 1002;
    }

    .navbar {
        position: sticky;
        top: 0;
        z-index: 1003;
        background: #fff;
        isolation: isolate;
    }

    .navbar .container {
        position: relative;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .navbar-brand,
    .nav-toggle {
        position: relative;
        z-index: 2;
    }

    .nav-toggle {
        display: flex !important;
        margin-left: auto;
        flex-shrink: 0;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(-6px);
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(-50vw + 50%);
        flex-direction: column;
        align-items: center;
        text-align: center;
        background: #fff;
        padding: 0;
        box-shadow: none;
        border-top: none;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.25s ease, visibility 0.25s ease, max-height 0.25s ease;
        z-index: 1;
        max-height: 0;
        overflow: hidden;
    }

    .nav-menu.active {
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
        max-height: calc(100dvh - 72px);
        padding: 0.35rem 0 1rem;
        box-shadow: 0 16px 32px rgba(10, 22, 40, 0.12);
        border-top: 1px solid rgba(10, 22, 40, 0.06);
        overflow-y: auto;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: none;
    }

    .nav-menu a {
        display: inline-block;
        width: auto;
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--primary);
        border-radius: 0;
        border-left: none;
        line-height: 1.4;
    }

    .nav-menu a:hover {
        background: transparent;
        color: var(--secondary);
    }

    .nav-menu a.active {
        background: transparent;
        color: var(--secondary);
        font-weight: 600;
    }

    .nav-menu a::after {
        display: none;
    }

    .brand-name {
        font-size: clamp(0.72rem, 2.8vw, 0.95rem);
        line-height: 1.2;
        flex: 1 1 auto;
        min-width: 0;
    }

    .navbar-brand {
        margin-right: 0;
        gap: clamp(0.45rem, 2vw, 0.85rem);
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 3.25rem);
    }

    /* === Hero Section === */
    .hero {
        min-height: 70vh;
    }

    .hero > .hero-slideshow {
        inset: 0;
    }

    .hero-line {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .hero-highlight {
        font-size: 2.6rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* === Welcome Section === */
    .welcome-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-story-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-story-media {
        max-width: 100%;
        margin: 0 auto;
    }

    .about-intro.about-story {
        text-align: center;
    }

    .about-story-content h2 {
        display: inline-block;
    }

    .welcome-image {
        max-width: 100%;
        margin: 0 auto;
    }

    .welcome-content {
        text-align: center;
    }

    .welcome-content h1::after {
        margin: 16px auto 0;
    }

    .welcome-content h1 {
        font-size: 1.8rem;
    }

    /* === Products Carousel === */
    .products-carousel {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-card-image {
        height: 200px;
    }

    /* === Software Products Slider === */
    .software-slide-image {
        height: 200px;
    }

    /* === Why Grid === */
    .why-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* === Expertise Banner === */
    .expertise-banner {
        background-attachment: scroll;
        padding: 60px 0;
    }

    .expertise-content h2 {
        font-size: 1.8rem;
    }

    .expertise-stats {
        gap: 30px;
    }

    .expertise-stat .stat-number {
        font-size: 2.2rem;
    }

    /* === Gallery === */
    .gallery-slider-item {
        flex: 0 0 calc((100% - 16px) / 2);
    }

    .software-products-showcase .gallery-slider-item.software-slide {
        flex: 0 0 calc((100% - 16px) / 2);
    }

    .impact-showcase-slider .gallery-slider-item.impact-slide {
        flex: 0 0 calc((100% - 16px) / 2);
    }

    .software-slide-image {
        height: 180px;
    }

    .gallery-slider-arrow {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

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

    .gallery-item {
        aspect-ratio: 4 / 3;
        height: auto;
    }

    /* === Expertise Banner === */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

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

    /* === Sections === */
    .section-heading {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .services-preview,
    .team-section,
    .about-content,
    .all-services,
    .products-section,
    .upcoming-products,
    .contact-info-section,
    .contact-page,
    .contact-faq,
    .faq-section,
    .process-section,
    .cta-section,
    .partnership-section,
    .mission-vision,
    .top-products,
    .software-products,
    .welcome-section,
    .why-choose-us,
    .impact-showcase,
    .home-gallery {
        padding: 60px 0;
    }

    /* === Process Steps === */
    .process-steps {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* === Team === */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .team-img {
        aspect-ratio: 4 / 5;
        height: auto;
    }

    /* === Values === */
    .values-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* === Achievements === */
    .achievements-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* === Contact === */
    .contact-form-grid {
        grid-template-columns: 1fr;
    }

    .contact-submit {
        width: 100%;
        align-self: stretch;
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* === FAQ === */
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* === Footer === */
    .footer .container {
        grid-template-columns: 1fr 1fr;
        gap: 28px 22px;
        text-align: left;
    }

    .footer-section:last-child {
        grid-column: 1 / -1;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem 1.25rem;
    }

    .footer-links li {
        border-bottom: none;
    }

    .footer-links a {
        padding: 0.3rem 0;
        font-size: 0.88rem;
        white-space: nowrap;
    }

    .social-links {
        justify-content: flex-start;
    }

    /* === CTA === */
    .cta-section h2,
    .partnership-section h2 {
        font-size: 1.8rem;
    }

    /* === Page Header === */
    .page-header {
        padding: 50px 0;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    /* === Forms === */
    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
    }

    .contact-submit {
        width: 100%;
        align-self: stretch;
    }

    .form-container {
        padding: 30px 22px;
    }
}

/* ===== MOBILE PORTRAIT ===== */
@media (max-width: 480px) {
    .container {
        padding-left: var(--site-gutter, 1cm);
        padding-right: var(--site-gutter, 1cm);
    }

    .navbar-brand {
        gap: 0.5rem;
        max-width: calc(100% - 3rem);
    }

    .logo img {
        height: 46px;
    }

    .brand-name {
        font-size: clamp(0.62rem, 3.1vw, 0.78rem);
        line-height: 1.15;
    }

    .nav-toggle {
        width: 40px;
        height: 40px;
        margin-left: auto;
    }

    /* Top Bar */
    .top-bar {
        font-size: 0.8rem;
    }

    .top-bar-label {
        display: none;
    }

    /* Hero */
    .hero {
        min-height: 60vh;
    }

    .hero-line {
        font-size: 1.6rem;
        letter-spacing: 0.5px;
    }

    .hero-highlight {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    /* Welcome */
    .welcome-content h1 {
        font-size: 1.5rem;
    }

    .welcome-image {
        max-width: 100%;
    }

    /* Section Headings */
    .section-heading {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .cta-section h2,
    .partnership-section h2 {
        font-size: 1.4rem;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

    .about-intro h2,
    .values-section h2,
    .achievements h2,
    .upcoming-products h2,
    .faq-section h2,
    .products-intro h2,
    .form-container h2 {
        font-size: 1.5rem;
    }

    /* Buttons */
    .btn {
        padding: 11px 24px;
        font-size: 0.9rem;
    }

    .cta-section .btn-primary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        touch-action: manipulation;
    }

    .software-slide-image {
        height: 160px;
    }

    /* Values Grid */
    .values-grid {
        grid-template-columns: 1fr;
    }

    /* Achievements */
    .achievements-grid {
        grid-template-columns: 1fr 1fr;
    }

    .achievement {
        padding: 28px 14px;
    }

    .achievement-number {
        font-size: 2.2rem;
    }

    /* Process Steps */
    .process-steps {
        grid-template-columns: 1fr;
    }

    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Sub-products */
    .sub-products {
        grid-template-columns: 1fr;
    }

    /* Product Actions */
    .product-item-actions {
        flex-direction: column;
    }

    .product-item-actions .btn {
        width: 100%;
    }

    /* Team */
    .team-img {
        aspect-ratio: 4 / 5;
        height: auto;
    }

    .team-info {
        padding: 20px 16px;
    }

    /* Sections Padding */
    .services-preview,
    .team-section,
    .about-content,
    .all-services,
    .products-section,
    .upcoming-products,
    .contact-info-section,
    .contact-page,
    .contact-faq,
    .faq-section,
    .process-section,
    .cta-section,
    .partnership-section,
    .mission-vision,
    .top-products,
    .software-products,
    .welcome-section,
    .why-choose-us,
    .impact-showcase,
    .home-gallery {
        padding: 45px 0;
    }

    /* Gallery mobile */
    .gallery-slider-item {
        flex: 0 0 100%;
    }

    .software-products-showcase .gallery-slider-item.software-slide {
        flex: 0 0 100%;
    }

    .impact-showcase-slider .gallery-slider-item.impact-slide {
        flex: 0 0 100%;
    }

    .software-slide-image {
        height: 220px;
    }

    .gallery-slider {
        gap: 8px;
    }

    .gallery-slider-arrow {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gallery-item {
        aspect-ratio: 4 / 3;
        height: auto;
    }

    /* Expertise mobile */
    .expertise-stats {
        flex-direction: column;
        gap: 20px;
    }

    .expertise-content h2 {
        font-size: 1.5rem;
    }

    .expertise-stat .stat-number {
        font-size: 2rem;
    }

    /* Scroll Top */
    .scroll-top {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 54px;
        height: 54px;
        font-size: 1.7rem;
    }

    body.page-contact .scroll-top.visible {
        bottom: 86px;
    }

    /* Mission/Vision */
    .mission, .vision {
        padding: 1rem 0;
    }

    .mission h2, .vision h2 {
        font-size: 1.3rem;
    }

    /* Footer */
    .footer {
        padding: 45px 0 0;
    }

    .footer .container {
        gap: 28px;
    }

    .footer-section h3 {
        font-size: 1.1rem;
    }

    /* Hero Stats */
    .hero-stats {
        gap: 20px;
        flex-wrap: wrap;
    }

    .hero-stat .stat-number {
        font-size: 1.4rem;
    }

    .hero-stat .stat-label {
        font-size: 0.75rem;
    }
}

/* ===== VERY SMALL SCREENS ===== */
@media (max-width: 360px) {
    .logo img {
        height: 42px;
    }

    .hero-line {
        font-size: 1.3rem;
    }

    .hero-highlight {
        font-size: 1.7rem;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }
}
