/* === EGYSÉGES RESPONSIVE STÍLUSOK === */
/* Minden oldalon ugyanúgy működik */

/* Desktop/Mobile utility classes */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Body scroll lock */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* === HERO SECTION JAVÍTÁSOK === */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 60vh;
}

.hero-content {
    /* Bal oldal szöveg */
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-dark);
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.02);
}

/* === TABLET és MOBILE BREAKPOINTS === */

/* Large tablets (1024px and down) */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero-section {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .squads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium tablets and small desktops (768px and down) */
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    .nav-menu {
        /* Reset desktop styles */
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background: var(--card-bg);
        flex-direction: column;
        padding: 5rem 0 2rem 0;
        border-left: 1px solid var(--border-color);
        z-index: 1000;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        overflow-y: auto;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(10px);
    }
    
    .nav-menu.active {
        display: flex;
        right: 0;
    }
    
    .nav-link {
        padding: 1.25rem 2rem;
        border-bottom: 1px solid var(--border-color);
        margin: 0;
        border-radius: 0;
        transition: all 0.3s ease;
        font-size: 1rem;
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 102, 0, 0.15);
        border-color: var(--primary-color);
        color: var(--primary-color);
        padding-left: 2.5rem;
    }
    
    .nav-link i {
        width: 20px;
        text-align: center;
    }
    
    .nav-user {
        padding: 1.5rem 2rem;
        border-top: 2px solid var(--primary-color);
        margin-top: auto;
        background: linear-gradient(135deg, rgba(255, 102, 0, 0.1), rgba(255, 51, 102, 0.1));
        color: var(--primary-color);
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        color: var(--text-primary);
        font-size: 1.25rem;
        cursor: pointer;
        border-radius: 8px;
        transition: all 0.3s ease;
        background: transparent;
        border: 1px solid transparent;
        z-index: 1001;
        position: relative;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(255, 102, 0, 0.1);
        border-color: var(--primary-color);
        color: var(--primary-color);
    }
    
    .mobile-menu-toggle.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: scale(1.05);
    }
    
    .mobile-menu-toggle.active i {
        transform: rotate(90deg);
        transition: transform 0.3s ease;
    }
    
    /* Navigation container adjustments */
    .nav-container {
        padding: 0 15px;
        position: relative;
    }
    
    .nav-brand .logo {
        width: 32px;
        height: 32px;
    }
    
    .brand-text {
        font-size: 1.3rem;
    }
    
    /* Container responsive */
    .container {
        padding: 0 15px;
    }
    
    /* Hero section mobile */
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 3rem 20px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-actions {
        justify-content: center;
        margin-top: 1.5rem;
        flex-wrap: wrap;
    }
    
    /* Grid layouts mobile */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .squads-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-section,
    .active-squads-section {
        padding: 3rem 20px;
    }
    
    .squad-header {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* Small tablets and large phones (600px and down) */
@media (max-width: 600px) {
    .nav-menu {
        width: 280px;
        padding: 4rem 0 2rem 0;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .nav-link:hover,
    .nav-link.active {
        padding-left: 2rem;
    }
    
    .nav-user {
        padding: 1.25rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .brand-text {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1rem 0;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .squad-card {
        padding: 1rem;
    }
    
    .squad-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .squad-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Small phones (480px and down) */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }
    
    .nav-menu {
        width: 260px;
    }
    
    .nav-link {
        padding: 1rem 1.25rem;
    }
    
    .nav-user {
        padding: 1rem 1.25rem;
    }
    
    .brand-text {
        font-size: 1.1rem;
    }
    
    .mobile-menu-toggle {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .hero-section {
        padding: 2rem 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .features-section,
    .active-squads-section {
        padding: 2rem 15px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

/* Extra small phones (360px and down) */
@media (max-width: 360px) {
    .nav-menu {
        width: 100%;
        max-width: none;
        right: -100%;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .btn-large {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* === GLOBAL ALERT MOBILE OPTIMIZATIONS === */
@media (max-width: 768px) {
    .global-alert {
        top: 75px;
        left: 15px;
        right: 15px;
        transform: none;
        width: auto;
        max-width: none;
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    
    .alert-close {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .global-alert {
        top: 70px;
        left: 10px;
        right: 10px;
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }
}

/* === SMOOTH ANIMATIONS === */
@media (prefers-reduced-motion: no-preference) {
    .nav-menu {
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .nav-link {
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle {
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle i {
        transition: transform 0.3s ease;
    }
    
    .mobile-overlay {
        transition: opacity 0.3s ease;
    }
}

/* === ACCESSIBILITY IMPROVEMENTS === */
.mobile-menu-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .nav-menu {
        border-left: 2px solid var(--text-primary);
    }
    
    .nav-link {
        border-bottom: 1px solid var(--text-primary);
    }
}

/* === LANDSCAPE MOBILE OPTIMIZATIONS === */
@media (max-height: 500px) and (orientation: landscape) {
    .nav-menu {
        padding: 3rem 0 1rem 0;
    }
    
    .nav-link {
        padding: 0.75rem 2rem;
    }
    
    .nav-user {
        padding: 1rem 2rem;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 20px;
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        margin: 1rem 0;
    }
    
    .hero-actions {
        flex-direction: row;
        justify-content: flex-start;
    }
}

/* === TOUCH DEVICE OPTIMIZATIONS === */
@media (hover: none) and (pointer: coarse) {
    .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .nav-link:hover {
        background: transparent;
        padding-left: 2rem;
    }
    
    .nav-link:active {
        background: rgba(255, 102, 0, 0.2);
    }
    
    .btn {
        padding: 1rem 1.5rem; /* Larger touch targets */
    }
    
    .squad-card:hover,
    .feature-card:hover {
        transform: none; /* Remove hover effects on touch */
    }
}

/* === DARK MODE IMPROVEMENTS === */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-bg: #000000;
        --darker-bg: #000000;
    }
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
    :root {
        --border-color: #666666;
        --text-secondary: #ffffff;
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-image img:hover {
        transform: none;
    }
    
    .feature-card:hover,
    .squad-card:hover,
    .btn:hover {
        transform: none;
    }
}

/* === PRINT STYLES === */
@media print {
    .main-header,
    .main-footer,
    .btn,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .squad-card,
    .feature-card {
        border: 1px solid #000;
        background: white;
        break-inside: avoid;
    }
}

/* === UTILITY CLASSES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }

.hidden { display: none; }
.visible { display: block; }

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.visible-mobile {
    display: none;
}

.hidden-mobile {
    display: block;
}

@media (max-width: 768px) {
    .visible-mobile {
        display: block;
    }
    
    .hidden-mobile {
        display: none;
    }
    
    .text-center-mobile {
        text-align: center;
    }
    
    .full-width-mobile {
        width: 100%;
    }
}

/* === LOADING ANIMATIONS === */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 102, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}