/* Mobile First Responsive Design */

/* Large Desktop & TV Screens (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .tools-grid-home {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }
    
    .tool-card {
        padding: 2rem;
    }
    
    .tool-icon {
        font-size: 3rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Desktop Screens (1200px - 1919px) */
@media (min-width: 1200px) and (max-width: 1919px) {
    .tools-grid-home {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
    
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Laptop Screens (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .tools-grid-home {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Tablet Screens (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 1.5rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .tools-grid-home {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Mobile Landscape (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .hero {
        padding: 2.5rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .tools-grid-home {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .tool-card {
        padding: 1.25rem;
    }
    
    .tool-icon {
        font-size: 2rem;
    }
    
    .tool-title {
        font-size: 1.125rem;
    }
    
    /* Mobile Navigation - Hide hamburger menu, show all tools and theme toggle */
    .nav-toggle {
        display: none;
    }
    
    .nav-menu {
        position: static;
        background: transparent;
        border: none;
        flex-direction: row;
        gap: 1rem;
        padding: 0;
        transform: none;
        opacity: 1;
        visibility: visible;
        transition: none;
        z-index: auto;
    }
    
    .nav-actions {
        gap: 0.75rem;
    }
    
    .all-tools-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Mobile Portrait (max 575px) */
@media (max-width: 575px) {
    .container {
        max-width: 100%;
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .tools-grid-home {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tool-card {
        padding: 1rem;
    }
    
    .tool-icon {
        font-size: 1.75rem;
    }
    
    .tool-title {
        font-size: 1rem;
    }
    
    .tool-description {
        font-size: 0.8rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    /* Mobile Navigation */
    .nav-toggle {
        display: none;
    }
    
    .nav-menu {
        position: static;
        background: transparent;
        border: none;
        flex-direction: row;
        gap: 1rem;
        padding: 0;
        transform: none;
        opacity: 1;
        visibility: visible;
        transition: none;
        z-index: auto;
        max-height: none;
        overflow: visible;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .all-tools-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .all-tools-btn i {
        font-size: 0.95rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Extra Small Screens (max 319px) */
@media (max-width: 319px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .tool-card {
        padding: 0.75rem;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon,
    .tool-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape Mobile */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .nav-menu {
        max-height: none;
        overflow: visible;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .nav-toggle,
    .theme-toggle,
    .btn {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .page-wrapper {
        box-shadow: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .tool-card {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .spinner {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-primary: #000000;
        --bg-primary: #ffffff;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-primary: #ffffff;
        --bg-primary: #000000;
    }
    
    .tool-card {
        border: 2px solid;
    }
    
    .btn {
        border: 2px solid;
    }
}

/* Focus Styles for Accessibility */
@media (prefers-reduced-motion: no-preference) {
    :focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
        transition: outline-offset 0.2s ease;
    }
}

/* Hover Styles (only for devices that support hover) */
@media (hover: hover) and (pointer: fine) {
    .tool-card:hover {
        transform: translateY(-5px);
    }
    
    .btn:hover {
        transform: translateY(-1px);
    }
}

/* Touch-friendly styles for devices without hover */
@media (hover: none) {
    .tool-card:hover {
        transform: none;
    }
    
    .tool-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
} 