/* ===================================
   Cybex Innovation - Responsive Styles
   Mobile-First Responsive Design
   =================================== */

/* ===================================
   Large Devices (Desktops, < 1200px)
   =================================== */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .hero-title {
        font-size: 48px;
    }

    .section-title {
        font-size: 36px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* ===================================
   Medium Devices (Tablets, < 992px)
   =================================== */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 100px 30px;
        gap: 20px;
        transition: right var(--transition-fast);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-cta {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Hero Section */
    .hero-title {
        font-size: 42px;
        min-height: 120px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero-stats {
        gap: 40px;
    }

    .stat-item h3 {
        font-size: 40px;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-text h3 {
        font-size: 28px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .service-card {
        padding: 30px 25px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    /* Portfolio / Demo */
    .portfolio-grid,
    .demo-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }

    /* Technologies */
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Floating Elements */
    .float-element {
        font-size: 30px;
    }

    /* Section Padding */
    :root {
        --section-padding: 80px 0;
    }
}

/* ===================================
   Small Devices (Landscape Phones, < 768px)
   =================================== */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }

    /* Section Headers */
    .section-title {
        font-size: 32px;
    }

    .section-subtitle {
        font-size: 12px;
    }

    .section-description {
        font-size: 16px;
    }

    /* Navigation */
    .nav-menu {
        width: 250px;
        padding: 80px 25px;
    }

    .logo a {
        font-size: 24px;
    }

    /* Hero Section */
    .hero-section {
        min-height: 90vh;
        padding-top: 60px;
    }

    .hero-title {
        font-size: 36px;
        min-height: 100px;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .hero-buttons {
        gap: 15px;
    }

    .btn-lg {
        padding: 12px 30px;
        font-size: 16px;
    }

    .hero-stats {
        gap: 30px;
    }

    .stat-item h3 {
        font-size: 32px;
    }

    .stat-item p {
        font-size: 14px;
    }

    /* About Section */
    .about-text h3 {
        font-size: 24px;
    }

    .about-text p {
        font-size: 15px;
    }

    .mv-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .skill-header {
        font-size: 14px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 30px 20px;
    }

    .service-card h3 {
        font-size: 20px;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 30px 25px;
    }

    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .feature-card h3 {
        font-size: 20px;
    }

    /* Portfolio / Demo */
    .portfolio-filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .portfolio-grid,
    .demo-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .portfolio-overlay h3 {
        font-size: 20px;
    }

    .demo-title {
        font-size: 20px;
    }

    .demo-image {
        height: 220px;
    }

    .demo-content {
        padding: 25px;
    }

    .demo-card:hover {
        transform: translateY(-5px);
    }

    /* Technologies */
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 20px;
    }

    .tech-item {
        padding: 20px;
    }

    .tech-item i {
        font-size: 36px;
    }

    .tech-item span {
        font-size: 14px;
    }

    /* Testimonials */
    .testimonials-slider {
        padding: 10px;
    }

    .testimonial-card {
        padding: 30px 20px;
    }

    .testimonial-text {
        font-size: 16px;
    }

    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }

    .author-info {
        text-align: center;
    }

    /* Contact */
    .contact-form-wrapper {
        padding: 30px 20px;
    }

    .info-card {
        padding: 20px;
    }

    .info-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .social-links {
        justify-content: center;
    }

    /* Footer */
    .footer {
        padding: 50px 0 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section ul li a {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .contact-list li {
        justify-content: center;
        text-align: left;
    }

    /* Modal */
    .modal-body {
        padding: 30px 20px;
    }

    #modal-image {
        height: 250px;
    }

    .modal-info h2 {
        font-size: 24px;
    }

    .modal-info p {
        font-size: 15px;
    }

    /* Floating Buttons */
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 18px;
        right: 20px;
    }

    /* Section Padding */
    :root {
        --section-padding: 60px 0;
    }
}

/* ===================================
   Extra Small Devices (Phones, < 576px)
   =================================== */
@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }

    /* Section Headers */
    .section-title {
        font-size: 28px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    /* Navigation */
    .navbar {
        padding: 15px 0;
    }

    .navbar.scrolled {
        padding: 12px 0;
    }

    .nav-menu {
        width: 100%;
        right: -100%;
        padding: 80px 20px;
    }

    .logo a {
        font-size: 20px;
    }

    /* Hero Section */
    .hero-section {
        min-height: 85vh;
    }

    .hero-title {
        font-size: 30px;
        min-height: 90px;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .btn-lg {
        padding: 12px 25px;
        font-size: 15px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-item h3 {
        font-size: 36px;
    }

    /* Floating Elements - Hide on mobile */
    .floating-elements {
        display: none;
    }

    /* About Section */
    .about-text h3 {
        font-size: 22px;
    }

    .about-text p {
        font-size: 14px;
    }

    .mv-item {
        padding: 20px;
    }

    .mv-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .mv-content h4 {
        font-size: 18px;
    }

    .mv-content p {
        font-size: 14px;
    }

    /* Services */
    .service-card {
        padding: 25px 15px;
    }

    .service-card h3 {
        font-size: 18px;
    }

    .service-card > p {
        font-size: 14px;
    }

    .service-icon {
        width: 55px;
        height: 55px;
        font-size: 24px;
        margin-bottom: 20px;
    }

    .service-features li {
        font-size: 13px;
    }

    /* Features */
    .feature-card {
        padding: 25px 20px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
        margin-bottom: 20px;
    }

    .feature-card h3 {
        font-size: 18px;
    }

    .feature-card p {
        font-size: 14px;
    }

    /* Portfolio / Demo */
    .portfolio-filters {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    .portfolio-overlay {
        padding: 20px;
    }

    .portfolio-overlay h3 {
        font-size: 18px;
    }

    .portfolio-overlay p {
        font-size: 14px;
    }

    .portfolio-image img {
        height: 250px;
    }

    /* Demo Cards Mobile */
    .demo-grid {
        gap: 20px;
    }

    .demo-title {
        font-size: 18px;
    }

    .demo-description {
        font-size: 14px;
    }

    .demo-image {
        height: 200px;
    }

    .demo-content {
        padding: 20px;
    }

    .demo-tags {
        gap: 8px;
    }

    .demo-tags .tag {
        font-size: 11px;
        padding: 5px 12px;
    }

    .demo-cta .cta-text {
        font-size: 14px;
    }

    .demo-badge {
        width: 40px;
        height: 40px;
        font-size: 16px;
        top: 15px;
        right: 15px;
    }

    /* Technologies */
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .tech-item {
        padding: 15px 10px;
    }

    .tech-item i {
        font-size: 32px;
    }

    .tech-item span {
        font-size: 12px;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 25px 15px;
    }

    .testimonial-text {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .testimonial-rating i {
        font-size: 16px;
    }

    .author-image {
        width: 50px;
        height: 50px;
    }

    .author-info h4 {
        font-size: 16px;
    }

    .author-info p {
        font-size: 13px;
    }

    /* Contact */
    .contact-form-wrapper {
        padding: 25px 15px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 14px;
    }

    .form-group label {
        left: 15px;
        font-size: 14px;
    }

    .info-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }

    .info-icon {
        margin: 0 auto;
    }

    .info-content h4 {
        font-size: 16px;
    }

    .info-content p,
    .info-content a {
        font-size: 14px;
    }

    .social-links {
        justify-content: center;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .map-container iframe {
        height: 300px;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        text-align: center;
    }

    .footer-section h4 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .footer-section p {
        font-size: 14px;
    }

    .footer-section ul li {
        margin-bottom: 10px;
    }

    .footer-section ul li a {
        font-size: 14px;
    }

    .footer-logo {
        font-size: 20px;
    }

    .footer-social a {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .footer-bottom p {
        font-size: 12px;
    }

    /* Modal */
    .modal {
        padding: 10px;
    }

    .modal-content {
        width: 100%;
    }

    .modal-body {
        padding: 20px 15px;
    }

    #modal-image {
        height: 200px;
    }

    .modal-info h2 {
        font-size: 20px;
    }

    .modal-info p {
        font-size: 14px;
    }

    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 28px;
        top: 10px;
        right: 10px;
    }

    .detail-item {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }

    .detail-item strong {
        min-width: auto;
        margin-bottom: 5px;
    }

    /* Floating Buttons */
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
        right: 15px;
        bottom: 20px;
    }

    /* Scroll Indicator */
    .scroll-indicator {
        display: none;
    }

    /* Section Padding */
    :root {
        --section-padding: 50px 0;
    }
}

/* ===================================
   Extra Small Devices (< 400px)
   =================================== */
@media (max-width: 400px) {
    .hero-title {
        font-size: 26px;
        min-height: 80px;
    }

    .section-title {
        font-size: 24px;
    }

    .stat-item h3 {
        font-size: 32px;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 14px;
    }

    .service-card,
    .feature-card,
    .testimonial-card {
        padding: 20px 15px;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   Landscape Orientation Fixes
   =================================== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: 32px;
        min-height: auto;
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .hero-stats {
        margin-top: 20px;
    }

    .scroll-indicator {
        display: none;
    }

    :root {
        --section-padding: 60px 0;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .navbar,
    .hamburger,
    .back-to-top,
    .floating-elements,
    .scroll-indicator,
    #preloader,
    #particles-js {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .section-padding {
        padding: 30px 0;
    }

    a {
        text-decoration: underline;
    }
}

/* ===================================
   Accessibility Improvements
   =================================== */

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced Motion for Users with Vestibular Disorders */
@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;
    }

    .floating-elements,
    .scroll-indicator {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0080FF;
        --text-secondary: #E0E0E0;
    }

    .service-card,
    .feature-card,
    .info-card,
    .testimonial-card {
        border-width: 2px;
    }
}

/* Dark Mode Preferences (System Level) */
@media (prefers-color-scheme: dark) {
    /* Already using dark theme by default */
}
