/* ===================================
   MOBILE OPTIMIZATION - ASV Petri Heil
   Comprehensive Mobile Responsive Styles
   =================================== */

/* Tablet Breakpoint */
@media screen and (max-width: 1024px) {
    .hero-layout {
        grid-template-columns: 200px 1fr 200px;
        gap: var(--space-xl);
    }

    .hero-logo-big {
        width: 180px;
        height: 180px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .why-visual {
        order: -1;
    }

    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Breakpoint - Main */
@media screen and (max-width: 768px) {

    /* Header Mobile */
    .header {
        height: 70px;
    }

    .logo-img {
        height: 55px;
    }

    .nav-toggle {
        display: flex !important;
    }

    /* Hamburger color for gradient header */
    .hamburger,
    .hamburger::before,
    .hamburger::after {
        background: var(--color-bg-dark) !important;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 380px;
        height: 100vh;
        background: var(--color-bg-elevated);
        padding: 100px var(--space-xl) var(--space-xl);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 999;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-link {
        padding: 16px 20px;
        font-size: 1.1rem;
        color: #fff !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        /* Arrow alignment */
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    /* DROPDOWN FIXES */
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none;
        /* Hidden by default */
        width: 100%;
        padding: 0;
        background: rgba(0, 0, 0, 0.3);
        /* Darker background */
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    .nav-item.dropdown.active .dropdown-menu {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    .dropdown-menu li a {
        padding: 12px 20px 12px 40px;
        /* Indented */
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.8);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: block;
    }

    .dropdown-menu li:last-child a {
        border-bottom: none;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .dropdown-arrow {
        color: rgba(255, 255, 255, 0.5) !important;
        transition: transform 0.3s ease;
    }

    .nav-item.dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }

    .nav-cta {
        display: none !important;
    }

    /* Hero Mobile - Logos horizontal, then text */
    .hero-epic {
        padding-top: 90px;
        padding-bottom: var(--space-xl);
        min-height: auto;
    }

    .hero-layout {
        display: flex !important;
        flex-direction: column;
        gap: var(--space-lg);
        padding: 0 var(--space-sm);
    }

    /* Mobile: Show BOTH logos in a row at the top */
    .hero-logo-side {
        order: -1;
    }

    .hero-logo-left,
    .hero-logo-right {
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }

    /* Create a flex row container effect for logos */
    .hero-logo-left {
        position: relative;
    }

    /* On mobile, both logo sides should form a row */
    @supports (display: contents) {
        .hero-layout {
            display: grid !important;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: auto auto;
            gap: var(--space-md);
        }

        .hero-logo-left {
            grid-column: 1;
            grid-row: 1;
            justify-self: end;
            padding-right: var(--space-sm);
        }

        .hero-logo-right {
            grid-column: 2;
            grid-row: 1;
            justify-self: start;
            padding-left: var(--space-sm);
        }

        .hero-epic-content {
            grid-column: 1 / -1;
            grid-row: 2;
        }
    }

    .hero-logo-big {
        width: 85px;
        height: 85px;
    }

    .logo-glow-big {
        width: 100px;
        height: 100px;
    }

    .logo-label-big {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    /* Hero Content Mobile */
    .hero-epic-content {
        order: 0;
        padding: 0;
        text-align: center;
    }

    .hero-badge-epic {
        font-size: 0.65rem;
        padding: 6px 12px;
        margin-bottom: var(--space-md);
    }

    .hero-title-epic {
        font-size: clamp(1.6rem, 6.5vw, 2.2rem) !important;
        margin-bottom: var(--space-sm);
    }

    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: var(--space-lg);
    }

    .hero-cta-group {
        flex-direction: column;
        gap: 10px;
        margin-bottom: var(--space-lg);
    }

    .btn-epic {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 0.95rem;
        min-height: 50px;
    }

    /* Hide scroll indicator on mobile */
    .hero-scroll-indicator {
        display: none !important;
    }

    /* Hide floating elements on mobile */
    .floating-elements {
        display: none !important;
    }

    /* Water effect smaller */
    .water-effect {
        height: 60px;
    }

    /* Container mobile padding */
    .container {
        padding: 0 16px;
    }

    /* Impact Section Mobile */
    .impact-section {
        padding: var(--space-2xl) 0;
    }

    .impact-header {
        margin-bottom: var(--space-xl);
    }

    .impact-title {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    .impact-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-md);
    }

    .impact-card {
        padding: var(--space-lg);
    }

    .impact-number {
        font-size: 2.2rem;
    }

    /* Experience Section Mobile */
    .experience-section {
        padding: var(--space-2xl) 0;
    }

    .section-header-centered {
        margin-bottom: var(--space-xl);
    }

    .section-title-xl {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    .section-description {
        font-size: 0.95rem;
    }

    .experience-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-md);
    }

    .experience-card {
        min-height: 200px;
    }

    .experience-card-large {
        grid-column: span 1 !important;
    }

    .experience-content {
        padding: var(--space-md);
    }

    .experience-title {
        font-size: 1.2rem;
    }

    .experience-text {
        font-size: 0.85rem;
    }

    /* Why Section Mobile */
    .why-section {
        padding: var(--space-2xl) 0;
    }

    .why-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-xl);
    }

    .why-visual {
        order: -1;
    }

    .why-title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
    }

    .why-description {
        font-size: 0.95rem;
    }

    .why-image-stack {
        height: 220px;
    }

    .why-feature {
        padding: var(--space-sm);
    }

    .why-badge {
        bottom: 0;
        right: 0;
    }

    .why-badge-inner {
        padding: 10px 14px;
    }

    .why-badge-number {
        font-size: 1.6rem;
    }

    .why-badge-text {
        font-size: 0.6rem;
    }

    /* Quote Section Mobile */
    .quote-section {
        padding: var(--space-xl) 0;
    }

    .quote-card {
        padding: var(--space-lg);
    }

    .quote-icon {
        font-size: 3rem;
        top: 8px;
        left: 8px;
    }

    .quote-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Mega CTA Mobile */
    .mega-cta {
        padding: var(--space-2xl) 0;
    }

    .mega-cta-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .mega-cta-text {
        font-size: 0.9rem;
    }

    .mega-cta-prices {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-md);
    }

    .price-badge {
        padding: var(--space-md);
        flex: 1;
        min-width: 140px;
        max-width: 160px;
    }

    .price-amount {
        font-size: 1.8rem;
    }

    .mega-cta-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .mega-cta-actions .btn-epic {
        width: 100%;
    }

    .mega-cta-trust {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }

    .trust-item {
        font-size: 0.85rem;
    }

    /* Explore Section Mobile */
    .explore-section {
        padding: var(--space-2xl) 0;
    }

    .explore-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-md);
    }

    .explore-card {
        padding: var(--space-md);
    }

    .explore-icon {
        font-size: 2rem;
    }

    .explore-card h3 {
        font-size: 1.1rem;
    }

    /* Footer Mobile */
    .footer-epic {
        padding-top: var(--space-xl);
    }

    .footer-main {
        grid-template-columns: 1fr !important;
        gap: var(--space-xl);
    }

    .footer-logo-epic img {
        height: 40px;
    }

    .footer-brand-title {
        font-size: 1.1rem;
    }

    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-lg);
    }

    .footer-links-column h4 {
        font-size: 0.85rem;
        margin-bottom: var(--space-sm);
    }

    .footer-links-column a {
        font-size: 0.85rem;
    }

    .footer-bottom-epic {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
        font-size: 0.8rem;
    }

    /* Back to top mobile */
    .back-to-top-epic {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }

    /* Page Hero Mobile */
    .page-hero {
        padding: 100px 0 var(--space-2xl);
        min-height: 35vh;
    }

    .page-hero-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .page-hero-description {
        font-size: 1rem;
    }

    /* Content Grid Mobile */
    .content-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-xl);
    }

    .content-grid--reverse {
        direction: ltr;
    }

    /* Downloads Mobile */
    .downloads-grid {
        grid-template-columns: 1fr !important;
    }

    .info-box {
        flex-direction: column;
        text-align: center;
    }

    /* Events Mobile */
    .events-highlights {
        grid-template-columns: 1fr !important;
    }

    .event-highlight-card {
        flex-direction: column;
    }

    .event-date-badge {
        width: 100%;
        height: auto;
        padding: var(--space-md);
        flex-direction: row;
        gap: var(--space-sm);
    }

    .calendar-header {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }

    .calendar-iframe {
        height: 350px;
    }

    .regular-events-grid {
        grid-template-columns: 1fr !important;
    }

    .calendar-subscribe-box {
        flex-direction: column;
        text-align: center;
    }

    .subscribe-actions {
        justify-content: center;
    }
}

/* Small Mobile Breakpoint */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .logo-text {
        display: none !important;
    }

    .logo-img {
        height: 50px;
    }

    .hero-logo-big {
        width: 70px;
        height: 70px;
    }

    .logo-glow-big {
        width: 85px;
        height: 85px;
    }

    .hero-logo-left {
        gap: var(--space-lg);
    }

    .hero-title-epic {
        font-size: 1.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .btn-epic {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .impact-number {
        font-size: 2rem;
    }

    .impact-unit {
        font-size: 1rem;
    }

    .why-image-stack {
        height: 180px;
    }

    .mega-cta-prices {
        flex-direction: column;
        align-items: center;
    }

    .price-badge {
        width: 100%;
        max-width: 200px;
    }

    .footer-links-grid {
        grid-template-columns: 1fr !important;
    }

    /* Hide floating elements */
    .floating-elements,
    .hero-scroll-indicator {
        display: none !important;
    }

    /* Calendar even smaller */
    .calendar-iframe {
        height: 300px;
    }
}

/* Very Small Mobile */
@media screen and (max-width: 360px) {
    .hero-logo-big {
        width: 60px;
        height: 60px;
    }

    .logo-glow-big {
        width: 75px;
        height: 75px;
    }

    .hero-title-epic {
        font-size: 1.3rem !important;
    }

    .btn-epic {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

/* Landscape Mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero-epic {
        padding-top: 80px;
        min-height: auto;
    }

    .hero-layout {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-logo-left {
        width: auto;
    }

    .hero-epic-content {
        width: 100%;
    }
}