/* ==========================================================================
   HISPAX THEME - RESPONSIVE STYLES
   ========================================================================== */

/* ==========================================================================
   TABLET STYLES (768px and down)
   ========================================================================== */

@media (max-width: 768px) {
    
    /* Typography adjustments */
    h1, .hero-title {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Header adjustments */
    .header-container {
        padding: 1rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0;
        border-bottom: 1px solid #E5E7EB;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        padding: 1rem;
        border-radius: 0;
        display: block;
        text-align: center;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero section adjustments */
    .hero-section {
        padding: 6rem 0 4rem;
        text-align: center;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-ctas .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Grid adjustments */
    .products-grid,
    .features-grid,
    .testimonials-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Technology section adjustments */
    .technology-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tech-center {
        grid-column: 1;
    }
    
    .tech-image {
        grid-column: 1;
    }
    
    /* CTA section adjustments */
    .cta-content,
    .final-cta-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .legal-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    /* Social links adjustments */
    .social-links {
        justify-content: center;
    }
}

/* ==========================================================================
   MOBILE STYLES (480px and down)
   ========================================================================== */

@media (max-width: 480px) {
    
    /* Container and spacing adjustments */
    :root {
        --container-padding: 1rem;
        --section-spacing: 3rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    /* Typography adjustments */
    h1, .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Header adjustments */
    .site-logo img {
        height: 35px;
    }
    
    /* Hero section adjustments */
    .hero-section {
        padding: 5rem 0 3rem;
        min-height: auto;
    }
    
    .hero-tagline {
        font-size: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* Card adjustments */
    .product-card,
    .feature-card,
    .testimonial-card,
    .blog-card {
        padding: 1.5rem;
    }
    
    /* Stats grid adjustments */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Technology section adjustments */
    .tech-item {
        padding: 1.5rem;
    }
    
    .tech-center h3 {
        font-size: 1.5rem;
    }
    
    /* CTA steps adjustments */
    .cta-steps li {
        font-size: 1rem;
        padding: 0.5rem 0;
        padding-left: 1.5rem;
    }
    
    .cta-steps li::before {
        font-size: 1rem;
    }
    
    /* Testimonial adjustments */
    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }
    
    .testimonial-title {
        font-size: 1.125rem;
    }
    
    /* FAQ adjustments */
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .faq-question::after {
        right: 1rem;
        font-size: 1.25rem;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem;
    }
    
    /* Footer adjustments */
    .footer-main {
        padding: 2rem 0;
    }
    
    .footer-column h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .footer-brand .footer-logo img {
        height: 40px;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    /* Back to top button adjustments */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1rem;
        right: 1rem;
    }
}

/* ==========================================================================
   EXTRA SMALL MOBILE (360px and down)
   ========================================================================== */

@media (max-width: 360px) {
    
    /* Further typography adjustments */
    h1, .hero-title {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 0.75rem;
    }
    
    /* Card adjustments */
    .product-card,
    .feature-card,
    .testimonial-card,
    .blog-card,
    .tech-item {
        padding: 1rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
    
    /* FAQ adjustments */
    .faq-question {
        padding: 0.75rem;
        font-size: 0.9375rem;
    }
    
    .faq-question::after {
        right: 0.75rem;
    }
    
    .faq-answer {
        padding: 0 0.75rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 0.75rem 0.75rem;
    }
}

/* ==========================================================================
   LANDSCAPE MOBILE ADJUSTMENTS
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
    
    .hero-section {
        padding: 4rem 0 2rem;
        min-height: auto;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-ctas {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-ctas .btn {
        width: auto;
        min-width: 200px;
    }
}

/* ==========================================================================
   HIGH DPI DISPLAYS
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    
    /* Ensure crisp images on retina displays */
    .site-logo img,
    .product-icon img,
    .testimonial-avatar {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    
    /* Hide non-essential elements */
    .site-header,
    .mobile-menu-toggle,
    .nav-menu,
    .back-to-top,
    .btn,
    .social-links {
        display: none !important;
    }
    
    /* Adjust colors for print */
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Ensure readable text */
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    /* Add page breaks */
    .section {
        page-break-inside: avoid;
    }
    
    /* Show URLs for links */
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    /* Hide decorative images */
    .hero-image,
    .cta-image,
    .final-cta-image,
    .tech-image {
        display: none;
    }
}

/* ==========================================================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-teal);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in-up,
    .fade-in-up-delay-1,
    .fade-in-up-delay-2 {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    
    :root {
        --primary-blue: #0000FF;
        --primary-orange: #FF6600;
        --primary-purple: #6600CC;
        --primary-green: #008800;
        --primary-pink: #CC0066;
        --primary-teal: #006666;
        --text-gray: #333333;
        --light-gray: #F0F0F0;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .product-card,
    .feature-card,
    .testimonial-card,
    .blog-card {
        border: 1px solid #333333;
    }
}

