/* ==========================================
   MOBILE.CSS
   Load this AFTER styles.css:
   <link rel="stylesheet" href="styles.css">
   <link rel="stylesheet" href="mobile.css">

   Everything here is scoped inside media queries, so it
   only ever affects small screens — styles.css and the
   desktop experience are completely untouched.

   Design intent for mobile:
   · Tighter, consistent vertical rhythm (60px section padding
     instead of desktop's 100-140px)
   · One clear type scale (h2 ~1.6-1.9rem, body ~0.85-0.95rem)
   · Everything heavy/decorative that adds no value on a phone
     (3D model, cursor trail, particle canvas, parallax) is removed
   · Cards sized to their content instead of stretching tall
   · Single-column layouts everywhere so nothing feels cramped
========================================== */

@media (max-width: 768px) {

    /* ==========================================
       SAFETY NET — prevents horizontal overflow /
       "page looks too big" issues from fixed px widths
       and long unbroken strings.
    ========================================== */
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    * {
        max-width: 100%;
    }

    img, svg, canvas, video {
        max-width: 100%;
        height: auto;
    }

    a, .contact-card-text strong, .footer-contact-item {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .stats-container,
    .contact-container,
    .timeline,
    .testimonials-grid,
    .services-grid,
    .package-grid,
    .faq-grid-wrapper,
    .footer-main-grid {
        max-width: 100% !important;
    }

    /* ==========================================
       GLOBAL RHYTHM
    ========================================== */
    section {
        padding: 60px 6%;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header span,
    .section-tag,
    .faq-tag-pill,
    .contact-tag-pill,
    .portfolio-tag {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }

    .section-header h2,
    .portfolio-header h2,
    .faq-header h2 {
        font-size: 1.7rem;
        margin-top: 12px;
        margin-bottom: 10px;
        line-height: 1.25;
    }

    .section-header p,
    .portfolio-header p,
    .faq-header p {
        font-size: 0.9rem;
        line-height: 1.55;
        padding: 0 6px;
    }

    /* Kill everything purely decorative/expensive that adds
       no value on touch devices */
    .cursor-glow-container,
    .trail-settings-panel,
    .bg-blur,
    #bgParticles {
        display: none !important;
    }

    /* ==========================================
       HEADER
    ========================================== */
    .header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 12px 5%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 1001;
    }

    .header .studio-logo-img {
        height: 40px;
    }

    /* Push page content down so the fixed header doesn't cover the hero */
    body {
        padding-top: 64px;
    }

    /* Nav links become a slide-down panel, hidden by default */
    .header .navbar {
        display: flex !important;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(5, 8, 22, 0.97);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(255,255,255,0.08);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.25s ease, visibility 0.3s;
        z-index: 1000;
        pointer-events: none;
    }

    .header .navbar.mobile-open {
        max-height: 320px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        overflow-y: auto;
    }

    .header .navbar a {
        padding: 14px 6%;
        border-top: 1px solid rgba(255,255,255,0.06);
        font-size: 0.95rem;
        text-align: left;
    }

    /* Trim header actions down to fit next to the hamburger */
    .header-actions {
        gap: 8px !important;
    }

    .header-actions .order-btn {
        padding: 8px 12px;
        font-size: 0.78rem;
        border-radius: 8px;
        white-space: nowrap;
    }

    .header-actions .order-btn .btn-text {
        display: none;
    }

    .nav-signin-link {
        font-size: 0.82rem;
        padding: 6px 10px !important;
    }

    #headerAvatarDisplay {
        width: 34px !important;
        height: 34px !important;
        font-size: 1rem !important;
    }

    #headerDropdownPanel {
        width: 200px !important;
        right: -6px !important;
    }

    /* Hamburger toggle */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        padding: 4px 6px;
        order: 3;
    }

    /* ==========================================
       HERO — 3D model removed entirely
    ========================================== */
    .hero {
        min-height: 82vh;
        padding-top: 72px;
        padding-bottom: 56px;
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }

    .hero-image,
    .hero-model-wrapper,
    #heroCanvas,
    .model-loader {
        display: none !important;
    }

    .hero-content {
        padding-left: 0;
        margin-top: 0;
        max-width: 100%;
    }

    .hero-tag {
        font-size: 0.68rem;
        padding: 7px 14px;
        margin-bottom: 18px;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: 18px;
    }

    .slide-text-wrapper {
        height: 1.3em;
        line-height: 1.3em;
    }

    .hero-content p {
        font-size: 0.9rem;
        max-width: 100%;
        margin-bottom: 26px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        padding: 13px 20px;
        font-size: 0.9rem;
    }

    /* ==========================================
       STATS
    ========================================== */
    .stats-section {
        margin-top: 0;
        padding: 30px 0 34px;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px 12px;
        padding: 0 16px;
    }

    .stat-card {
        padding: 10px;
        min-width: 0;
    }

    .stat-number {
        font-size: 28px;
    }

    .stat-plus {
        font-size: 18px;
    }

    .stat-label {
        font-size: 11px;
        letter-spacing: 0.4px;
        margin-top: 6px;
        line-height: 1.2;
        word-break: break-word;
        white-space: normal;
    }

    /* ==========================================
       FEATURED PORTFOLIO
    ========================================== */
    .featured-portfolio {
        padding: 55px 0 56px;
    }

    .portfolio-header {
        margin-bottom: 32px;
        padding: 0 20px;
    }

    /* Arrows clip/overlap on narrow screens — rely on native
       touch-swipe, which the carousel already supports */
    .portfolio-arrow {
        display: none !important;
    }

    .portfolio-scroll-wrapper {
        padding: 0 20px;
    }

    .scroll-container {
        padding: 14px 0 20px;
    }

    .scroll-group {
        gap: 14px;
        padding: 0;
    }

    .portfolio-card {
        flex: 0 0 300px;
        padding: 14px;
        border-radius: 18px;
    }

    .card-media {
        height: 190px;
        border-radius: 12px;
        margin-bottom: 14px;
    }

    .portfolio-card h3 {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .portfolio-card p {
        font-size: 12.5px;
        min-height: 34px;
        margin-bottom: 12px;
        line-height: 1.45;
    }

    .portfolio-card button {
        display: block;
        margin: 0 auto;
        padding: 5px 10px;
        font-size: 10px;
        border-radius: 6px;
    }

    .portfolio-footer {
        margin-top: 36px;
    }

    .portfolio-view-more {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        padding: 14px 20px;
        font-size: 0.9rem;
    }

    /* ==========================================
       SERVICES
    ========================================== */
    .services {
        padding: 56px 6%;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .service-card {
        padding: 30px 22px;
        border-radius: 18px;
    }

    .service-logo-wrapper {
        height: 80px;
        margin-bottom: 16px;
    }

    .service-card h3 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .service-card p {
        font-size: 0.88rem;
        margin-bottom: 22px;
    }

    /* ==========================================
       TESTIMONIALS
    ========================================== */
    .testimonials {
        padding: 56px 5% 60px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .testimonial-card {
        padding: 26px 18px 28px;
        border-radius: 14px;
    }

    .avatar-wrapper {
        width: 68px;
        height: 68px;
        margin-bottom: 14px;
    }

    .client-role {
        font-size: 1rem;
    }

    .review-text {
        font-size: 0.85rem;
    }

    /* ==========================================
       SHOWCASE CTA
    ========================================== */
    .centered-showcase-section {
        padding: 60px 5%;
        min-height: auto;
    }

    .showcase-backdrop-wrapper {
        max-height: 320px;
        border-radius: 20px;
    }

    .showcase-content-overlay {
        padding: 24px;
    }

    .showcase-blue-tag {
        font-size: 0.75rem;
        letter-spacing: 2px;
    }

    .showcase-bold-title {
        font-size: 1.7rem;
        margin-bottom: 14px;
    }

    .showcase-grey-desc {
        font-size: 0.88rem;
        margin-bottom: 28px;
    }

    .showcase-action-btn {
        width: 100%;
        padding: 13px 20px;
        font-size: 0.9rem;
    }

    /* ==========================================
       PACKAGES
    ========================================== */
    .packages {
        padding: 60px 6%;
    }

    .package-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .featured {
        transform: none !important;
    }

    .featured:hover {
        transform: none !important;
    }

    .package-card {
        padding: 30px 22px 26px;
        border-radius: 22px;
    }

    .package-image-wrapper {
        height: 90px;
        margin-bottom: 18px;
    }

    .package-card h3 {
        font-size: 1.4rem;
    }

    .package-subtitle {
        font-size: 0.82rem;
        margin-bottom: 22px;
    }

    .package-features {
        margin-bottom: 24px;
    }

    .package-features li {
        font-size: 0.88rem;
        padding: 7px 0;
    }

    .price-number {
        font-size: 2.8rem;
    }

    .package-action-btn {
        padding: 13px;
    }

    /* ==========================================
       WORKFLOW / "HOW IT WORKS" TIMELINE
    ========================================== */
    .workflow {
        padding: 56px 6%;
    }

    .timeline {
        margin-top: 30px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 58px;
        margin-bottom: 26px;
        align-items: flex-start;
    }

    .timeline-icon {
        width: 44px;
        height: 44px;
        top: 0;
        transform: none;
    }

    .timeline-item:hover .timeline-icon {
        transform: scale(1.05);
    }

    .step-num {
        font-size: 0.55rem;
    }

    .step-emoji {
        font-size: 1rem;
    }

    .timeline-content-card {
        padding: 14px 16px;
        border-radius: 16px;
    }

    .timeline-content-card h3 {
        font-size: 1rem;
        margin-bottom: 5px;
        gap: 6px;
    }

    .timeline-content-card p {
        font-size: 0.78rem;
        line-height: 1.45;
    }

    .timeline-item:hover .timeline-content-card {
        transform: none;
    }

    /* ==========================================
       FAQ
    ========================================== */
    .faq-section {
        padding: 50px 5% 60px;
    }

    .faq-grid-wrapper {
        gap: 12px;
    }

    .faq-toggle-btn {
        padding: 15px 16px;
    }

    .faq-emoji-icon {
        font-size: 1.05rem;
    }

    .faq-question-text {
        font-size: 0.88rem;
    }

    .faq-inner-body p {
        padding: 0 16px 16px 16px;
        font-size: 0.83rem;
        line-height: 1.5;
    }

    /* ==========================================
       CONTACT
    ========================================== */
    .contact-section {
        padding: 54px 5.5% 60px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-info-column {
        align-items: center;
        text-align: center;
    }

    .contact-tag-pill {
        align-self: center;
    }

    .contact-main-title {
        font-size: 1.55rem;
        line-height: 1.3;
        margin-bottom: 14px;
    }

    .contact-description {
        font-size: 0.87rem;
        margin-bottom: 30px;
    }

    .contact-cards-stack {
        gap: 10px;
        width: 100%;
    }

    .contact-detail-card {
        padding: 14px 16px;
        gap: 12px;
        text-align: left;
        border-radius: 12px;
    }

    .contact-icon-box {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        border-radius: 10px;
    }

    .contact-icon-img {
        width: 18px;
        height: 18px;
    }

    .contact-card-text span {
        font-size: 0.72rem;
    }

    .contact-card-text strong {
        font-size: 0.88rem;
    }

    .contact-glass-form-card {
        padding: 18px 16px;
        border-radius: 16px;
    }

    .contact-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-input-group {
        margin-bottom: 14px;
    }

    .contact-input-group label {
        font-size: 0.78rem;
        margin-bottom: 6px;
    }

    .contact-input-group input,
    .contact-input-group select,
    .contact-input-group textarea {
        padding: 10px 12px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .contact-input-group textarea {
        min-height: 76px;
    }

    .contact-submit-btn {
        padding: 12px 18px;
        font-size: 0.88rem;
        border-radius: 10px;
    }

    .contact-dynamic-alert {
        padding: 12px 14px;
        font-size: 0.8rem;
        margin-top: 14px;
    }

    /* ==========================================
       FOOTER
    ========================================== */
    .premium-footer {
        padding: 46px 6% 0;
    }

    .footer-main-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-bottom: 40px;
    }

    .footer-block-title {
        font-size: 1.05rem;
        margin-bottom: 16px;
    }

    .brand-bio-desc {
        font-size: 0.85rem;
    }

    .copyright-bar-content {
        flex-direction: column-reverse;
        gap: 12px;
        text-align: center;
        font-size: 0.78rem;
        padding: 20px 0;
    }

    /* ==========================================
       FLOATING WIDGETS — smaller & non-intrusive
    ========================================== */
    .ai-message-cloud {
        right: 12px;
        left: 12px;
        max-width: none;
        bottom: 86px;
        padding: 12px 28px 12px 14px;
    }

    .ai-message-cloud::after {
        display: none;
    }

    .floating-helper-btn {
        right: 12px;
        bottom: 12px;
        padding: 8px 14px;
        font-size: 11px;
    }

    #chatbase-bubble-button {
        bottom: 16px !important;
        right: 16px !important;
        transform: scale(0.92) !important;
    }

    /* ==========================================
       SALE OFFER BANNER — shrink on mobile only
    ========================================== */
    .da-offer-inner {
        padding: 5px 30px 5px 10px;
        gap: 6px;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .da-offer-text {
        font-size: 0.65rem;
        line-height: 1.25;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
        flex: 1 1 auto;
    }

    .da-offer-btn {
        display: none;
    }

    .da-offer-close {
        right: 8px;
        font-size: 0.75rem;
        padding: 3px;
    }

    /* ==========================================
       PORTFOLIO LIGHTBOX MODAL
    ========================================== */
    .portfolio-modal {
        padding: 10px;
    }

    .modal-content {
        border-radius: 14px;
    }

    .modal-media img {
        max-height: 42vh;
    }

    .modal-info {
        padding: 16px 18px;
    }

    .modal-info h3 {
        font-size: 1.15rem;
    }

    .modal-info p {
        font-size: 0.85rem;
    }
}

/* ==========================================
   SMALL PHONES
========================================== */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.7rem;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px 10px;
        padding: 0 12px;
    }

    .stat-card {
        padding: 8px;
        min-width: 0;
    }

    .stat-number {
        font-size: 22px;
    }

    .stat-plus {
        font-size: 14px;
    }

    .stat-label {
        font-size: 9px;
        line-height: 1.2;
        word-break: break-word;
    }

    .portfolio-card {
        flex: 0 0 260px;
    }

    .card-media {
        height: 160px;
    }

    .package-card h3 {
        font-size: 1.25rem;
    }

    .price-number {
        font-size: 2.4rem;
    }

    .contact-main-title {
        font-size: 1.35rem;
    }
}