/* Mobile Responsive Styles - H5 Adaptation */

/* Mobile Navigation */
@media (max-width: 768px) {
    /* Navigation */
    header nav {
        padding: 0.75rem 0;
    }
    
    .nav-container {
        position: relative;
    }
    
    .logo span {
        font-size: 1.3rem !important;
    }
    
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--color-primary);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1002;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--glass-bg);
        backdrop-filter: var(--glass-backdrop);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        transition: right var(--transition-base);
        z-index: 1001;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li a {
        font-size: 1.1rem;
        padding: 0.75rem 0;
        display: block;
        border-bottom: 1px solid var(--color-border);
    }
    
    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
    
    /* Hero Section */
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: clamp(1.8rem, 5vw, 2.5rem) !important;
        line-height: 1.2;
    }
    
    .hero .subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    /* Generator Section */
    .generator-card {
        padding: 1.5rem;
        border-radius: 8px;
    }
    
    #textInput {
        font-size: 0.95rem;
        padding: 0.75rem;
    }
    
    .control-options {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .control-group {
        padding: 0.75rem;
    }
    
    .control-group label {
        font-size: 0.85rem;
    }
    
    /* Font Display */
    .fonts-display h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .font-group h3 {
        font-size: 1.1rem;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .font-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .font-item {
        padding: 1rem;
    }
    
    .font-preview {
        font-size: 20px;
        padding: 0.75rem;
        min-height: 50px;
    }
    
    .download-btn,
    .copy-btn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    /* Sections */
    .info-section,
    .features-section,
    .steps-section,
    .use-cases-section,
    .tips-section,
    .faq-section,
    .cta-section {
        padding: 2.5rem 0;
    }
    
    .info-section h2,
    .features-section h2,
    .steps-section h2,
    .use-cases-section h2,
    .tips-section h2,
    .faq-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .info-section p,
    .faq-item p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Feature Cards */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.2rem;
    }
    
    /* Steps */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .step-card {
        padding: 1.5rem;
    }
    
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    /* Use Cases */
    .use-cases-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .use-case-card {
        padding: 1.5rem;
    }
    
    /* Tips */
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tip-card {
        padding: 1.5rem;
    }
    
    /* FAQ */
    .faq-item {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .faq-item h3 {
        font-size: 1.1rem;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 3rem 0;
    }
    
    .cta-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .cta-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .btn-primary.btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    /* Footer */
    footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-section ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.85rem;
    }
    
    /* Share Button */
    .share-fab {
        bottom: 1rem;
        right: 1rem;
    }
    
    .share-trigger {
        width: 50px;
        height: 50px;
    }
    
    .share-option {
        width: 40px;
        height: 40px;
    }
    
    .share-options {
        bottom: 60px;
    }
    
    /* Container */
    .container {
        padding: 0 1rem;
    }
    
    /* Magic UI Orbs - Hide on mobile for performance */
    .magic-orb {
        display: none;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem !important;
    }
    
    .control-options {
        grid-template-columns: 1fr;
    }
    
    .logo span {
        font-size: 1.1rem !important;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Landscape Mode Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem !important;
    }
    
    .nav-menu {
        width: 250px;
        padding-top: 3rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn-primary,
    .btn-secondary,
    .download-btn,
    .copy-btn {
        min-height: 44px;
    }
    
    .nav-menu li a {
        padding: 1rem 0;
    }
    
    .share-trigger {
        width: 56px;
        height: 56px;
    }
    
    .share-option {
        width: 44px;
        height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .font-item:hover,
    .feature-card:hover,
    .step-card:hover,
    .use-case-card:hover,
    .tip-card:hover {
        transform: none;
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .nav-menu {
        -webkit-overflow-scrolling: touch;
    }
    
    .generator-card {
        -webkit-overflow-scrolling: touch;
    }
}

/* Smooth scrolling for mobile */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Blog Page Mobile Styles */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-card {
        padding: 1.25rem;
    }
    
    .blog-card h3 {
        font-size: 1.1rem;
    }
    
    .blog-excerpt {
        font-size: 0.9rem;
    }
    
    .read-more {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Font Individual Pages Mobile */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 0.75rem 0;
        font-size: 0.85rem;
    }
    
    .font-showcase h1 {
        font-size: 1.8rem;
    }
    
    .preview-large {
        font-size: 2rem;
        padding: 1.5rem 1rem;
    }
    
    .alphabet-display {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .letters {
        font-size: 1.2rem;
        letter-spacing: 0.3rem;
    }
}

/* Ensure text is readable on all devices */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    input,
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}