/* Golang Healthcare - Mobile Responsive Styles */

/* ========================================
   MOBILE OPTIMIZATIONS
   ======================================== */

/* Base mobile improvements */
@media (max-width: 991px) {

    /* Typography - Better readability on mobile */
    body {
        font-size: 14px;
        line-height: 1.6;
    }

    h1,
    .display-1 {
        font-size: 2rem !important;
    }

    h2,
    .display-2 {
        font-size: 1.75rem !important;
    }

    h3,
    .display-3 {
        font-size: 1.5rem !important;
    }

    h4,
    .display-4 {
        font-size: 1.25rem !important;
    }

    h5,
    .display-5 {
        font-size: 1.1rem !important;
    }

    /* Navigation - Mobile friendly */
    .navbar {
        padding: 0.5rem 1rem;
    }

    .navbar-brand img {
        max-height: 35px !important;
    }

    .navbar-toggler {
        padding: 0.5rem;
        font-size: 1.25rem;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    [data-theme="dark"] .navbar-collapse {
        background-color: rgba(21, 27, 61, 0.98);
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    /* Buttons - Touch friendly */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .btn-sm {
        min-height: 38px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    /* Forms - Touch friendly inputs */
    .form-control {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    select.form-control {
        font-size: 16px;
    }

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

    /* Cards - Better spacing */
    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Result/Stats section */
    .resultitem {
        margin-bottom: 1rem;
        padding: 1.5rem 1rem !important;
    }

    .resultitem h1 {
        font-size: 2.5rem !important;
    }

    /* Footer - Stack columns */
    footer .row>div {
        margin-bottom: 1.5rem;
    }

    footer .social-icon2 li {
        margin: 0 0.5rem;
    }

    /* Spacing adjustments */
    .py-8 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .py-10 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    .pb-8 {
        padding-bottom: 3rem !important;
    }

    .pb-10 {
        padding-bottom: 4rem !important;
    }

    /* Container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Dark mode toggle - Better positioning */
    .dark-mode-toggle {
        font-size: 1.5rem;
        padding: 0.75rem;
    }
}

/* ========================================
   TABLET OPTIMIZATIONS (768px - 991px)
   ======================================== */

@media (min-width: 768px) and (max-width: 991px) {

    .display-1 {
        font-size: 2.5rem !important;
    }

    .display-2 {
        font-size: 2rem !important;
    }

    .display-3 {
        font-size: 1.75rem !important;
    }

    .display-4 {
        font-size: 1.5rem !important;
    }

    .display-5 {
        font-size: 1.25rem !important;
    }
}

/* ========================================
   SMALL MOBILE (max-width: 576px)
   ======================================== */

@media (max-width: 576px) {

    /* Extra small text adjustments */
    body {
        font-size: 13px;
    }

    h1,
    .display-1 {
        font-size: 1.75rem !important;
    }

    h2,
    .display-2 {
        font-size: 1.5rem !important;
    }

    h3,
    .display-3 {
        font-size: 1.25rem !important;
    }

    /* Logo */
    .navbar-brand img,
    .site-logo {
        max-height: 30px !important;
    }

    /* Buttons - Full width on small screens */
    .btn-block-mobile {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Forms */
    .form-control {
        font-size: 16px;
        /* Prevent zoom */
    }

    /* Result items */
    .resultitem {
        padding: 1rem !important;
    }

    .resultitem h1 {
        font-size: 2rem !important;
    }

    .resultitem p {
        font-size: 0.875rem;
    }

    /* Reduce padding on small screens */
    .py-8 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .py-10 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

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

    footer .row>div {
        text-align: center !important;
    }

    footer ul {
        justify-content: center;
    }

    /* Modal - Full screen on mobile */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 8px;
    }
}

/* ========================================
   REGISTRATION PAGE MOBILE
   ======================================== */

@media (max-width: 991px) {

    /* Registration page - Remove fixed banner on mobile */
    .jarallax {
        position: relative !important;
        height: auto !important;
        min-height: 200px;
    }

    /* Form container */
    .authorization__form {
        padding: 1.5rem;
    }

    /* Remove scroll on mobile */
    .col-lg-7.col-xl-8 {
        max-height: none !important;
        overflow-y: visible !important;
    }
}

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

/* Larger tap targets */
@media (hover: none) and (pointer: coarse) {

    /* Links */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Buttons */
    .btn {
        min-height: 48px;
    }

    /* Form controls */
    .form-control,
    .custom-select {
        min-height: 48px;
    }

    /* Checkboxes and radios */
    .custom-control-label::before,
    .custom-control-label::after {
        width: 1.5rem;
        height: 1.5rem;
    }

    /* Remove hover effects on touch devices */
    .lift-sm:hover,
    .lift:hover {
        transform: none !important;
    }
}

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

@media (max-width: 991px) and (orientation: landscape) {

    /* Reduce vertical padding in landscape */
    .py-8 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .py-10 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    /* Navigation */
    .navbar-collapse {
        max-height: 60vh;
        overflow-y: auto;
    }
}

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

/* Focus states for keyboard navigation */
a:focus,
button:focus,
.btn:focus,
.form-control:focus,
.custom-control-input:focus~.custom-control-label::before {
    outline: 2px solid #0079f4;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0079f4;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Reduce animations on mobile for better performance */
@media (max-width: 991px) {

    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }

    [data-aos] {
        animation-duration: 0.4s !important;
    }
}

/* 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;
    }
}

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

@media print {

    /* Hide unnecessary elements */
    .navbar,
    .dark-mode-toggle,
    footer,
    .btn,
    .social-icon2 {
        display: none !important;
    }

    /* Optimize for printing */
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }

    /* Page breaks */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
    }

    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}