/* Mobile Responsive Styles - AegisSight */
/* Mobile-First Approach with Progressive Enhancement */

/* Base Mobile Styles (320px and up) */
@media screen and (max-width: 480px) {
    /* Typography Scaling */
    html {
        font-size: 14px;
    }
    
    body {
        overflow-x: hidden;
    }
    
    /* Hero Section Mobile */
    .hero {
        min-height: 100vh;
        padding: 1rem;
    }
    
    .hero-title .main-title {
        font-size: 2rem;
        line-height: 1.2;
        word-break: break-word;
    }
    
    .hero-text {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    /* Keep videos on mobile but optimize */
    .hero-video-container {
        display: block;
    }
    
    .hero-video {
        object-fit: cover;
    }
    
    /* Navigation Mobile */
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .nav-container {
        justify-content: space-between;
    }
    
    .logo-img {
        max-width: 120px;
        height: auto;
    }
    
    /* Hide desktop menu */
    .nav-menu {
        display: none;
    }
    
    /* Mobile Menu Styles */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1001;
    }
    
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--color-navy, #0A1832);
        transition: all 0.3s ease;
    }
    
    /* Hamburger Animation */
    .mobile-menu-toggle.active .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active .hamburger span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Mobile Navigation Menu */
    .nav-menu-mobile {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(10, 24, 50, 0.98);
        backdrop-filter: blur(10px);
        transition: right 0.3s ease;
        z-index: 1000;
        padding: 4rem 2rem 2rem;
        overflow-y: auto;
    }
    
    /* Close button inside mobile menu */
    .mobile-menu-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        transition: background 0.3s ease;
    }
    
    .mobile-menu-close:hover {
        background: rgba(200, 168, 81, 0.15);
    }
    
    .mobile-menu-close svg {
        width: 24px;
        height: 24px;
        stroke: var(--color-white, #fff);
        stroke-width: 2;
    }
    
    .nav-menu-mobile.active {
        right: 0;
    }
    
    .nav-menu-mobile ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .nav-menu-mobile li {
        margin-bottom: 1.5rem;
    }
    
    .nav-menu-mobile a {
        color: #fff;
        text-decoration: none;
        font-size: 1.2rem;
        display: block;
        padding: 0.5rem 0;
        transition: color 0.3s ease;
    }
    
    .nav-menu-mobile a:hover {
        color: var(--color-gold, #C8A851);
    }
    
    /* Mobile Overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Sections Mobile */
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Cards and Grids Mobile */
    .tool-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    /* Buttons Mobile - Touch Friendly */
    button, 
    .btn, 
    .cta-button,
    .lang-toggle {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    /* About Tabs Mobile */
    .about-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .about-tab {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Products Section Mobile */
    .products-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .product-card {
        padding: 1.5rem;
    }
    
    /* Product header mobile - override grid to stack icon above text */
    .product-header {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        padding: 1.5rem !important;
        text-align: center;
        align-items: center;
        gap: 1rem;
    }
    
    .product-icon-wrapper {
        margin-bottom: 0.5rem;
    }
    
    .product-title-wrapper {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
        width: 100%;
        text-align: center !important;
    }
    
    .product-title {
        font-size: 1.1rem;
        line-height: 1.2;
        margin: 0;
        text-align: center !important;
        width: 100%;
    }
    
    .product-tagline {
        font-size: 0.75rem;
        margin: 0;
        line-height: 1.2;
        text-align: center !important;
        width: 100%;
        white-space: normal;
    }
    
    /* Specific fix for AccountForger tagline */
    .product-card:nth-child(2) .product-tagline {
        display: block;
        margin: 0 auto;
        white-space: nowrap; /* Verhindert Umbruch innerhalb der Zeilen */
    }
    
    /* Force line break only after "mit" */
    .product-card:nth-child(2) .product-tagline::before {
        content: "Zugang nur mit\A Berechtigung";
        white-space: pre-line;
    }
    
    /* Hide original text */
    .product-card:nth-child(2) .product-tagline {
        font-size: 0;
    }
    
    .product-card:nth-child(2) .product-tagline::before {
        font-size: 0.75rem;
    }
    
    /* Footer Mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* About Section - Company Cards Mobile Fix */
    .company-cards-wrapper {
        width: 100% !important;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .company-card {
        width: 100%;
        padding: 1.5rem !important;
    }
    
    .company-card h4 {
        font-size: 1.1rem;
    }
    
    .company-card p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    /* About panel layout mobile */
    .about-panel {
        padding: 1rem;
    }
    
    .panel-text {
        max-width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    /* Location section mobile - move to bottom */
    .location-section {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 2rem;
        order: 2; /* Move to bottom */
        height: auto !important;
        padding: 1.5rem;
        background: rgba(10, 15, 28, 0.05);
        border-radius: 20px;
    }
    
    .company-cards-wrapper {
        order: 1; /* Keep at top */
    }
    
    .mini-germany-map {
        max-width: 150px;
        margin-bottom: 1rem;
    }
    
    .mini-germany-map img {
        width: 100%;
        height: auto;
    }
    
    .location-badge {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Tablet Styles (481px - 768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
    /* Typography */
    html {
        font-size: 15px;
    }
    
    
    .hero-title .main-title {
        font-size: 2.5rem;
    }
    
    /* Videos already visible from mobile */
    
    /* Tool Grid - 2 columns */
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* About Tabs - Horizontal with wrap */
    .about-tabs {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .about-tab {
        flex: 1 1 calc(50% - 0.5rem);
    }
}

/* Small Desktop (769px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* Container widths */
    .container {
        max-width: 960px;
        padding: 0 2rem;
    }
    
    /* Navigation adjustments */
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-menu a {
        font-size: 0.9rem;
    }
    
    /* Grid adjustments */
    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .tool-card:hover,
    .product-card:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    a, button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Landscape Mobile Optimization */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 1rem;
    }
    
    .hero-title .main-title {
        font-size: 1.75rem;
    }
}

/* High Resolution Mobile Displays */
@media screen and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
    /* Sharper borders and shadows */
    .tool-card,
    .product-card {
        border: 0.5px solid rgba(255, 255, 255, 0.1);
    }
}

/* Performance Optimizations for Mobile */
@media screen and (max-width: 768px) {
    /* Disable complex animations on mobile */
    .animate-in,
    .stagger-1,
    .stagger-2,
    .stagger-3 {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Reduce particle effects */
    #particleCanvas {
        display: none;
    }
    
    /* Optimize images */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Tablet and Small Desktop (768px - 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    /* Navigation adjustments for tablets */
    .nav-container {
        padding: 1rem;
    }
    
    /* Keep centered logo but adjust size */
    .logo-img {
        height: 50px;
    }
    
    /* Adjust menu spacing */
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-menu a {
        font-size: 1rem;
    }
    
    /* Language toggle smaller on tablets */
    .lang-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}


/* Print Styles */
@media print {
    .navbar,
    .hero-video-container,
    .scroll-indicator,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}