/* ============================================
   RESPONSIVE STYLES - ANTI_QUANTUM WEBSITE
   All Screen Sizes & Operating Systems
   ============================================ */

/* Cross-browser compatibility - Vendor prefixes */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Base responsive images */
img:not(.exchange-slide img):not(.logo-img):not(.team-image img) {
    max-width: 100%;
    height: auto;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Team member images - must fill container exactly */
.team-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
}

/* Navbar logo - must NOT be overridden by any rule */
.navbar-brand .logo-img {
    height: 55px !important;
    width: auto !important;
    max-width: none !important;
    display: block !important;
}

/* Touch-friendly elements (minimum 44x44px touch target) */
a:not(.nav-link):not(.navbar-brand):not(.footer-links a):not(.social-links a):not(.team-social a),
button:not(.navbar-toggler):not(.admin-panel-close):not(.admin-panel-toggle):not(.admin-toggle-slider),
.btn,
.milestone-icon,
.chip-icon {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: rgba(0, 255, 204, 0.2);
}

/* Social icon buttons - force perfect circle, override any conflicting rule */
.social-links a,
.footer .social-links a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    border-radius: 50% !important;
    line-height: 1 !important;
    padding: 0 !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
}

/* Remove hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    .feature-card:hover,
    .product-card:hover,
    .tech-card:hover,
    .team-member-card:hover,
    .phase-chip:hover,
    .milestone-item:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

/* Desktop Large (1201px and above) - Default styles */
@media (min-width: 1201px) {
    .container {
        max-width: 1200px;
    }
}

/* Desktop Medium (max-width: 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding-left: 30px;
        padding-right: 30px;
    }

    .hero-title,
    .page-title {
        font-size: 3.5rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    /* Reduce orbital animations complexity */
    .orbit {
        animation-duration: 25s;
    }
}

/* Desktop Small (max-width: 992px) */
@media (max-width: 992px) {
    /* Typography */
    .hero-title,
    .page-title {
        font-size: 3rem;
        letter-spacing: 1px;
    }

    .hero-subtitle,
    .page-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    h3 {
        font-size: 1.6rem;
    }

    /* Spacing */
    .section-padding {
        padding: 60px 0;
    }

    /* Hero section */
    .hero-visual {
        margin-top: 40px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Cards */
    .feature-card,
    .product-card,
    .tech-card {
        padding: 25px;
        margin-bottom: 20px;
    }

    /* Roadmap - Milestones grid */
    .milestones-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .footer .col-lg-2 {
        margin-bottom: 30px;
    }
}

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .container,
    .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Navigation */
    .navbar {
        padding: 0.5rem 0;
        min-height: 60px;
    }

    .navbar .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }

    .navbar-brand {
        margin-right: 0;
    }

    .navbar-brand .logo-text {
        font-size: 1.1rem;
    }

    .navbar-brand .logo-img {
        height: 38px;
        width: auto;
    }

    .navbar-toggler {
        padding: 5px 9px;
    }

    .navbar-collapse {
        padding: 8px 0 4px;
        border-top: 1px solid rgba(0, 255, 204, 0.1);
        margin-top: 4px;
    }

    .nav-link {
        padding: 10px 16px !important;
        text-align: center;
        font-size: 1rem;
        border-radius: 8px;
        margin: 2px 8px !important;
    }

    .navbar-nav {
        margin-top: 5px;
    }

    .btn-presale {
        margin: 8px auto !important;
        display: block;
        width: fit-content;
    }

    /* Typography */
    .hero-title,
    .page-title {
        font-size: 2.5rem;
        letter-spacing: 0.5px;
    }

    .hero-subtitle,
    .page-subtitle {
        font-size: 1rem;
    }

    h2,
    .section-title {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* Spacing */
    .section-padding {
        padding: 50px 0;
    }

    .page-header {
        padding: 85px 0 45px;
    }

    /* Buttons */
    .hero-buttons,
    .cta-buttons {
        -webkit-flex-direction: column;
        -moz-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .hero-buttons .btn,
    .cta-buttons .btn {
        width: 100%;
        margin: 0 !important;
    }

    /* Security badges */
    .security-badges {
        -webkit-flex-direction: column;
        -moz-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .badge-item {
        width: 100%;
    }

    /* Cards */
    .feature-card,
    .product-card,
    .tech-card,
    .team-member-card {
        margin-bottom: 20px;
        padding: 25px;
    }

    /* Product images */
    .product-image {
        margin-bottom: 30px;
    }

    /* Threat stats */
    .threat-stats .stat-item {
        margin-bottom: 20px;
    }

    /* Footer */
    .footer {
        text-align: center;
    }

    .footer .row > div {
        margin-bottom: 30px;
    }

    .footer-links {
        padding-left: 0;
    }

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

    /* Visual elements */
    .quantum-sphere {
        width: 220px;
        height: 220px;
    }

    .orbit-1 {
        width: 280px;
        height: 280px;
    }

    .orbit-2 {
        width: 360px;
        height: 360px;
    }

    .orbit-3 {
        width: 440px;
        height: 440px;
    }

    /* Roadmap specific */
    .circuit-roadmap {
        padding: 20px 10px;
    }

    .phase-chip {
        padding: 20px;
        margin-bottom: 40px;
    }

    .chip-title {
        font-size: 1.5rem;
    }

    .milestones-grid {
        grid-template-columns: 1fr;
    }

    .circuit-line,
    .chip-connector {
        display: none;
    }

    /* Exchange slider - Adjust speed for tablet */
    .exchange-slide img {
        height: 35px;
    }

    @keyframes slide {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }

    .exchange-slider {
        animation: slide 8s linear infinite;
    }

    /* Contact form */
    .contact-form-wrapper,
    .contact-info-wrapper {
        margin-bottom: 30px;
    }

    /* Team cards */
    .team-member-card {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile (max-width: 576px) */
@media (max-width: 576px) {
    .container,
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Navigation */
    .navbar {
        padding: 0.4rem 0;
        min-height: 56px;
    }

    .navbar .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .navbar-brand .logo-img {
        height: 32px;
    }

    .navbar-brand .logo-text {
        font-size: 0.95rem;
    }

    .navbar-toggler {
        padding: 5px 8px;
    }

    .navbar-toggler-icon {
        width: 20px;
        height: 20px;
    }

    .nav-link {
        padding: 9px 12px !important;
        font-size: 0.9rem;
    }

    /* Typography - Mobile optimized */
    .hero-title,
    .page-title {
        font-size: 2rem;
        line-height: 1.2;
        letter-spacing: 0;
    }

    .hero-subtitle,
    .page-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    h2,
    .section-title {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 1rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
    }

    p,
    .text-light {
        font-size: 0.95rem;
    }

    /* Spacing */
    .section-padding {
        padding: 40px 0;
    }

    .page-header {
        padding: 78px 0 35px;
    }

    /* Buttons - Full width, touch-friendly */
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
        min-height: 52px;
    }

    .hero-buttons .btn,
    .cta-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Cards - Optimized for mobile */
    .feature-card,
    .product-card,
    .tech-card,
    .team-member-card {
        padding: 20px;
        margin-bottom: 15px;
        border-radius: 10px;
        -webkit-box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
        -moz-box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    }

    /* Icons - Reduce size */
    .feature-icon,
    .product-icon,
    .tech-icon {
        font-size: 2rem;
        width: 60px;
        height: 60px;
    }

    /* Lists */
    .product-features,
    .tech-features,
    .tech-list {
        font-size: 0.85rem;
        padding-left: 20px;
    }

    .product-features li,
    .tech-features li,
    .tech-list li {
        padding: 6px 0;
    }

    /* Security badges */
    .security-badges {
        gap: 8px;
    }

    .badge-item {
        font-size: 0.75rem;
        padding: 8px 12px;
    }

    .badge-item i {
        font-size: 0.9rem;
    }

    /* Threat stats */
    .stat-icon {
        font-size: 1.5rem;
        width: 50px;
        height: 50px;
    }

    .stat-content h4 {
        font-size: 1rem;
    }

    .stat-content p {
        font-size: 0.85rem;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
        text-align: center;
    }

    .footer h5 {
        font-size: 1rem;
        margin-top: 25px;
        margin-bottom: 15px;
    }

    .footer-links {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .footer-brand h4 {
        font-size: 1.3rem;
    }

    .footer-brand p {
        font-size: 0.85rem;
    }

    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin: 0 5px;
    }

    .copyright {
        font-size: 0.8rem;
        padding-top: 15px;
    }

    /* Visual elements - Reduce for performance */
    .quantum-sphere {
        width: 150px;
        height: 150px;
    }

    .orbit-1 {
        width: 200px;
        height: 200px;
    }

    .orbit-2 {
        width: 270px;
        height: 270px;
    }

    .orbit-3 {
        width: 340px;
        height: 340px;
    }

    /* Scroll indicator - Hide on mobile */
    .scroll-indicator {
        display: none;
    }

    /* Particle background - Reduce for performance */
    #particles-js {
        opacity: 0.2;
    }

    /* SVG visuals */
    .threat-visual svg,
    .tech-visual img {
        max-width: 250px;
        margin: 0 auto;
    }

    /* Architecture diagram */
    .architecture-diagram img {
        max-width: 100%;
    }

    /* ROADMAP SPECIFIC - Mobile */
    .roadmap-circuit-section {
        padding: 100px 0 40px;
    }

    .circuit-roadmap {
        padding: 20px 5px;
    }

    .phase-chip {
        padding: 18px;
        margin-bottom: 25px;
        width: 100%;
    }

    .chip-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .chip-quarter {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .chip-status {
        font-size: 0.7rem;
        padding: 3px 10px;
    }

    .chip-title {
        font-size: 1.3rem;
        gap: 10px;
    }

    .chip-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .chip-description {
        font-size: 0.85rem;
    }

    .chip-progress {
        margin: 15px 0;
    }

    .progress-label {
        font-size: 0.75rem;
    }

    .progress-bar-container {
        height: 6px;
    }

    .milestones-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .milestone-item {
        padding: 12px;
    }

    .milestone-icon {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .milestone-text {
        font-size: 0.85rem;
    }

    /* Exchange slider - Mobile */
    .exchange-slider-container {
        padding: 10px 0 0 0;
    }

    .exchange-slide {
        gap: 40px;
        padding: 0 20px;
    }

    .exchange-slide img {
        height: 30px !important;
    }

    .exchange-slider {
        animation: slide 10s linear infinite;
    }

    /* Admin panel - Mobile */
    .admin-panel-toggle {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .admin-panel {
        width: 100%;
        right: -100%;
    }

    .admin-login-box {
        width: 90%;
        padding: 30px;
    }

    /* CONTACT FORM - Mobile */
    .form-control,
    .form-select {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .contact-icon {
        margin-bottom: 10px;
    }

    .security-notice {
        font-size: 0.85rem;
        padding: 15px;
    }

    /* TEAM PAGE - Mobile */
    .team-member-card {
        max-width: 100%;
    }

    .team-info h4 {
        font-size: 1.2rem;
    }

    .team-info .role {
        font-size: 0.9rem;
    }

    .team-info .bio {
        font-size: 0.85rem;
    }

    /* TECHNOLOGY PAGE - Mobile */
    .tech-badges {
        flex-direction: column;
        gap: 8px;
    }

    .tech-badge {
        width: 100%;
        text-align: center;
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .layer-card {
        padding: 20px;
        margin-bottom: 15px;
    }

    .layer-card h4 {
        font-size: 1.1rem;
    }

    .layer-card p {
        font-size: 0.85rem;
    }

    .security-feature {
        padding: 20px;
        margin-bottom: 15px;
    }

    .feature-number {
        font-size: 2rem;
    }

    .spec-card {
        padding: 20px;
        margin-bottom: 15px;
    }

    .spec-list {
        font-size: 0.85rem;
    }

    /* PRODUCTS PAGE - Mobile */
    .product-badge {
        font-size: 0.7rem;
        padding: 4px 12px;
    }

    .feature-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .feature-item i {
        margin-bottom: 8px;
    }

    .platform-badges {
        flex-direction: column;
        gap: 8px;
    }

    .platform-badge {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 0.85rem;
    }

    .chain-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .chain-item {
        padding: 15px 10px;
        font-size: 0.85rem;
    }
}

/* Extra small devices (max-width: 375px) */
@media (max-width: 375px) {
    .hero-title,
    .page-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .feature-card,
    .product-card,
    .tech-card {
        padding: 15px;
    }

    .btn-lg {
        padding: 12px 18px;
        font-size: 0.9rem;
    }

    .chip-title {
        font-size: 1.1rem;
    }

    .exchange-slide img {
        height: 25px !important;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .page-header {
        padding: 80px 0 30px;
    }

    .hero-visual {
        display: none;
    }

    .quantum-sphere,
    .orbit {
        display: none;
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .logo-img,
    .team-image img,
    .product-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduce motion for accessibility */
@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;
    }

    .orbit,
    .quantum-sphere,
    .circuit-current,
    .exchange-slider {
        animation: none !important;
    }
}

/* Dark mode support (if system preference) */
@media (prefers-color-scheme: dark) {
    /* Already dark by default, but can add adjustments */
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .scroll-indicator,
    #particles-js,
    .hero-buttons,
    .cta-buttons,
    .admin-panel,
    .admin-panel-toggle,
    .admin-login-modal {
        display: none !important;
    }

    .hero-section,
    .section-padding {
        padding: 20px 0;
    }

    .feature-card,
    .product-card,
    .tech-card {
        page-break-inside: avoid;
    }

    .phase-chip {
        page-break-inside: avoid;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a {
        text-decoration: underline;
    }
}
