/* Mobile Styles - Optimized for iPhone 12 Pro (390x844) and similar devices */

/* Hide mobile menu on desktop */
.mobile-menu-overlay {
    display: none;
}

@media screen and (max-width: 480px) {
    body {
        font-size: 16px;
    }

    main {
        padding: 0 20px;
    }

    /* Header Styles */
    .header-top {
        /* padding: 10px 20px; */
    }

    /* Hide desktop navigation and language selector on mobile */
    .navbar,
    .language-selector {
        display: none !important;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex !important;
        justify-content: center;
        align-items: center;
        width: 30px;
        height: 30px;
        background: url('../images/MOBILE/1-17.png') center center / contain no-repeat;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    /* Make menu toggle dark on non-index pages */
    .business-page .mobile-menu-toggle,
    .we-page .mobile-menu-toggle,
    .join-page .mobile-menu-toggle {
        filter: invert(1);
    }

    .mobile-menu-toggle span {
        display: none;
    }

    /* Hamburger animation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

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

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }


    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: #F05A22;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        backdrop-filter: blur(10px);
        padding: 40px 20px;
    }

    .mobile-menu-overlay.active {
        transform: translateX(0);
    }

    /* Mobile menu content container */
    .mobile-menu-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        height: 100%;
        justify-content: center;
        gap: 30px;
    }

    /* Mobile menu sections */
    .mobile-menu-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .mobile-nav-section,
    .mobile-contact-section {
        align-items: flex-start;
        text-align: left;
    }

    .mobile-language-section {
        align-items: flex-end;
        text-align: right;
    }

    /* Border between sections */
    .mobile-menu-border {
        height: 1px;
        background-color: rgba(255, 255, 255, 0.3);
        width: 100%;
        margin: 0;
    }

    /* Close button */
    .mobile-menu-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        /* border: 1px solid #fff; */
        color: #fff;
        font-size: 22px;
        font-weight: 700;
        cursor: pointer;
        padding: 8px 16px;
        border-radius: 20px;
        transition: background-color 0.3s ease;
        text-decoration: underline;
    }

    .mobile-menu-close:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Mobile menu navigation */
    .mobile-nav {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        width: 100%;
    }

    .mobile-nav a {
        color: #fff;
        text-decoration: none;
        font-size: 32px;
        font-weight: 700;
        text-transform: uppercase;
        transition: color 0.3s ease;
        position: relative;
    }

    .mobile-nav a:hover {
        color: #ccc;
    }

    .mobile-nav a::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: #fff;
        transition: width 0.3s ease;
    }

    .mobile-nav a:hover::after {
        width: 100%;
    }

    /* Mobile contact section */
    .mobile-contact {
        width: 100%;
        color: #fff;
    }

    .mobile-contact h4 {
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        margin: 0 0 15px 0;
        text-transform: uppercase;
    }

    .mobile-contact span {
        display: block;
        color: #fff;
        font-size: 14px;
        margin-bottom: 5px;
    }

    .mobile-contact-details {
        margin-top: 15px;
    }

    .contact-item {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
    }

    .contact-item span {
        color: #fff;
        font-size: 14px;
        margin: 0;
        min-width: 50px;
    }

    .contact-item a {
        color: #fff;
        text-decoration: none;
        font-size: 14px;
        transition: color 0.3s ease;
    }

    .contact-item a:hover {
        color: #ccc;
    }

    /* Mobile language selector */
    .mobile-language-selector {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 12px;
        width: 100%;
    }

    .mobile-language-selector .lang-btn {
        background: transparent;
        border: none;
        color: #fff;
        font-size: 16px;
        padding: 2px 4px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .mobile-language-sector .lang-btn::before {
        content: '';
        display: inline-block;
        width: 6px;
        height: 6px;
        transition: all 0.3s ease;
    }

    .mobile-language-selector .lang-btn.active::before {
        background-color: #fff;
    }

    section {
        padding: 20px 0;
    }

    section:first-child {
        padding-top: 20px;
    }

    section:last-child {
        padding-bottom: 20px;
    }

    /* Section 1 - Stack vertically */
    .section-1-layout {
        flex-direction: column;
        gap: 30px;
    }

    .index-page .section-1-left,
    .index-page .section-1-right {
        width: 100%;
    }

    .index-page .section-1-left {
        display: none;
    }

    .index-page .section-1-right {
        padding-left: 0;
    }

    .index-page .section-1-right-top {
        font-size: 18px;
    }

    .index-page .section-1-right-bottom {
        display: grid;
        grid-template-columns: 2fr 1fr;
        grid-template-rows: auto auto;
        gap: 15px;
        align-items: flex-start;
        border-top: none;
        min-height: 200px;
        padding-top: 30px;
    }

    .index-page .section-1-right-bottom-left {
        width: 100%;
        font-size: 36px;
        grid-column: 1;
        grid-row: 1;
    }

    .index-page .section-1-right-bottom-border {
        grid-column: 1 / -1;
        grid-row: 1;
        align-self: end;
        height: 2px;
        background-color: #ddd;
        margin-top: 15px;
    }

    .index-page .section-1-right-bottom-mid {
        grid-column: 1;
        grid-row: 2;
    }

    .index-page .section-1-right-bottom-right {
        grid-column: 2;
        grid-row: 2;
        text-align: right;
    }

    /* Index page Section 3 blocks - Stack vertically */
    .index-page .section-3-blocks {
        flex-direction: column;
        gap: 30px;
    }

    .index-page .section-3-block {
        min-height: 201px;
        padding: 30px;
    }

    .index-page .section-3-block .block-title {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .section-5 {
        padding: 40px 20px;
    }

    .section-5-box {
        padding: 20px 10px;
    }

    /* Sliders - Mobile adjustments */
    .swiper.projects-slider {
        padding: 0 10px;
        margin: 0 -10px;
    }

    .swiper.projects-slider .swiper-slide {
        width: 95% !important;
        max-width: 300px;
    }

    .swiper.news-slider {
        padding: 0 10px;
        margin: 0 -10px;
    }

    .swiper.news-slider .swiper-slide {
        width: 90% !important;
        max-width: 280px;
    }

    /* Enable touch scrolling for mobile */
    .swiper {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .swiper-wrapper {
        transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    }

    /* Middle block - Stack vertically on mobile */
    .middle-block {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px;
        padding: 20px 0;
    }

    .middle-block-col-right {
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }

    /* Footer - Mobile adjustments */
    .footer {
        background-size: contain;
        align-items: flex-start !important;
        padding-top: 120px !important;
        position: relative;
    }

    .footer .container {
        position: relative;
        z-index: 2;
    }

    /* Ensure the gradient overlay works properly on mobile */
    .footer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 50%);
        pointer-events: none;
        z-index: 1;
    }

    /* Add logo to top of footer-top on mobile */
    .footer-top::before {
        content: '';
        display: none;
        height: 65px;
        margin: 0 auto 10px auto;
        background-image: url('../images/MOBILE/1-14.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    /* Move logo above footer-top */
    .footer-left {
        display: none;
    }

    .footer-content {
        max-width: 95%;
        padding: 10px 0;
        margin-top: 20px;
        position: relative;
        z-index: 2;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 8px;
        padding: 20px 10px 10px 10px;
    }

    .footer-right {
        flex-direction: row;
        gap: 10px;
        width: 100% !important;
        /* Full width */
        flex: 1;
        text-align: left;
    }

    /* Hide the first footer-column (EXPLORE section) */
    .footer-column:first-child {
        display: none !important;
    }

    .footer-column {
        flex: 1 !important;
        font-size: 10px;
    }

    .footer-contact {
        width: 65%;
    }

    .footer-bottom {
        font-size: 10px;
        padding-top: 10px;
    }

    .footer-column h4 {
        margin-bottom: 10px;
    }

    /* Buttons - Mobile friendly sizing */
    .btn-with-icon {
        width: 100px;
        height: 30px;
        font-size: 11px;
        gap: 4px;
        padding: 0;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    }

    .btn-with-icon::before {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
    }

    .footer-button .btn-with-icon {
        width: 130px;
    }

    .footer-button .btn-with-icon::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 10.5px;
        height: 10.5px;
        background: linear-gradient(135deg, transparent calc(50% - 0.7px), white calc(50% - 0.7px), white calc(50% + 0.7px), transparent calc(50% + 0.7px));
        z-index: 1;
    }

    .btn-with-icon img {
        width: 8px !important;
        height: 8px !important;
    }

    .section-title {
        font-size: 32px;
    }

    .index-page .section3-header {
        width: 100%;
    }

    .index-page .section-3-description {
        font-size: 16px;
        margin: 20px 0;
    }

    .block-title {
        font-size: 18px;
    }

    .block-description {
        font-size: 14px;
    }

    .index-page .header-bottom-left {
        padding: 10px 20px;
    }

    .index-page .header-bottom-right {
        width: 100%;
    }

    .header-with-bg {
        min-height: 55vh;
        background: url(../images/MOBILE/1-07.png) center center / cover no-repeat;
    }

    .card-content {
        font-size: 14px;
    }

    .card-header {
        padding: 0 20px;
    }

    .card-title {
        padding: 0 20px;
    }

    .card-description {
        padding: 0 20px;
    }

    .update-card {
        min-height: 350px;
    }

    .update-card.active {
        background-image: url('../images/MOBILE/1-10.png');
    }

    .we-page .header-bottom-image img {
        height: auto;
    }

    .vision-left,
    .vision-right {
        padding-left: 0;
    }

    .vision-left .vision-image {
        height: 220px;
    }

    .vision-right .vision-image {
        height: 220px;
    }

    .vision-image img {
        height: 200px;
    }

    /* Vision mobile layout: 2 rows with image+subtitle on first row, description on second */
    .vision-text-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .vision-top-row {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .vision-image {
        flex-shrink: 0;
        width: 100px !important;
        height: auto !important;
    }

    .vision-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }

    .vision-subtitle {
        flex: 1;
        margin-bottom: 0;
        font-size: 32px;
    }

    .vision-description {
        width: 100%;
    }

    /* Business Page */
    .production-row {
        flex-direction: column;
        gap: 20px;
        padding: 20px 0;
        align-items: flex-start;
    }

    .production-step {
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 20px;
    }

    .production-step img {
        height: 50px;
        width: auto;
    }

    .production-content {
        order: 2;
        padding: 0;
        width: 100%;
    }

    .production-image-right {
        order: 1;
    }

    .production-row h1 {
        font-size: 24px;
    }

    /* Partners Grid Mobile Styles */
    .partners-grid {
        gap: 20px;
    }

    .partner-block {
        flex: 0 0 calc(50% - 10px);
        min-height: 150px;
    }

    .partner-block img {
        height: auto;
    }

    .join-page .section-1 .container {
        width: 100%;
    }

    .join-page .section-title {
        text-align: left;
    }

    .hiring-sections {
        width: 100%;
    }

    .hiring-section {
        gap: 20px;
    }


    .project-footer {
        flex-direction: column;
        align-items: baseline;
        gap: 0px;
        margin-top: 10px;
    }

    .scroll-to-top-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .scroll-to-top-btn img {
        width: 25px;
        height: 25px;
    }

    .section-1-layout {
        flex-direction: column;
        min-height: auto;
    }

    /* Remove transforms for projects page sections on mobile */
    .projects-page.section-1,
    .projects-page.section-2 {
        transform: none;
    }

    .projects-page .header-bottom-image {
        display: none;
    }

    .footer {
        padding: 40px 0 20px;
        min-height: auto;
    }

    /* .footer-top {
        padding: 40px 20px;
    } */

    .footer-title {
        font-size: 32px;
    }

    .footer-description {
        width: 100%;
    }

    .footer-right {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-3-blocks {
        flex-direction: column;
        gap: 20px;
    }

    .localization-content {
        flex-direction: column;
        gap: 30px;
    }

    .passion-content {
        flex-direction: column;
        gap: 30px;
    }

    .vision-content {
        flex-direction: column;
        gap: 40px;
    }

    .vision-label {
        font-size: 20px;
    }

    .process-blocks-wrapper {
        max-width: 100%;
        gap: 20px;
    }

    .process-block {
        padding: 10px;
        flex-direction: row;
        gap: 20px;
        align-items: center;
        clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
        font-size: 18px;
    }

    .process-number {
        min-width: 0;
    }

    .process-download-btn {
        padding: 0;
    }

    .process-sub-block {
        padding: 0 30px;
    }

    .process-sub-block.show {
        padding: 20px 30px;
        max-height: 300px;
        /* Allow more height on mobile for longer text */
    }

    .business-page .header-bottom-left .header-bottom-text {
        width: 100%;
    }

    .projects-page .header-bottom-left .header-bottom-text {
        width: 65%;
    }

    .header-bottom-large-text {
        font-size: 36px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .navbar {
        top: 70px;
    }

    .footer-title {
        font-size: 28px;
    }

    .production-image-left,
    .production-image-right {
        width: 100%;
        /* max-width: 300px; */
        height: auto;
    }

    .projects-page.section-1,
    .projects-page.section-2 {
        padding: 20px 0;
    }

    .project-background-text {
        animation: none;
        display: none;
    }

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

/* Landscape Mode for iPhone 12 Pro and similar devices (844x390) */
@media screen and (orientation: landscape) and (max-height: 480px) {

    /* Base adjustments */
    body {
        font-size: 16px;
    }

    main {
        padding: 0 40px;
    }

    /* Header */
    .header-top {
        padding: 20px 40px;
    }

    .nav-controls-group {
        gap: 15px;
        /* right: 10px; */
        /* top: 5px; */
    }

    .nav-list li a {
        font-size: 20px;
    }

    .lang-btn {
        font-size: 12px;
    }

    .mobile-menu-toggle {
        width: 18px;
        height: 18px;
    }

    .header-bottom-row {
        padding: 20px 40px;
        min-height: 50px;
    }

    .header-bottom-large-text {
        font-size: 36px;
    }

    .header-bottom-medium-text {
        font-size: 22px;
    }

    .header-bottom-normal-text {
        font-size: 11px;
    }

    .header-bottom-right-left {
        padding: 10px 40px;
        font-size: 10px;
    }

    .header-bottom-right-right {
        padding: 10px 40px;
    }

    .index-page .header-bottom-left {
        padding: 20px 0 20px 40px;
    }

    .we-page .header-bottom-image img {
        height: auto;
    }

    /* Mobile menu adjustments */
    .mobile-menu-overlay {
        padding: 15px 10px;
    }

    .mobile-menu-close {
        top: 8px;
        right: 10px;
        font-size: 10px;
        padding: 4px 8px;
    }

    .mobile-menu-content {
        gap: 15px;
    }

    .mobile-nav a {
        font-size: 16px;
    }

    .mobile-contact h4 {
        font-size: 8px;
        margin-bottom: 5px;
    }

    .mobile-contact span,
    .contact-item span,
    .contact-item a {
        font-size: 7px;
    }

    .mobile-language-selector .lang-btn {
        font-size: 8px;
    }

    /* Sections */
    section {
        padding: 20px 0;
    }

    section:first-child {
        padding-top: 20px;
    }

    section:last-child {
        padding-bottom: 20px;
    }

    .section-title {
        font-size: 36px;
        margin-bottom: 10px;
    }

    /* Section 1 */
    .section-1-layout {
        min-height: auto;
    }

    .index-page .section-1-right {
        padding-left: 20px;
    }

    .index-page .section-1-right-top {
        font-size: 16px;
    }

    .index-page .section-1-right-bottom {
        gap: 8px;
        padding-top: 10px;
        min-height: auto;
    }

    .index-page .section-1-right-bottom-left {
        font-size: 24px;
    }

    .index-page .section-1-right-bottom-mid,
    .index-page .section-1-right-bottom-right {
        font-size: 16px;
    }

    /* Section 3 */
    .index-page .section3-header {
        width: 80%;
    }

    .index-page .section-3-description {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .index-page .section-3-blocks {
        gap: 10px;
    }

    .index-page .section-3-block {
        padding: 10px;
    }

    .index-page .section-3-block .block-title {
        font-size: 24px;
        margin-bottom: 10px;
    }


    .index-page .section-3-block .block-description {
        font-size: 14px;
    }

    /* Section 5 */
    .section-5 {
        padding: 40px 80px;
    }

    .section-5-box {
        padding: 40px 20px;
    }

    /* Middle blocks */
    .middle-block {
        gap: 8px;
        padding: 8px 0;
    }

    /* Cards */
    .update-card {
        min-height: 200px;
    }

    .card-header,
    .card-title,
    .card-description {
        padding: 0 10px;
    }

    .card-content {
        font-size: 10px;
        padding-top: 10px;
    }

    .card-footer {
        padding: 20px 10px 10px 10px;
    }

    .card-footer,
    .card-footer::before,
    .card-footer-wrapper {
        clip-path: polygon(0 5px, 40% 10px, 60% 0px, 68% 3px, 80% 0px, 100% 5px, 100% 100%, 0 100%);
    }

    .card-footer-left {
        font-size: 14px;
    }

    /* Vision sections */
    .vision-content {
        gap: 15px;
    }

    .vision-left,
    .vision-right {
        padding-left: 80px;
    }

    .vision-left .vision-image,
    .vision-right .vision-image {
        height: 160px;
    }

    .vision-image img {
        height: 150px;
    }

    .vision-label {
        font-size: 22px;
    }

    .vision-subtitle {
        font-size: 32px;
    }

    /* Business page */
    .production-row {
        gap: 10px;
        padding: 10px 20px;
    }

    .production-row h1 {
        font-size: 24px;
        width: 150px;
    }

    .production-content {
        width: 300px;
    }

    .production-image-right {
        width: 30%;
        height: auto;
    }

    .production-step {
        gap: 10px;
    }

    .production-step img {
        height: 50px;
    }

    /* Process blocks */
    .process-blocks-wrapper {
        gap: 8px;
    }

    .process-block {
        padding: 5px;
        gap: 8px;
        font-size: 32px;
        clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%);
    }

    .process-sub-block {
        padding: 0 12px;
        font-size: 16px;
    }

    .process-sub-block.show {
        padding: 8px 12px;
        max-height: 100px;
    }

    /* Partners */
    .partner-block {
        min-height: 60px;
    }

    /* Localization & Passion */
    .localization-content,
    .passion-content {
        gap: 12px;
    }

    .project-image {
        max-width: 360px;
    }

    .projects-page.section-1 {
        transform: translateX(-150px);
    }

    .projects-page.section-2 {
        transform: translateX(150px);
    }

    .project-background-text {
        animation: none;
        display: none;
    }

    /* Join/Hiring page */
    .join-page .section-1 .container {
        width: 650px;
    }

    .hiring-sections {
        width: 100%;
    }

    .hiring-section {
        padding: 8px 0;
        gap: 10px;
    }

    .hiring-description {
        margin-bottom: 15px;
    }

    .hiring-description p {
        margin-bottom: 5px;
    }

    .card-header {
        margin-bottom: 10px;
    }

    .card-title {
        margin-bottom: 10px;
    }

    .card-description {
        margin-bottom: 10px;
    }

    /* Buttons */
    .btn-with-icon {
        width: 100px;
        height: 30px;
        font-size: 11px;
        gap: 4px;
        padding: 0;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    }

    .btn-with-icon::before {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
    }

    .footer {
        min-height: 130vh;
    }

    .footer-button .btn-with-icon {
        width: 130px;
    }

    .footer-button .btn-with-icon::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 10.5px;
        height: 10.5px;
        background: linear-gradient(135deg, transparent calc(50% - 0.7px), white calc(50% - 0.7px), white calc(50% + 0.7px), transparent calc(50% + 0.7px));
        z-index: 1;
    }

    .btn-with-icon img {
        width: 8px !important;
        height: 8px !important;
    }

    /* Scroll to top */
    .scroll-to-top-btn {
        width: 25px;
        height: 25px;
        bottom: 10px;
        right: 10px;
    }

    .scroll-to-top-btn img {
        width: 12px;
        height: 12px;
    }

    /* Footer */
    .footer {
        padding-bottom: 10px;
    }

    .footer-top::before {
        height: 25px;
        margin: 0 auto 5px auto;
    }

    .footer-title {
        font-size: 48px;
        margin-bottom: 5px;
    }

    .footer-description {
        width: 75%;
        font-size: 16px;
        margin: 8px auto;
    }

    .footer-content {
        min-width: 95%;
        padding: 10px 0;
        margin-top: 20px;
    }

    .footer-left {
        padding-left: 0;
    }

    .footer-right {
        gap: 15px;
    }

    .footer-column {
        font-size: 10px;
    }

    .footer-column h4 {
        margin-bottom: 10px;
        font-size: 10px;
    }

    .address-link {
        display: inline;
        white-space: normal;
    }

    .footer-bottom {
        font-size: 10px;
        padding-top: 10px;
    }

    /* Logo */
    .logo h1 {
        font-size: 10px;
    }
}