/* ===== MOBİL TASARIM İYİLEŞTİRMELERİ ===== */

/* ===== GENEL MOBİL DÜZENLEMELER ===== */
@media (max-width: 768px) {
    /* Daha iyi spacing */
    .container {
        padding: 0 16px;
    }
    
    section {
        padding: 40px 0; /* Tutarlı spacing */
    }
    
    /* İlk ve son section'lar için özel */
    section:first-of-type {
        padding-top: 60px;
    }
    
    section:last-of-type {
        padding-bottom: 40px;
    }
    
    /* Section başlıkları */
    .section-header {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .section-tag {
        font-size: 0.7rem;
        padding: 6px 14px;
    }

    /* ===== HERO SECTION ===== */
    .hero {
        min-height: 100vh;
        padding: 80px 0 60px;
    }
    
    .hero-container {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-visual {
        order: 1;
        margin-bottom: 20px;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-title .name {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        min-height: 30px;
    }
    
    .hero-description {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 8px 16px;
        justify-content: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding: 0 20px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 30px;
        margin-top: 30px;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    /* Hero görsel */
    .hero-image-wrapper {
        width: 250px;
        height: 250px;
        margin: 0 auto;
        min-height: 250px; /* CLS önleme */
    }
    
    .hero-logo {
        width: 150px;
        height: 150px;
        min-height: 150px; /* CLS önleme */
    }
    
    .ring-1 {
        width: 220px;
        height: 220px;
    }
    
    .ring-2, .ring-3 {
        display: none;
    }
    
    .hero-glow {
        width: 200px;
        height: 200px;
        filter: blur(40px);
    }
    
    .hero-particles {
        display: none;
    }
    
    /* Scroll indicator */
    .scroll-indicator {
        display: none;
    }

    /* ===== KARTLAR ===== */
    .announcement-card,
    .project-card,
    .quick-link-card {
        padding: 20px;
    }
    
    .announcement-card h3,
    .project-card h3 {
        font-size: 1.1rem;
    }
    
    .announcement-card p,
    .project-card p {
        font-size: 0.9rem;
    }

    /* ===== GRID DÜZENLEMELER ===== */
    .announcements-grid,
    .projects-grid,
    .quick-links-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* 2 sütunlu grid mobilde */
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .social-card {
        padding: 16px;
    }
    
    .social-card i {
        font-size: 1.5rem;
    }
    
    .social-card .platform-name {
        font-size: 0.8rem;
    }

    /* ===== İLETİŞİM FORMU ===== */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-methods {
        flex-direction: column;
    }
    
    .contact-method {
        justify-content: center;
    }
    
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* iOS zoom önleme */
        padding: 14px 16px;
    }

    /* ===== FOOTER ===== */
    .footer {
        padding: 40px 0 20px 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
        padding: 24px 20px;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-cols {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        width: 100%;
    }
    
    .footer-col {
        text-align: center;
    }
    
    .footer-col h4 {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    
    .footer-col a {
        display: block;
        padding: 6px 0;
        font-size: 0.85rem;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }
    
    .footer-bottom {
        padding-top: 20px;
        font-size: 0.8rem;
    }
    
    .footer-social {
        justify-content: center;
        margin-top: 16px;
    }

    /* ===== ÇEKİLİŞ WİDGET ===== */
    .giveaway-widget-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .giveaway-timer {
        justify-content: center;
    }
    
    .timer-item {
        min-width: 60px;
    }
    
    .timer-value {
        font-size: 1.5rem;
    }

    /* ===== BUTONLAR ===== */
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .btn-primary,
    .btn-secondary {
        min-height: 48px; /* Touch target */
    }

    /* ===== MARQUEE ===== */
    .skills-marquee {
        padding: 12px 0;
        margin-top: 30px;
        min-height: 40px; /* CLS önleme */
    }
    
    .marquee-content span {
        font-size: 0.85rem;
        padding: 0 12px;
    }

    /* ===== NAVBAR ===== */
    .navbar {
        padding: 8px 0;
    }
    
    .nav-logo .logo-text {
        font-size: 1.1rem;
    }
    
    .logo-video {
        width: 36px;
        height: 36px;
    }
}

/* ===== KÜÇÜK TELEFONLAR (375px ve altı) ===== */
@media (max-width: 375px) {
    .hero-title .name {
        font-size: 2rem !important;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem !important;
    }
    
    .social-grid {
        grid-template-columns: 1fr;
    }
    
    .timer-item {
        min-width: 50px;
        padding: 8px;
    }
    
    .timer-value {
        font-size: 1.25rem;
    }
    
    /* Footer daha kompakt */
    .footer {
        padding: 30px 0 16px 0;
    }
    
    .footer-content {
        gap: 20px;
        padding: 20px 16px;
    }
    
    .footer-cols {
        grid-template-columns: 1fr; /* Tek sütun */
        gap: 20px;
    }
    
    .footer-col h4 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .footer-col a {
        font-size: 0.8rem;
        padding: 5px 0;
    }
    
    .footer-bottom {
        padding-top: 16px;
        font-size: 0.75rem;
    }
    
    .footer-social a {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }
}

/* ===== TABLET (768px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-container {
        gap: 40px;
    }
    
    .hero-title .name {
        font-size: 3rem;
    }
    
    .announcements-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== LANDSCAPE MOD ===== */
@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }
    
    .hero-container {
        flex-direction: row;
        align-items: center;
    }
    
    .hero-content {
        order: 1;
        text-align: left;
    }
    
    .hero-visual {
        order: 2;
    }
    
    .hero-image-wrapper {
        width: 150px;
        height: 150px;
    }
    
    .hero-buttons {
        flex-direction: row;
        padding: 0;
    }
    
    .hero-buttons .btn {
        width: auto;
    }
}

/* ===== TOUCH İYİLEŞTİRMELERİ ===== */
@media (hover: none) and (pointer: coarse) {
    /* Touch cihazlarda hover efektlerini kaldır */
    .btn:hover,
    .card:hover,
    .social-card:hover {
        transform: none;
    }
    
    /* Active state ekle */
    .btn:active,
    .card:active,
    .social-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    /* Daha büyük touch hedefleri */
    a, button, .clickable {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ===== SAFE AREA (iPhone X ve sonrası) ===== */
/* Body padding is handled in mobile-nav.css */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* ===== DARK/LIGHT TEMA MOBİL ===== */
@media (max-width: 768px) {
    [data-theme="light"] .mobile-bottom-nav {
        background: rgba(255, 255, 255, 0.95);
        border-top-color: rgba(0, 0, 0, 0.08);
    }
    
    [data-theme="light"] .mobile-bottom-nav .nav-item {
        color: rgba(0, 0, 0, 0.5);
    }
    
    [data-theme="light"] .mobile-bottom-nav .nav-item.active {
        color: #1a1a2e;
    }
    
    [data-theme="light"] .mobile-menu-overlay {
        background: rgba(255, 255, 255, 0.98);
    }
    
    [data-theme="light"] .mobile-menu-overlay .menu-link {
        color: rgba(0, 0, 0, 0.6);
    }
    
    [data-theme="light"] .mobile-menu-overlay .menu-link.active {
        background: rgba(0, 0, 0, 0.05);
        color: #1a1a2e;
    }
}

/* ===== ANİMASYON PERFORMANSI ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT ===== */
@media print {
    .mobile-bottom-nav,
    .mobile-menu-btn,
    .mobile-menu-overlay,
    .theme-toggle,
    .bg-animated,
    .cursor,
    .cursor-glow {
        display: none !important;
    }
}

/* ===== PERFORMANS İYİLEŞTİRMELERİ ===== */
@media (max-width: 768px) {
    /* Video lazy loading için placeholder */
    .hero-logo,
    .logo-video {
        background: rgba(180, 107, 255, 0.1);
    }
    
    /* Animasyonları azalt */
    .gradient-orb {
        animation-duration: 30s; /* Daha yavaş */
    }
    
    .morph-blob {
        display: none; /* Mobilde kapat */
    }
    
    .particle {
        display: none; /* Mobilde kapat */
    }
    
    /* Grid optimizasyonu */
    .perspective-grid {
        opacity: 0.3; /* Daha az görünür */
    }
    
    /* Skeleton loading için */
    .announcement-skeleton,
    .project-skeleton {
        min-height: 200px;
        background: rgba(20, 20, 35, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        position: relative;
        overflow: hidden;
    }
    
    .skeleton-shimmer {
        position: absolute;
        inset: 0;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent
        );
        animation: shimmer 1.5s infinite;
    }
    
    @keyframes shimmer {
        to {
            transform: translateX(100%);
        }
    }
    
    /* Lazy load için blur placeholder */
    img[loading="lazy"],
    video[loading="lazy"] {
        background: rgba(180, 107, 255, 0.05);
    }
    
    /* Smooth scroll optimizasyonu */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* GPU acceleration */
    .hero-visual,
    .announcement-card,
    .project-card,
    .btn {
        will-change: transform;
        transform: translateZ(0);
    }
}

/* ===== MOBİL NAVİGASYON İYİLEŞTİRMELERİ ===== */
@media (max-width: 768px) {
    /* Body padding handled in mobile-nav.css */

    /* Navbar scroll'da küçül */
    .navbar.scrolled {
        padding: 4px 0;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    }
    
    .navbar.scrolled .logo-video {
        width: 32px;
        height: 32px;
    }
    
    .navbar.scrolled .nav-logo .logo-text {
        font-size: 1rem;
    }
    
    /* Hamburger menu animasyonu */
    .nav-toggle {
        transition: transform 0.2s;
    }
    
    .nav-toggle:active {
        transform: scale(0.9);
    }
    
    /* Menu overlay */
    .nav-menu.active {
        animation: slideInRight 0.3s ease-out;
    }
    
    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
}

/* ===== STATS GRID İYİLEŞTİRMESİ ===== */
@media (max-width: 768px) {
    .hero-stats {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        width: 100%;
        max-width: 400px;
        margin: 30px auto 0;
    }
    
    .stat-item {
        background: rgba(20, 20, 35, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        padding: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        backdrop-filter: blur(10px);
        transition: all 0.3s;
    }
    
    .stat-item:active {
        transform: scale(0.98);
        border-color: rgba(180, 107, 255, 0.3);
    }
    
    .stat-number,
    .stat-suffix {
        display: inline;
        font-size: 2rem !important;
        font-weight: 700;
        background: linear-gradient(135deg, #b46bff, #00d4ff);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .stat-label {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.6);
    }
}

/* ===== BENTO GRID MOBİL ===== */
@media (max-width: 768px) {
    .social-bento {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .bento-card {
        min-height: 180px;
    }
    
    .video-preview {
        height: 150px;
    }
}

/* ===== GIVEAWAY WIDGET MOBİL ===== */
@media (max-width: 768px) {
    .giveaway-widget {
        padding: 24px 20px;
    }
    
    .giveaway-widget-content {
        gap: 16px;
    }
    
    .giveaway-icon {
        font-size: 2rem;
    }
    
    .giveaway-info h3 {
        font-size: 1.1rem;
    }
    
    .giveaway-timer {
        gap: 8px;
    }
    
    .timer-item {
        min-width: 65px;
        padding: 10px 8px;
    }
    
    .timer-value {
        font-size: 1.75rem;
    }
    
    .timer-label {
        font-size: 0.7rem;
    }
}

/* ===== ACCESSIBILITY İYİLEŞTİRMELERİ ===== */
@media (max-width: 768px) {
    /* Focus indicators */
    a:focus-visible,
    button:focus-visible,
    input:focus-visible,
    textarea:focus-visible {
        outline: 2px solid #b46bff;
        outline-offset: 2px;
    }
    
    /* Skip to content link */
    .skip-to-content {
        position: absolute;
        top: -40px;
        left: 0;
        background: #b46bff;
        color: white;
        padding: 8px 16px;
        text-decoration: none;
        z-index: 10001;
    }
    
    .skip-to-content:focus {
        top: 0;
    }
    
    /* Contrast iyileştirmeleri */
    .section-subtitle,
    .card p,
    .feed-time {
        color: rgba(255, 255, 255, 0.75); /* Daha yüksek contrast */
    }
}
