/* ============================================================
   EGNOSPHERE TECHNOLOGIES — RESPONSIVE STYLESHEET
   Covers: Mobile (≤480px), Tablet (≤768px), Laptop (≤1024px)
   Applied globally across all pages
   ============================================================ */

/* ─── TABLET & SMALL LAPTOP (≤1024px) ──────────────────────── */
@media (max-width: 1024px) {

    /* === NAVBAR === */
    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    /* === HERO (HOME) === */
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-visual {
        display: none;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    /* === WHY SECTION === */
    .why-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .why-left {
        text-align: center;
    }

    .why-left .section-subtitle {
        margin: 0 auto;
    }

    .why-left .btn-outline {
        display: inline-flex;
    }

    /* === ABOUT HERO === */
    .about-hero-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .about-hero-content p {
        max-width: 100%;
    }

    .about-hero-content .btn {
        display: inline-flex;
    }

    .about-meta {
        justify-content: center;
    }

    /* === ABOUT SECTIONS === */
    .vm-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .founder-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* === TIMELINE (ABOUT) === */
    .timeline-line {
        left: 0;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding: 0 0 0 3rem !important;
        justify-content: flex-start !important;
    }

    .timeline-item .timeline-dot {
        left: -8px !important;
        right: auto !important;
    }

    .timeline-item.left .timeline-dot.future,
    .timeline-item.right .timeline-dot.future {
        left: -10px !important;
        right: auto !important;
    }

    .timeline-content {
        max-width: 100%;
    }

    /* === SERVICES === */
    .services-full-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    /* === PORTFOLIO === */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-card-wide {
        grid-column: span 2;
    }

    /* === SOLUTIONS === */
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .sol-hero-inner {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    /* === FOOTER === */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

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

/* ─── TABLET (≤768px) ───────────────────────────────────────── */
@media (max-width: 768px) {

    /* === GLOBAL SPACING === */
    .section {
        padding: 4rem 0;
    }

    .section-sm {
        padding: 3rem 0;
    }

    /* === NAVBAR === */
    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .navbar {
        padding: 1rem 0;
    }

    /* === MOBILE MENU === */
    .mobile-menu a {
        font-size: 1.3rem;
    }

    /* === TYPOGRAPHY === */
    h1 {
        font-size: clamp(2rem, 6vw, 2.8rem);
    }

    h2 {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
    }

    h3 {
        font-size: 1.15rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* === HERO (HOME) === */
    .hero {
        padding-top: 4rem;
        min-height: auto;
        padding-bottom: 3rem;
    }

    .hero-title {
        font-size: clamp(2rem, 7vw, 3rem);
    }

    .hero-subtitle {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .hero-badge {
        font-size: 0.6rem;
    }

    .hero-stats {
        gap: 1.2rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .stat-num {
        font-size: 0.95rem !important;
    }

    /* === PAGE HERO (INNER PAGES) === */
    .page-hero {
        padding: 8rem 0 3rem;
    }

    .contact-hero {
        padding: 8rem 0 3rem;
    }

    .portfolio-hero {
        padding: 8rem 0 3rem;
    }

    .services-hero {
        padding: 8rem 0 3rem;
    }

    .about-hero {
        padding: 7rem 0 3rem;
        min-height: auto;
    }

    /* === GRIDS === */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* === HOME SERVICES === */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* === WHY SECTION === */
    .why-inner {
        gap: 2rem;
    }

    .why-feature {
        gap: 1rem;
    }

    /* === STATS BAND === */
    .stats-row {
        gap: 1.5rem;
    }

    .stat-divider-v {
        display: none;
    }

    .stat-big {
        font-size: 2rem !important;
    }

    /* === CTA === */
    .cta-inner {
        padding: 3rem 1.5rem;
    }

    .cta-section {
        padding: 4rem 0;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-actions .btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    /* === ABOUT === */
    .about-hero-inner {
        gap: 2rem;
    }

    .about-meta {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .about-meta-divider {
        display: none;
    }

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

    .about-metrics {
        gap: 1rem;
    }

    .metric-val {
        font-size: 1.4rem;
    }

    /* === FOUNDER === */
    .founder-inner {
        gap: 2rem;
    }

    .founder-card {
        padding: 1.8rem;
    }

    /* === SERVICES PAGE === */
    .services-full-grid {
        grid-template-columns: 1fr;
    }

    .process-steps {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }

    .process-step {
        max-width: 320px;
        width: 100%;
    }

    .process-line {
        display: none;
    }

    .svc-card {
        padding: 1.8rem;
    }

    /* === CONTACT === */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-card {
        padding: 1.8rem;
    }

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

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

    .contact-hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    /* === PORTFOLIO === */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-card-wide {
        grid-column: span 1;
    }

    .portfolio-hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    /* === SOLUTIONS === */
    .solutions-grid {
        grid-template-columns: 1fr !important;
    }

    .sol-hero-inner {
        gap: 2rem !important;
    }

    /* === FOOTER === */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    /* === BUTTONS === */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.72rem;
    }

    .hero-actions {
        gap: 0.75rem;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    /* === WHATSAPP FLOAT === */
    .whatsapp-float {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
        bottom: 1.2rem;
        right: 1.2rem;
    }
}

/* ─── MOBILE (≤480px) ───────────────────────────────────────── */
@media (max-width: 480px) {

    /* === CONTAINER === */
    .container {
        padding: 0 1rem;
    }

    /* === TYPOGRAPHY === */
    h1 {
        font-size: 1.85rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    /* === HERO === */
    .hero {
        padding-top: 5rem;
    }

    .hero-title {
        font-size: 1.9rem;
        line-height: 1.12;
    }

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

    .hero-badge {
        font-size: 0.55rem;
        padding: 0.4rem 0.9rem;
        letter-spacing: 0.08em;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        gap: 1rem;
    }

    /* === SECTION LABELS === */
    .section-label {
        font-size: 0.58rem;
        padding: 0.3rem 0.8rem;
        letter-spacing: 0.2em;
    }

    /* === NAVBAR === */
    .nav-logo-name {
        font-size: 0.85rem;
    }

    .nav-logo-tagline {
        font-size: 0.5rem;
    }

    .nav-logo-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    /* === MOBILE MENU === */
    .mobile-menu a {
        font-size: 1.1rem;
    }

    .mobile-menu {
        gap: 1.5rem;
    }

    /* === CARDS === */
    .service-card {
        padding: 1.5rem;
    }

    .svc-card {
        padding: 1.5rem;
    }

    .contact-form-card {
        padding: 1.4rem;
    }

    .vm-card {
        padding: 1.8rem;
    }

    .founder-card {
        padding: 1.5rem;
    }

    .timeline-content {
        padding: 1.2rem 1.4rem;
    }

    /* === CTA === */
    .cta-inner {
        padding: 2.5rem 1.2rem;
        border-radius: var(--radius-lg);
    }

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

    /* === STATS === */
    .stats-row {
        gap: 1.5rem;
    }

    .stat-big {
        font-size: clamp(1.6rem, 5vw, 2rem) !important;
    }

    .stat-block {
        min-width: 80px;
    }

    /* === ABOUT === */
    .about-hero {
        padding: 6.5rem 0 2.5rem;
    }

    .about-metrics {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    /* === CONTACT HERO === */
    .contact-hero {
        padding: 7rem 0 2.5rem;
    }

    .contact-hero h1 {
        font-size: 1.8rem;
    }

    .form-input {
        font-size: 0.85rem;
        padding: 0.75rem 0.9rem;
    }

    /* === PORTFOLIO === */
    .portfolio-hero {
        padding: 7rem 0 2.5rem;
    }

    .portfolio-hero h1 {
        font-size: 1.8rem;
    }

    .filter-tab {
        font-size: 0.6rem;
        padding: 0.5rem 1rem;
    }

    .filter-tabs {
        gap: 0.4rem;
    }

    /* === FOOTER === */
    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-grid {
        gap: 1.5rem;
    }

    .footer-col h4 {
        font-size: 0.65rem;
    }

    .footer-social {
        gap: 0.75rem;
    }

    .footer-social a {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    /* === PROCESS STEPS === */
    .process-step {
        padding: 0 0.5rem;
    }

    .process-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    /* === TECH PILLS === */
    .tech-pill {
        font-size: 0.62rem;
        padding: 0.5rem 1.1rem;
    }

    /* === GLASS CARDS hover lift — disable on touch === */
    .glass-card:hover {
        transform: none;
    }
}

/* ─── VERY SMALL MOBILE (≤360px) ───────────────────────────── */
@media (max-width: 360px) {
    .container {
        padding: 0 0.85rem;
    }

    h1 {
        font-size: 1.65rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    .hero-title {
        font-size: 1.65rem;
    }

    .btn {
        font-size: 0.68rem;
        padding: 0.7rem 1.2rem;
    }

    .nav-logo-name {
        font-size: 0.78rem;
    }

    .cta-inner {
        padding: 2rem 1rem;
    }

    .contact-form-card {
        padding: 1.2rem;
    }

    .footer-grid {
        gap: 1.2rem;
    }
}

/* ─── LANDSCAPE PHONE FIX ─────────────────────────────────── */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 4.5rem 0 2rem;
    }

    .about-hero {
        min-height: auto;
        padding: 5rem 0 2rem;
    }

    .mobile-menu {
        justify-content: flex-start;
        overflow-y: auto;
        padding-top: 4rem;
        gap: 1.2rem;
    }

    .mobile-menu a {
        font-size: 1rem;
    }
}

/* ─── TOUCH DEVICE IMPROVEMENTS ───────────────────────────── */
@media (hover: none) and (pointer: coarse) {

    /* Increase tap target sizes */
    .nav-links a {
        padding: 0.7rem 1rem;
    }

    .filter-tab {
        padding: 0.7rem 1.4rem;
    }

    .footer-col a {
        padding: 0.4rem 0;
    }

    .btn {
        min-height: 44px;
    }

    .form-input {
        min-height: 48px;
    }

    /* Remove hover-only effects that break on touch */
    .glass-card:hover {
        transform: none;
        box-shadow: none;
    }

    .glass-card:hover::before {
        opacity: 0;
    }

    .contact-card:not(.non-link):hover {
        transform: none;
    }

    .btn-primary:hover {
        transform: none;
    }

    .btn-outline:hover {
        transform: none;
    }

    .btn-ghost:hover {
        transform: none;
    }
}

/* ─── PRINT / FORCED COLORS SAFE ────────────────────────── */
@media (forced-colors: active) {
    .glass-card {
        border: 1px solid ButtonText;
    }

    .btn-primary {
        background: ButtonFace;
        color: ButtonText;
    }
}