/* ========================================
   MOBILE RESPONSIVE CSS - UX PRINCIPLES
   ======================================== */

/* ========================================
   MOBILE-FIRST BREAKPOINTS
   ======================================== */
/* Mobile: 320px - 767px */
/* Tablet: 768px - 1023px */
/* Desktop: 1024px+ */

/* ========================================
   GLOBAL MOBILE STYLES
   ======================================== */

/* Base mobile styles */
@media (max-width: 767px) {
    /* Typography scaling for mobile */
    html {
        font-size: 14px; /* Base font size for mobile */
    }
    
    body {
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* Touch-friendly button sizes (minimum 44px) */
    .btn, button, input[type="submit"], input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
        font-size: 16px; /* Prevent zoom on iOS */
        border-radius: 8px;
        touch-action: manipulation;
    }
    
    /* Form inputs - larger for mobile */
    .form-control, input, textarea, select {
        min-height: 44px;
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 16px;
        border-radius: 8px;
        border: 2px solid #e1e5e9;
        transition: border-color 0.3s ease;
    }
    
    .form-control:focus, input:focus, textarea:focus, select:focus {
        border-color: #57f9ff;
        box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
        outline: none;
    }
    
    /* Links - larger touch targets */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        text-decoration: none;
    }
    
    /* Improved spacing for mobile */
    .container, .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Better line heights for readability */
    p, .lead {
        line-height: 1.6;
        margin-bottom: 16px;
    }
    
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.3;
        margin-bottom: 16px;
    }
}

/* ========================================
   AUTHENTICATION FORMS - MOBILE
   ======================================== */

@media (max-width: 767px) {
    /* Split screen becomes single column on mobile */
    .split-screen-container {
        flex-direction: column;
        min-height: 100vh;
    }
    
    .video-section {
        order: 2;
        height: 40vh;
        min-height: 200px;
    }
    
    .form-section {
        order: 1;
        width: 100%;
        padding: 20px 16px;
        min-height: 60vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .login-form-container {
        width: 100%;
        max-width: 400px;
    }
    
    .login-card {
        padding: 24px 20px;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    /* Form groups spacing */
    .form-group {
        margin-bottom: 20px;
    }
    
    /* Labels */
    .form-label {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 8px;
        color: #374151;
    }
    
    /* Input fields */
    .form-control {
        height: 48px;
        font-size: 16px;
        padding: 12px 16px;
        border-radius: 8px;
        border: 2px solid #e5e7eb;
        transition: all 0.3s ease;
    }
    
    .form-control:focus {
        border-color: #57f9ff;
        box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
        outline: none;
    }
    
    /* Password toggle button */
    .password-toggle {
        right: 12px !important;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        transition: background-color 0.3s ease;
    }
    
    .password-toggle:hover {
        background-color: rgba(147, 51, 234, 0.1);
    }
    
    /* Submit button */
    .btn-primary {
        width: 100%;
        height: 48px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
        background: linear-gradient(135deg, #57f9ff 0%, #57f9ff 100%);
        border: none;
        transition: all 0.3s ease;
    }
    
    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
    }
    
    /* Google button */
    .google-btn {
        width: 100%;
        height: 48px;
        font-size: 16px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        transition: all 0.3s ease;
    }
    
    /* Checkbox styling */
    .form-check-input {
        width: 20px;
        height: 20px;
        margin-top: 2px;
    }
    
    .form-check-label {
        font-size: 14px;
        line-height: 1.5;
        margin-left: 8px;
    }
    
    /* reCAPTCHA responsive */
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: left top;
        margin-bottom: 16px;
    }
    
    /* Toggle links */
    .toggle-link {
        font-size: 13px;
        font-weight: 600;
        color: #57f9ff;
        text-decoration: none;
        padding: 8px 0;
        display: inline-block;
    }
    
    /* Auth title and text */
    #auth-title {
        font-size: 28px;
        font-weight: 700;
        text-align: center;
        margin-bottom: 8px;
        color: #ffffff;
    }
    
    .auth-content p {
        text-align: center;
        font-size: 16px;
        color: #6b7280;
        margin-bottom: 24px;
    }
    
    /* Logo positioning */
    .logo-only {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
    }
    
    .logo-only .logo {
        height: 40px;
        width: auto;
    }
    
    /* Video section mobile */
    .video-section {
        position: relative;
        overflow: hidden;
    }
    
    .video-background video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Error and success messages */
    .alert {
        border-radius: 8px;
        padding: 12px 16px;
        margin-bottom: 20px;
        font-size: 14px;
        border: none;
    }
    
    .alert-danger {
        background-color: #fef2f2;
        color: #dc2626;
        border-left: 4px solid #dc2626;
    }
    
    .alert-success {
        background-color: #f0fdf4;
        color: #16a34a;
        border-left: 4px solid #16a34a;
    }
}

/* ========================================
   HEADER/NAVIGATION - MOBILE
   ======================================== */

@media (max-width: 767px) {
    /* Header mobile styles */
    .nk-header {
        padding: 12px 0;
    }
    
    .nk-header-wrap {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .nk-header-logo .logo-img {
        height: 35px;
        width: auto;
    }
    
    /* Mobile menu toggle */
    .header-menu-toggle {
        width: 44px;
        height: 44px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f3f4f6;
        border: 1px solid #e5e7eb;
    }
    
    /* Mobile navigation menu */
    .nk-header-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 9999;
        padding: 20px;
        overflow-y: auto;
    }
    
    .nk-header-menu.active {
        left: 0;
    }
    
    .nk-menu-list {
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 0;
    }
    
    .nk-menu-link {
        display: block;
        padding: 16px 0;
        font-size: 16px;
        font-weight: 500;
        color: #374151;
        text-decoration: none;
        transition: color 0.3s ease;
    }
    
    .nk-menu-link:hover {
        color: #57f9ff;
    }
    
    /* Mobile menu buttons */
    .nk-menu-buttons {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }
    
    .nk-menu-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Dark mode toggle mobile */
    .dark-mode-toggle {
        width: 44px;
        height: 44px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f3f4f6;
        border: 1px solid #e5e7eb;
        margin-right: 12px;
    }
}

/* ========================================
   HOMEPAGE - MOBILE
   ======================================== */

@media (max-width: 767px) {
    /* Hero section mobile */
    .hero-section-main {
        padding: 20px 0;
    }
    
    .hero-section-main h2 {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 24px;
        text-align: center;
    }
    
    /* Service cards mobile */
    .hero-section-card {
        margin-bottom: 20px;
        border-radius: 16px;
    }
    
    .hero-section-card img {
        height: 200px;
        object-fit: cover;
    }
    
    .hero-section-card-content {
        padding: 16px;
        height: auto;
        position: relative;
        background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    }
    
    .hero-section-card-content h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .hero-section-card-content p {
        font-size: 14px;
        margin-bottom: 0;
    }
    
    /* Video slider mobile */
    .video-slider {
        height: 250px;
        margin-bottom: 30px;
    }
    
    .swiper-slide video {
        height: 100%;
        object-fit: cover;
    }
    
    /* iGenUltra section mobile */
    .igen-ultra-section {
        padding: 40px 0;
        min-height: auto;
    }
    
    .igen-ultra-section h2 {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 30px;
        text-align: center;
    }
    
    /* Slider mobile adjustments */
    .igen-ultra-slider .swiper {
        height: 200px;
    }
    
    .igen-ultra-slider .swiper-slide h3 {
        font-size: 18px;
        height: 60px;
        margin: 5px;
        padding: 0 10px;
    }
    
    .igenUltraSliderTitle .swiper-slide {
        height: 120px;
    }
    
    /* Hero content mobile */
    .nk-hero-content {
        text-align: center;
        padding: 20px 0;
    }
    
    .nk-hero-content h1 {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 16px;
    }
    
    .nk-hero-content .lead {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 24px;
    }
    
    .nk-hero-content .btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto 16px;
    }
    
    /* Review video mobile */
    .review-video {
        height: 200px;
        border-radius: 12px;
    }
    
    /* Final CTA section mobile */
    .block-text h2 {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 16px;
    }
    
    .block-text .lead {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 24px;
    }
    
    .block-text .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* ========================================
   FOOTER - MOBILE
   ======================================== */

@media (max-width: 767px) {
    .nk-footer {
        padding: 40px 0 20px;
    }
    
    /* Footer container mobile */
    .nk-footer .container-fluid {
        padding: 0 16px;
    }
    
    /* Top section mobile - stack columns */
    .nk-footer .row:first-child {
        flex-direction: column;
        gap: 30px;
    }
    
    /* Services section mobile */
    .nk-footer .col-lg-4:first-child {
        order: 1;
    }
    
    .nk-footer .col-lg-4:first-child h3 {
        font-size: 20px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .nk-footer .col-lg-4:first-child .row {
        flex-direction: column;
        gap: 0;
    }
    
    .nk-footer .col-lg-4:first-child ul {
        margin-bottom: 20px;
    }
    
    .nk-footer .col-lg-4:first-child li {
        margin-bottom: 12px;
        text-align: center;
    }
    
    .nk-footer .col-lg-4:first-child a {
        font-size: 16px;
        padding: 8px 0;
        display: block;
    }
    
    /* Company section mobile */
    .nk-footer .col-lg-4:nth-child(2) {
        order: 2;
    }
    
    .nk-footer .col-lg-4:nth-child(2) h3 {
        font-size: 20px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .nk-footer .col-lg-4:nth-child(2) ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .nk-footer .col-lg-4:nth-child(2) li {
        text-align: center;
    }
    
    .nk-footer .col-lg-4:nth-child(2) a {
        font-size: 16px;
        padding: 8px 0;
        display: block;
    }
    
    /* Social icons mobile */
    .nk-footer .col-lg-4:last-child {
        order: 3;
        text-align: center;
    }
    
    .nk-footer .social-icons {
        justify-content: center;
        gap: 20px;
    }
    
    .nk-footer .social-icons a {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }
    
    .nk-footer .social-icons a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }
    
    /* Bottom section mobile */
    .nk-footer .row:last-child {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #333;
    }
    
    .nk-footer .col-md-6:first-child {
        order: 2;
    }
    
    .nk-footer .col-md-6:last-child {
        order: 1;
    }
    
    .nk-footer .col-md-6 p {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .nk-footer .col-md-6 .d-flex {
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .nk-footer .col-md-6 a {
        font-size: 14px;
        padding: 4px 0;
    }
}

/* ========================================
   DASHBOARD - MOBILE
   ======================================== */

@media (max-width: 767px) {
    /* Dashboard container mobile */
    .nk-app-root {
        padding-top: 0;
    }
    
    /* Sidebar mobile */
    .nk-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
        z-index: 9999;
    }
    
    .nk-sidebar.active {
        transform: translateX(0);
    }
    
    .nk-sidebar .logo img {
        height: 50px;
    }
    
    .nk-sidebar .nk-menu-item {
        margin-bottom: 8px;
    }
    
    .nk-sidebar .nk-menu-link {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .nk-sidebar .nk-menu-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Main content mobile */
    .new-body-content {
        width: 100%;
        margin: 0;
        padding: 16px;
    }
    
    /* Dashboard cards mobile */
    .nk-block {
        margin-bottom: 20px;
    }
    
    .card {
        border-radius: 12px;
        margin-bottom: 16px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    /* Dashboard slider mobile */
    .dashboard-swiper {
        height: 200px;
        border-radius: 12px;
    }
    
    .slide-content {
        max-width: 90%;
    }
    
    .top-text {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .main-text {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 16px;
    }
    
    .cta-button {
        font-size: 14px;
        padding: 10px 20px;
        border-radius: 8px;
    }
    
    /* AI tools mobile */
    .nk-editor-main.ai-tools-user-main {
        flex-direction: column;
        padding: 0 16px;
        gap: 16px;
    }
    
    .nk-editor-base.ai-tools-user-section {
        width: 100%;
        order: 2;
    }
    
    .ai-tools-user-main .ai-tools-body {
        width: 100%;
        order: 1;
    }
    
    .ai-tools-user-section form {
        padding: 20px !important;
        border-radius: 12px;
    }
    
    .ai-tools-ul {
        flex-direction: column;
        gap: 12px;
    }
    
    .ai-tools-ul li {
        width: 100%;
    }
    
    .nk-editor-base .ai-tools-ul .nav-link {
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    /* Preloader mobile */
    .preloader, .skeleton {
        height: 300px;
        border-radius: 12px;
    }
    
    /* My assets grid mobile */
    .grid-asset {
        column-count: 2;
        column-gap: 8px;
        padding: 16px;
    }
    
    .grid-item {
        margin-bottom: 8px;
        border-radius: 8px;
    }
    
    .grid-item-icon {
        padding: 8px;
    }
    
    .grid-icons {
        gap: 20px;
    }
    
    .grid-icons button {
        font-size: 18px;
    }
}

/* ========================================
   FORMS - MOBILE UX IMPROVEMENTS
   ======================================== */

@media (max-width: 767px) {
    /* All forms mobile improvements */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-label {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 8px;
        color: #374151;
        display: block;
    }
    
    .form-control, input, textarea, select {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
        padding: 12px 16px;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        background-color: #ffffff;
        transition: all 0.3s ease;
    }
    
    .form-control:focus, input:focus, textarea:focus, select:focus {
        border-color: #57f9ff;
        box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
        outline: none;
    }
    
    /* Textarea specific */
    textarea {
        min-height: 120px;
        resize: vertical;
    }
    
    /* Select dropdown */
    select {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 12px center;
        background-repeat: no-repeat;
        background-size: 16px;
        padding-right: 40px;
    }
    
    /* Checkbox and radio */
    .form-check-input {
        width: 20px;
        height: 20px;
        margin-top: 2px;
    }
    
    .form-check-label {
        font-size: 16px;
        line-height: 1.5;
        margin-left: 8px;
        color: #374151;
    }
    
    /* File input */
    input[type="file"] {
        padding: 8px;
        border: 2px dashed #d1d5db;
        background-color: #f9fafb;
    }
    
    input[type="file"]:focus {
        border-color: #57f9ff;
        background-color: #ffffff;
    }
    
    /* Form validation */
    .is-invalid {
        border-color: #dc2626;
    }
    
    .invalid-feedback {
        font-size: 14px;
        color: #dc2626;
        margin-top: 4px;
    }
    
    .is-valid {
        border-color: #16a34a;
    }
    
    .valid-feedback {
        font-size: 14px;
        color: #16a34a;
        margin-top: 4px;
    }
}

/* ========================================
   UTILITY CLASSES - MOBILE
   ======================================== */

@media (max-width: 767px) {
    /* Spacing utilities */
    .mobile-p-0 { padding: 0 !important; }
    .mobile-p-1 { padding: 8px !important; }
    .mobile-p-2 { padding: 16px !important; }
    .mobile-p-3 { padding: 24px !important; }
    .mobile-p-4 { padding: 32px !important; }
    
    .mobile-m-0 { margin: 0 !important; }
    .mobile-m-1 { margin: 8px !important; }
    .mobile-m-2 { margin: 16px !important; }
    .mobile-m-3 { margin: 24px !important; }
    .mobile-m-4 { margin: 32px !important; }
    
    /* Text utilities */
    .mobile-text-center { text-align: center !important; }
    .mobile-text-left { text-align: left !important; }
    .mobile-text-right { text-align: right !important; }
    
    /* Display utilities */
    .mobile-d-none { display: none !important; }
    .mobile-d-block { display: block !important; }
    .mobile-d-flex { display: flex !important; }
    .mobile-d-grid { display: grid !important; }
    
    /* Flex utilities */
    .mobile-flex-column { flex-direction: column !important; }
    .mobile-flex-row { flex-direction: row !important; }
    .mobile-justify-center { justify-content: center !important; }
    .mobile-align-center { align-items: center !important; }
    
    /* Width utilities */
    .mobile-w-100 { width: 100% !important; }
    .mobile-w-50 { width: 50% !important; }
    .mobile-w-25 { width: 25% !important; }
    
    /* Font size utilities */
    .mobile-fs-12 { font-size: 12px !important; }
    .mobile-fs-14 { font-size: 14px !important; }
    .mobile-fs-16 { font-size: 16px !important; }
    .mobile-fs-18 { font-size: 18px !important; }
    .mobile-fs-20 { font-size: 20px !important; }
    .mobile-fs-24 { font-size: 24px !important; }
    .mobile-fs-28 { font-size: 28px !important; }
    .mobile-fs-32 { font-size: 32px !important; }
}

/* ========================================
   TABLET STYLES (768px - 1023px)
   ======================================== */

@media (min-width: 768px) and (max-width: 1023px) {
    /* Tablet-specific adjustments */
    .container-fluid {
        width: 95%;
        padding: 0 20px;
    }
    
    /* Typography scaling for tablet */
    h1 { font-size: 36px; line-height: 1.2; }
    h2 { font-size: 32px; line-height: 1.2; }
    h3 { font-size: 28px; line-height: 1.3; }
    h4 { font-size: 24px; line-height: 1.3; }
    h5 { font-size: 20px; line-height: 1.4; }
    h6 { font-size: 18px; line-height: 1.4; }
    
    /* Form improvements for tablet */
    .form-control, input, textarea, select {
        font-size: 16px;
        padding: 12px 16px;
    }
    
    /* Button improvements for tablet */
    .btn {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    /* Grid adjustments for tablet */
    .row {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
    
    /* Hero section tablet */
    .hero-section-card {
        margin-bottom: 24px;
    }
    
    .hero-section-card img {
        height: 250px;
    }
    
    /* Video slider tablet */
    .video-slider {
        height: 300px;
    }
    
    /* Dashboard tablet */
    .dashboard-swiper {
        height: 250px;
    }
    
    .main-text {
        font-size: 24px;
    }
    
    /* AI tools tablet */
    .nk-editor-main.ai-tools-user-main {
        gap: 24px;
    }
    
    .preloader, .skeleton {
        height: 400px;
    }
    
    /* My assets tablet */
    .grid-asset {
        column-count: 3;
        column-gap: 12px;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

    
    /* High contrast mode support */
    @media (prefers-contrast: high) {
        .btn-primary {
            border: 2px solid #000;
        }
        
        .form-control {
            border: 2px solid #000;
        }
    }
    
    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .nk-header,
    .nk-footer,
    .btn,
    .form-control,
    .mobile-menu-overlay,
    .nk-sidebar {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container-fluid {
        width: 100%;
        padding: 0;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    p, li {
        orphans: 3;
        widows: 3;
    }
}
