/* Mobile Media Queries - Max Width 430px */
@media (max-width: 450px) {

    /* Base adjustments */
    * {
        box-sizing: border-box;
    }

    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    iframe{
        width: 100%!important;
        height: 600px;
    }

    #datawrapper-chart-GiEPa{
        height: 325px!important;
    }

    /* Mobile Navbar - Stacked Layout */
    .navbar {
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
        background-color: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    /* Top row: Email & Phone + Login Button */
    .info-bar {
        display: none;
        justify-content: space-between;
        align-items: center;
        padding: 8px 15px;
        background-color: #f8f9fa;
        font-size: 11px;
        border-bottom: 1px solid #eee;
        height: 35px;
    }

    .contact-info {
        display: flex;
        gap: 15px;
        align-items: center;
    }

    .phone,
    .mail {
        margin: 0;
        font-size: 11px;
        color: #555;
    }

    .support-social {
        display: none;
        /* Hide social icons to save space */
    }

    .info-bar .login-btn {
        padding: 4px 12px;
        font-size: 10px;
        border-radius: 15px;
        margin: 0;
        min-width: 50px;
        height: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .login-btn{
        display: none!important;
    }
    /* Second row: Logo */
    .logo-row {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 15px;
        background-color: white;
        border-bottom: 1px solid #eee;
        height: 60px;
    }

    .trapezoid-logo {
        position: relative;
        width: auto;
        height: 93px;
        background: none;
        clip-path: none;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .trapezoid-logo img {
        width: 185px;
        height: auto;
        margin: 0;
    }

    /* Third row: Navigation */
    .main-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0px;
        background-color: white;
        border-bottom: 1px solid #eee;
        height: 55px;
        /* padding-left: 15px; */
        flex-direction: column;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        margin: 0;
        align-items: center;
        justify-content: center;
        gap:15px;
    }

    .nav-links a {
        margin: 0;
        font-size: 11px;
        border-bottom: none;
        white-space: nowrap;
        text-decoration: none;
        color: #333;
        border-radius: 15px;
        transition: all 0.3s ease;
    }

    .nav-links a:hover {
        background-color: rgba(0, 123, 255, 0.1);
        color: var(--primary-color);
    }

    /* Remove the second login button from nav-links */
    .nav-links .login-btn {
        display: none;
    }

    /* Hide some nav items on very small screens */
    .nav-links a:nth-child(n+6) {
        display: none;
    }

    /* Hero Section Mobile - Adjust for new navbar height */
    .new-hero {
        height: 70vh;
        margin-top: 140px;
        /* Account for all three rows */
        padding: 20px 15px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .new-hero::after {
        background-attachment: scroll;
        background-size: cover;
        background-position: center;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 10px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 15px;
        line-height: 1.2;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 25px;
        line-height: 1.4;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    }

    .hero-cta {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .primary-btn,
    .secondary-btn {
        width: 250px;
        text-align: center;
        margin: 5px 0;
        padding: 15px 25px;
        font-size: 16px;
        border-radius: 30px;
    }

    /* Stats Overview Mobile */
    .stats-overview {
        flex-direction: column;
        height: 95vh!important;
        margin-top: 30px;
        padding: 30px 15px;
        gap: 40px;
        width: 100%;
    }

    .left {
        width: 100%;
        margin-left: 0;
        padding: 20px 15px;
        text-align: center;
    }

    .left h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
        padding: 10px 0;
    }

    .left .des {
        font-size: 14px;
        padding: 15px 10px;
        border-left: none;
        border-top: var(--primary-color) solid 3px;
        padding-top: 15px;
        line-height: 1.5;
    }

    .right {
        height: auto;
        width: 100%;
    }
    /* Carousel Mobile */
    .carousel {
        margin: 40px 0;
        height: 280px;
        overflow: hidden;
    }

    .carousel-track {
        width: 100vw;
        height: 280px;
        padding: 0 10px;
    }

    .carousel-track-left,
    .carousel-track-right {
        gap: 20px;
        margin-top: 15px;
    }

    .tile {
        width: 110px;
        height: 110px;
        margin-right: 8px;
        padding: 12px;
        border-radius: 15px;
        flex-shrink: 0;
    }

    .tile i {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .tile span {
        font-size: 11px;
        font-weight: 600;
        line-height: 1.2;
    }

    /* Impact Section Mobile */
    .impact {
        flex-direction: column;
        height: auto;
        width: 100%;
        gap: 40px;
        padding: 30px 15px;
        margin: 30px 0;
    }

    .impact .heading {
        text-align: center;
        width: 100%;
    }

    .impact .heading h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 25px;
        margin: 20px 0;
        width: 100%;
        padding: 0 10px;
    }

    .block {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        height: 185px;
        padding: 20px;
    }

    .block p {
        font-size: 16px;
        margin: 8px 0;
    }

    .block h2 {
        font-size: 24px;
        margin: 8px 0;
    }

    .block i {
        font-size: 36px;
        margin: 8px 0;
    }

    /* Steps Section Mobile */
    .steps-section {
        padding: 40px 0;
    }

    .steps-section h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
        padding: 0 20px;
    }

    .process-steps {
        flex-direction: column;
        gap: 25px;
        padding: 20px 15px;
        margin-top: 0;
    }

    .process-tile {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        min-height: 200px;
        padding: 30px 20px;
        margin-top: 0;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 16px;
        top: 15px;
        left: 15px;
    }

    .step-icon {
        width: 65px;
        height: 65px;
        margin-bottom: 15px;
        margin-top: 20px;
    }

    .step-icon i {
        font-size: 30px;
    }

    .process-tile h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .process-tile p {
        font-size: 14px;
        line-height: 1.5;
    }

    /* Testimonials Mobile */
    .testimonials-section {
        padding: 40px 20px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.5;
    }

    .testimonials-grid {
        gap: 20px;
    }

    .testimonial-card {
        padding: 25px 20px;
    }

    .testimonial-text {
        font-size: 14px;
        line-height: 1.6;
    }

    /* Helpline Section Mobile */
    .helpline-section {
        padding: 40px 0;
    }

    .helpline-section h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
        padding: 0 20px;
    }

    .helpline-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .helpline-card {
        padding: 25px 20px;
        min-height: 180px;
    }

    .helpline-emoji {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .helpline-card h3 {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .helpline-btn {
        padding: 14px 30px;
        font-size: 16px;
        width: 85%;
        max-width: 200px;
        border-radius: 25px;
    }

    /* Near Me Section Mobile */
    .near-me-section {
        padding: 40px 0;
    }

    .near-me-section h2 {
        font-size: 1.8rem;
        padding: 0 20px;
        margin-bottom: 30px;
    }

    .near-me-container {
        padding: 0 15px;
    }

    .near-me-options {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .near-me-btn {
        width: 90%;
        max-width: 220px;
        padding: 15px 20px;
    }

    .near-me-btn i {
        font-size: 22px;
        margin-bottom: 5px;
    }

    .near-me-btn span {
        font-size: 14px;
    }

    .near-me-map {
        height: 600px;
        margin-top: 25px;
    }

    .map-placeholder i {
        font-size: 40px;
    }

    .map-placeholder p {
        font-size: 16px;
        margin-top: 10px;
    }

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

    .footer-content {
        flex-direction: column;
        padding: 0 20px;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 25px;
        min-width: auto;
    }

    .footer-section h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-section ul li {
        margin-bottom: 8px;
    }

    .footer-section ul li a {
        font-size: 14px;
    }

    .footer-section p {
        font-size: 14px;
        line-height: 1.5;
    }

    .footer-bottom {
        padding: 15px;
        margin-top: 15px;
    }

    .footer-bottom p {
        font-size: 13px;
    }

    /* CTA Buttons Mobile */
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
        align-items: center;
    }

    .btn {
        width: 85%!important;
        max-width: 250px;
        text-align: center;
        padding: 15px 25px;
    }

    /* Mobile utility classes */
    .mobile-hidden {
        display: none;
    }

    .mobile-center {
        text-align: center;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    /* Fix overflow issues */
    .carousel-track,
    .new-hero,
    .stats-overview,
    .impact {
        overflow: hidden;
    }

    /* Improve touch targets */
    .nav-links a,
    .helpline-btn,
    .near-me-btn,
    .primary-btn,
    .secondary-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        margin: auto;
    }

    /* Override min-height for nav links to fit in smaller navbar */
    .nav-links a {
        min-height: 30px;
    }

    /* Section spacing */
    section {
        margin-bottom: 20px;
    }

    /* Ensure proper container widths */
    .container,
    .stats-overview,
    .impact {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Additional breakpoint for very small devices (320px and below) */
@media (max-width: 320px) {
    .info-bar {
        padding: 6px 10px;
        height: 30px;
    }

    .logo-row {
        padding: 8px 10px;
        height: 50px;
    }

    .trapezoid-logo img {
        width: 100px;
    }

    .main-nav {
        height: 40px;
        padding: 6px 10px;
    }

    .nav-links a {
        font-size: 10px;
        padding: 4px 8px;
    }

    .info-bar .login-btn {
        font-size: 9px;
        padding: 3px 8px;
        min-width: 45px;
        height: 20px;
    }

    .new-hero {
        margin-top: 120px;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    /* Hide even more nav items on very small screens */
    .nav-links a:nth-child(n+4) {
        display: none;
    }
}

/* Tablet breakpoint (431px to 768px) */
@media (min-width: 450px) and (max-width: 768px) {
    .info-bar {
        display: flex;
        padding: 8px 20px;
        font-size: 12px;
        height: 40px;
    }

    .logo-row {
        height: 70px;
        padding: 15px 20px;
    }

    .trapezoid-logo img {
        width: 140px;
    }

    .main-nav {
        height: 50px;
        padding: 10px 20px;
    }

    .nav-links a {
        font-size: 13px;
        padding: 8px 12px;
    }

    .info-bar .login-btn {
        font-size: 12px;
        padding: 6px 15px;
        height: 28px;
    }
}
