/* ASKera Design - Modern Responsive Media Queries */

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Extra Large Devices (Large Desktops, 1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    .hero-text h1 {
        font-size: 5.5rem;
    }
}

/* Large Devices (Desktops, 1200px and up) */
@media (max-width: 1200px) {
    :root {
        --section-padding: 80px;
    }

    .container {
        padding: 0 30px;
    }

    .hero-text h1 {
        font-size: 4rem;
    }

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

/* Medium Devices (Tablets, 992px and down) */
@media (max-width: 992px) {
    :root {
        --section-padding: 60px;
    }

    /* Navigation & Hamburger Menu */

    /* On mobile: hide desktop menu, show mobile menu */
    .nav-menu-desktop {
        display: none !important;
    }

    #mobile-nav {
        display: flex;
    }

    .hamburger {
        display: flex;
        position: relative;
        z-index: 100000;
        /* Above navbar to remain clickable */
    }

    .nav-menu {
        display: flex;
        /* Show mobile menu */
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        /* Use dynamic viewport height for mobile */
        background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px 30px 30px;
        /* Reduced top padding */
        gap: 0;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
        border-left: 2px solid rgba(124, 58, 237, 0.3);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        /* Smooth scrolling on iOS */
        visibility: hidden;
        opacity: 0;
        z-index: 99998;
        /* Below navbar but above overlay */
        /* CRITICAL FIX: Ensure menu starts at viewport top regardless of page scroll */
        overscroll-behavior: contain;
    }

    .nav-menu.active {
        right: 0;
        visibility: visible;
        opacity: 1;
    }

    .nav-menu li {
        width: 100%;
        margin: 0;
        padding: 0;
        opacity: 0;
        transform: translateX(50px);
        transition: all 0.3s ease;
    }

    .nav-menu.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-menu.active li:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav-menu.active li:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav-menu.active li:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav-menu.active li:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-menu.active li:nth-child(6) {
        transition-delay: 0.35s;
    }

    .nav-menu.active li:nth-child(7) {
        transition-delay: 0.4s;
    }

    .nav-menu.active li:nth-child(8) {
        transition-delay: 0.45s;
    }

    .nav-menu.active li:nth-child(9) {
        transition-delay: 0.5s;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        padding: 16px 20px;
        font-size: 1.05rem;
        border-radius: 12px;
        transition: all 0.3s ease;
        /* CRITICAL FIX: Ensure text is visible */
        color: var(--text-gray) !important;
        position: relative;
        z-index: 1;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(124, 58, 237, 0.15);
        transform: translateX(10px);
        padding-left: 30px;
        /* CRITICAL FIX: Ensure hover text is bright */
        color: var(--text-white) !important;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-menu .btn {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 99997;
        /* Overlay should be below menu and navbar */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .hamburger.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

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

    .hero-text h1 {
        font-size: 3.5rem;
    }

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

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

    /* Terms */
    .terms-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Reviews Carousel */
    .carousel-container {
        height: 500px;
    }

    .carousel-3d {
        width: 380px;
        height: 450px;
    }

    .review-card-3d {
        width: 380px;
        height: 450px;
        padding: 30px;
    }

    .review-card-3d[data-index="0"] {
        transform: rotateY(0deg) translateZ(500px);
    }

    .review-card-3d[data-index="1"] {
        transform: rotateY(60deg) translateZ(500px);
    }

    .review-card-3d[data-index="2"] {
        transform: rotateY(120deg) translateZ(500px);
    }

    .review-card-3d[data-index="3"] {
        transform: rotateY(180deg) translateZ(500px);
    }

    .review-card-3d[data-index="4"] {
        transform: rotateY(240deg) translateZ(500px);
    }

    .review-card-3d[data-index="5"] {
        transform: rotateY(300deg) translateZ(500px);
    }

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

    .contact-form {
        padding: 40px;
    }
}

/* Small Devices (Landscape Phones, 768px and down) */
@media (max-width: 768px) {
    :root {
        --section-padding: 50px;
    }

    .container {
        padding: 0 20px;
    }

    /* Navigation */
    .logo {
        font-size: 1.5rem;
    }

    .logo .design-text {
        font-size: 0.85rem;
        margin-left: 5px;
    }

    .nav-menu {
        width: 280px;
    }

    /* Hero Section */
    .hero {
        min-height: 85vh;
        padding-top: 70px;
    }

    .hero-text h1 {
        font-size: 2.8rem;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 35px;
    }

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

    .btn {
        padding: 14px 30px;
        font-size: 0.95rem;
    }

    .btn-call-me {
        padding: 16px 35px;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }

    /* Floating Shapes - Smaller on mobile */
    .shape-1 {
        width: 200px;
        height: 200px;
    }

    .shape-2 {
        width: 150px;
        height: 150px;
    }

    .shape-3 {
        width: 100px;
        height: 100px;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 50px;
    }

    .section-label {
        padding: 8px 18px;
        font-size: 0.75rem;
    }

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

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

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

    .service-icon {
        width: 70px;
        height: 70px;
    }

    .service-icon i {
        font-size: 2rem;
    }

    .service-card h3 {
        font-size: 1.3rem;
    }

    /* Terms */
    .terms-grid {
        grid-template-columns: 1fr;
    }

    .term-card {
        padding: 35px;
    }

    .term-card h3 {
        font-size: 1.5rem;
    }

    /* Reviews Carousel */
    .carousel-container {
        height: 550px;
        margin: 50px 0 30px;
    }

    .carousel-3d {
        width: 320px;
        height: 480px;
    }

    .review-card-3d {
        width: 320px;
        height: 480px;
        padding: 25px;
    }

    .review-card-3d[data-index="0"] {
        transform: rotateY(0deg) translateZ(400px);
    }

    .review-card-3d[data-index="1"] {
        transform: rotateY(60deg) translateZ(400px);
    }

    .review-card-3d[data-index="2"] {
        transform: rotateY(120deg) translateZ(400px);
    }

    .review-card-3d[data-index="3"] {
        transform: rotateY(180deg) translateZ(400px);
    }

    .review-card-3d[data-index="4"] {
        transform: rotateY(240deg) translateZ(400px);
    }

    .review-card-3d[data-index="5"] {
        transform: rotateY(300deg) translateZ(400px);
    }

    .client-avatar {
        width: 60px;
        height: 60px;
    }

    .client-info h4 {
        font-size: 1.1rem;
    }

    .review-text {
        font-size: 0.9rem;
    }

    .carousel-controls {
        gap: 20px;
        margin-top: 30px;
    }

    .carousel-btn {
        width: 45px;
        height: 45px;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }

    /* Contact */
    .contact-info h3 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    .contact-item {
        padding: 16px;
        margin-bottom: 20px;
    }

    .contact-icon {
        width: 45px;
        height: 45px;
    }

    .contact-icon i {
        font-size: 1.3rem;
    }

    .contact-details h4 {
        font-size: 1rem;
    }

    .contact-details p {
        font-size: 0.9rem;
    }

    .social-media-section h4 {
        font-size: 1.1rem;
    }

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

    .social-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .contact-form {
        padding: 30px;
    }

    .form-control {
        padding: 12px 16px;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .footer-links {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Extra Small Devices (Portrait Phones, 576px and down) */
@media (max-width: 576px) {
    :root {
        --section-padding: 40px;
    }

    .container {
        padding: 0 16px;
    }

    /* Navigation */
    .logo {
        font-size: 1.3rem;
    }

    .nav-menu {
        width: 260px;
        padding: 90px 25px 25px;
    }

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

    .hero-text h1 {
        font-size: 2.2rem;
        margin-bottom: 18px;
    }

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

    .btn-call-me {
        padding: 15px 30px;
        font-size: 0.95rem;
        width: 100%;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 40px;
    }

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

    .section-desc {
        font-size: 0.95rem;
    }

    /* Services */
    .services-grid {
        gap: 20px;
    }

    .service-card {
        padding: 25px;
    }

    .service-card h3 {
        font-size: 1.2rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    /* Terms */
    .term-card {
        padding: 25px;
    }

    .term-card h3 {
        font-size: 1.3rem;
    }

    .term-list li {
        padding: 12px 0;
        font-size: 0.9rem;
    }

    /* Reviews Carousel */
    .carousel-container {
        height: 520px;
    }

    .carousel-3d {
        width: 280px;
        height: 450px;
    }

    .review-card-3d {
        width: 280px;
        height: 450px;
        padding: 20px;
    }

    .review-card-3d[data-index="0"] {
        transform: rotateY(0deg) translateZ(350px);
    }

    .review-card-3d[data-index="1"] {
        transform: rotateY(60deg) translateZ(350px);
    }

    .review-card-3d[data-index="2"] {
        transform: rotateY(120deg) translateZ(350px);
    }

    .review-card-3d[data-index="3"] {
        transform: rotateY(180deg) translateZ(350px);
    }

    .review-card-3d[data-index="4"] {
        transform: rotateY(240deg) translateZ(350px);
    }

    .review-card-3d[data-index="5"] {
        transform: rotateY(300deg) translateZ(350px);
    }

    .review-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .client-avatar {
        width: 60px;
        height: 60px;
    }

    .client-info h4 {
        font-size: 1rem;
    }

    .client-info p {
        font-size: 0.85rem;
    }

    .client-location {
        font-size: 0.8rem;
        justify-content: center;
    }

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

    .review-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .carousel-controls {
        gap: 15px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-indicators {
        gap: 8px;
    }

    .autoplay-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    /* Contact */
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-form {
        padding: 25px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-control {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    textarea.form-control {
        min-height: 120px;
    }

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

    .footer-content p {
        font-size: 0.9rem;
    }

    .footer-links {
        gap: 15px;
    }

    .footer-links a {
        font-size: 0.9rem;
    }
}

/* Ultra Small Devices (320px and down) */
@media (max-width: 320px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }

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

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

    .carousel-3d {
        width: 260px;
        height: 420px;
    }

    .review-card-3d {
        width: 260px;
        height: 420px;
        padding: 18px;
    }

    .review-card-3d[data-index="0"] {
        transform: rotateY(0deg) translateZ(320px);
    }

    .review-card-3d[data-index="1"] {
        transform: rotateY(60deg) translateZ(320px);
    }

    .review-card-3d[data-index="2"] {
        transform: rotateY(120deg) translateZ(320px);
    }

    .review-card-3d[data-index="3"] {
        transform: rotateY(180deg) translateZ(320px);
    }

    .review-card-3d[data-index="4"] {
        transform: rotateY(240deg) translateZ(320px);
    }

    .review-card-3d[data-index="5"] {
        transform: rotateY(300deg) translateZ(320px);
    }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */

@media (max-width: 992px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding-top: 70px;
        padding-bottom: 40px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

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

    .carousel-container {
        height: 450px;
    }

    .section {
        padding: 50px 0;
    }
}

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

@media print {

    .navbar,
    .hamburger,
    .menu-overlay,
    .back-to-top,
    .carousel-controls,
    .carousel-autoplay-toggle,
    .contact-form,
    .social-links,
    .floating-shapes {
        display: none !important;
    }

    .hero-video {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    :root {
        --primary-purple: #9D6FFF;
        --accent-teal: #20E0C8;
    }

    .btn,
    .service-card,
    .term-card,
    .review-card-3d {
        border-width: 2px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .carousel-3d {
        animation: none;
    }

    .floating-shapes {
        display: none;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {

    .btn,
    .service-card,
    .contact-item,
    .social-icon {
        -webkit-tap-highlight-color: rgba(124, 58, 237, 0.2);
    }

    .btn {
        min-height: 44px;
    }

    .carousel-btn,
    .back-to-top {
        min-width: 44px;
        min-height: 44px;
    }

    .social-icon {
        min-width: 48px;
        min-height: 48px;
    }
}