/**
 * Hilal Yılmaz - Responsive Tasarım
 */

/* Tablet (1024px ve altı) */
@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .container {
        padding: 0 1.25rem;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-book {
        gap: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.75rem;
    }
}

/* Tablet Portrait (768px ve altı) */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .section {
        padding: 3rem 0;
    }
    
    /* Navbar */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        border-bottom: 1px solid var(--light-gray);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .user-btn span {
        display: none;
    }
    
    /* Mobil menüde auth butonları */
    .navbar-right {
        gap: 0.5rem;
    }
    
    .auth-buttons {
        display: flex;
        gap: 0.5rem;
    }
    
    .auth-buttons .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Grid */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Hero */
    .hero {
        height: auto;
        min-height: 400px;
        padding: 4rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-quote {
        font-size: 1.25rem;
    }
    
    /* Featured Book */
    .featured-book {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .featured-book-image img {
        margin: 0 auto;
    }
    
    .featured-book-quote {
        border-left: none;
        border-top: 3px solid var(--rose);
        padding-left: 0;
        padding-top: 1rem;
    }
    
    .featured-book-actions {
        justify-content: center;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Profile */
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .profile-tab {
        white-space: nowrap;
    }
    
    /* YouTube Channel */
    .youtube-channel-info {
        flex-direction: column;
        text-align: center;
    }
    
    .youtube-channel-logo {
        margin-top: -40px;
    }
    
    .youtube-subscribe-btn {
        margin-left: 0;
    }
    
    /* Modal */
    .modal {
        width: 95%;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Comment */
    .comment {
        flex-direction: column;
    }
    
    .comment-form {
        flex-direction: column;
    }
}

/* Mobile (480px ve altı) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    /* Navbar */
    .navbar-content {
        height: 60px;
    }
    
    .logo-img {
        height: 36px;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .nav-menu {
        top: 60px;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
    }
    
    /* Hero */
    .hero {
        min-height: 350px;
        padding: 3rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-quote {
        font-size: 1.1rem;
    }
    
    /* Cards */
    .card-image,
    .blog-card-image {
        height: 180px;
    }
    
    .book-card-image {
        height: 250px;
    }
    
    .video-card-thumbnail {
        height: 180px;
    }
    
    /* Featured Book */
    .featured-book-image img {
        max-width: 250px;
    }
    
    .featured-book-content h3 {
        font-size: 1.5rem;
    }
    
    .featured-book-quote {
        font-size: 1rem;
    }
    
    .featured-book-actions {
        flex-direction: column;
    }
    
    .featured-book-actions .btn {
        width: 100%;
    }
    
    /* Profile */
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-info h2 {
        font-size: 1.5rem;
    }
    
    /* Footer */
    .footer {
        padding: 3rem 0 1rem;
        margin-top: 4rem;
    }
    
    /* Book Preview */
    .book-preview-body {
        min-height: 350px;
    }
    
    .book-preview-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* Pagination */
    .pagination-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

/* Very Small Screens (320px) */
@media (max-width: 320px) {
    html {
        font-size: 13px;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .logo-img {
        height: 30px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn {
        border-width: 1px;
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Disable hover effects on touch */
    .card:hover,
    .book-card:hover,
    .blog-card:hover,
    .video-card:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .modal,
    .toast,
    .auth-buttons,
    .user-menu,
    .mobile-menu-btn {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    #mainContent {
        padding-top: 0;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
