/* ==========================================
   MOBILE.CSS — Global Mobile Responsiveness
   Covers: Nav, Hero, Grids, Cards, Footer
   Breakpoints: 1024px → 768px → 480px
   ========================================== */

/* ==========================================
   MOBILE NAVIGATION — Hamburger Menu
   ========================================== */

/* Show hamburger toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger → X animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav menu open state */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        transform: none;
        /* Reset desktop translateX(-50%) */
        width: 100%;
        background: rgba(11, 15, 26, 0.98);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(0, 212, 255, 0.12);
        border-radius: 12px;
        padding: 16px 0;
        flex-direction: column;
        gap: 0;
        z-index: 1000;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        display: block;
        padding: 14px 24px;
        font-size: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: background 0.2s ease;
    }

    .nav-links li a:hover,
    .nav-links li a.active {
        background: rgba(0, 212, 255, 0.06);
        color: var(--accent-blue);
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    /* Hide desktop Book Consultation button in nav on mobile */
    .nav-cta-btn {
        display: none;
    }

    /* ── Full-width top bar (replaces the floating pill) ── */
    .navbar {
        position: fixed;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        transform: none !important;
        max-width: none !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        border-bottom: 1px solid rgba(0, 212, 255, 0.15);
        padding: 12px 20px;
        z-index: 1000;
    }

    .nav-content {
        position: relative;
        display: flex;
        align-items: center;
    }

    /* Logo visible */
    .navbar-logo-img {
        height: 48px;
        width: auto;
        display: block;
    }

    /* Hamburger always on the right */
    .mobile-menu-toggle {
        display: flex !important;
        margin-left: auto;
        z-index: 1010;
    }

    /* ── Dropdown: fixed position so it's never clipped ── */
    .nav-links {
        position: fixed !important;
        top: 72px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        transform: none !important;
        border-radius: 0 0 16px 16px !important;
        z-index: 9999 !important;
    }

    /* Adjust hero padding-top since navbar is now 0 (not 20px from top) */
    .hero {
        padding-top: 100px;
    }

    .page-header {
        padding-top: 110px;
    }
}

/* ==========================================
   HERO SECTION — Mobile
   ========================================== */

@media (max-width: 768px) {
    .hero {
        padding-top: 140px;
        padding-bottom: 80px;
        min-height: auto;
    }

    .hero-title {
        font-size: clamp(28px, 8vw, 42px);
        letter-spacing: -0.5px;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 15px;
        line-height: 1.7;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .stat-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }
}

/* ==========================================
   SERVICES GRID — Homepage (3×2 → 1 col)
   ========================================== */

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 560px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 24px 20px;
    }
}

/* ==========================================
   SECTION HEADERS — Mobile Font Sizes
   ========================================== */

@media (max-width: 768px) {
    .section-title {
        font-size: clamp(24px, 6vw, 36px);
    }

    .section-subtitle {
        font-size: 14px;
    }

    .section-label {
        font-size: 11px;
    }

    .page-title {
        font-size: clamp(26px, 7vw, 42px);
    }

    .page-subtitle {
        font-size: 14px;
    }
}

/* ==========================================
   PAGE HEADER SECTION
   ========================================== */

@media (max-width: 768px) {
    .page-header {
        padding-top: 130px;
        padding-bottom: 40px;
    }
}

/* ==========================================
   FOOTER — Mobile
   ========================================== */

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 560px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer {
        padding: 60px 0 24px;
    }

    .footer-logo-img {
        width: 150px;
    }
}

/* ==========================================
   SERVICES PAGE — Detail Cards
   ========================================== */

@media (max-width: 768px) {
    .services-master-grid {
        gap: 32px;
    }

    .service-detail {
        padding: 0;
    }

    .service-detail-content {
        padding: 24px 20px;
    }

    .service-detail-title {
        font-size: clamp(20px, 5vw, 28px);
    }

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

    .framework-steps .steps-container {
        flex-direction: column;
        gap: 0;
    }

    .step-line {
        display: none;
    }

    /* On mobile: show each step as a self-contained card with description */
    .step {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        opacity: 1;
        background: rgba(15, 23, 42, 0.5);
        border: 1px solid rgba(0, 212, 255, 0.1);
        border-radius: 12px;
        padding: 20px;
        gap: 16px;
        margin-bottom: 12px;
    }

    .step-number {
        font-size: 32px;
        opacity: 0.4;
        min-width: 52px;
        margin-bottom: 0;
    }

    .step-dot {
        display: none;
    }

    /* Hide the separate description panel — descriptions move into each step card */
    .step-description-panel {
        display: none;
    }

    /* Show step descriptions inline via data-description attribute matching */
    .step[data-step="1"]::after {
        content: "Enterprise-wide data mapping across cloud, SaaS, and hybrid ecosystems. Identify sensitive assets and visibility gaps.";
    }

    .step[data-step="2"]::after {
        content: "Quantify exposure against regulatory, operational, and business risk. Prioritize based on impact and compliance.";
    }

    .step[data-step="3"]::after {
        content: "Architect governance models and control frameworks aligned to enterprise objectives. Define security operating models.";
    }

    .step[data-step="4"]::after {
        content: "Implement DSPM, DLP, and zero-trust controls across distributed environments. Enforce policy-driven data protection.";
    }

    .step[data-step="5"]::after {
        content: "Deliver executive-level dashboards and continuous risk monitoring. Drive measurable security performance improvements.";
    }

    .step::after {
        display: block;
        font-size: 13px;
        line-height: 1.6;
        color: var(--text-secondary);
        margin-top: 4px;
    }

    .step-title {
        font-size: 16px;
        margin-bottom: 0;
    }

    .step-text {
        display: flex;
        flex-direction: column;
    }

    /* CTA trust bar */
    .cta-trust-bar {
        flex-direction: column;
        gap: 20px;
        padding: 24px 20px;
    }

    .cta-trust-divider {
        width: 60px;
        height: 1px;
    }

    .cta-trust-item {
        padding: 0;
    }

    .services-cta-title {
        font-size: clamp(24px, 7vw, 40px);
    }

    .cta-service-badges {
        gap: 6px;
        justify-content: center;
    }

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

    .cta-primary-btn {
        justify-content: center;
    }
}

/* ==========================================
   BOOKING PAGE — Calendar
   ========================================== */

@media (max-width: 768px) {
    .booking-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .calendar-day {
        width: auto;
        height: 36px;
        font-size: 13px;
    }

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

@media (max-width: 480px) {
    .time-slots-grid {
        grid-template-columns: 1fr 1fr;
    }

    .calendar-day {
        height: 32px;
        font-size: 12px;
    }
}

/* ==========================================
   CONTACT PAGE
   ========================================== */

@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-info {
        order: 2;
    }

    .contact-form-wrapper {
        order: 1;
    }
}

/* ==========================================
   ACADEMY PAGE — Programs Grid
   ========================================== */

@media (max-width: 900px) {
    .programs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .academy-hero-title {
        font-size: clamp(26px, 7vw, 44px);
    }

    .program-card {
        padding: 28px 20px;
    }

    .program-features {
        padding-left: 16px;
    }
}

/* ==========================================
   ABOUT PAGE — Expertise Grid (3 → 2 → 1)
   ========================================== */

@media (max-width: 900px) {
    .expertise-enterprise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .expertise-enterprise-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   ENROLLMENT PAGE
   ========================================== */

@media (max-width: 768px) {
    .enrollment-form-grid {
        grid-template-columns: 1fr;
    }

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

/* ==========================================
   GENERAL UTILITY — Touch & Spacing
   ========================================== */

@media (max-width: 768px) {

    /* Bigger tap targets */
    .btn,
    .cta-primary-btn,
    .cta-secondary-btn,
    .btn-enterprise-cta {
        min-height: 48px;
    }

    /* Remove hover transforms on touch */
    .service-card:hover,
    .expertise-enterprise-card:hover,
    .program-card:hover {
        transform: none;
    }

    /* Tighten section padding */
    :root {
        --section-padding: 72px 0;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 56px 0;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ==========================================
   iOS & ANDROID SPECIFIC FIXES
   ========================================== */

/* Remove blue tap highlight on all tappable elements */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Prevent iOS Safari from auto-zooming on form inputs (requires font-size >= 16px) */
@media (max-width: 768px) {

    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Smooth momentum scrolling on iOS */
    body {
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent text size adjustment on orientation change */
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
}

/* iOS Safe Area — footer padding for notch & home indicator */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
}

/* ==========================================
   VERY SMALL SCREENS (320px — iPhone SE)
   ========================================== */

@media (max-width: 380px) {
    .hero-title {
        font-size: 26px;
    }

    .vision-enterprise-content {
        padding: 32px 20px;
    }

    .navbar-logo-img {
        height: 44px;
    }

    .btn,
    .cta-primary-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    .section-title,
    .page-title {
        font-size: 22px;
    }

    .service-card {
        padding: 20px 16px;
    }
}