﻿* {
    box-sizing: border-box;
}

/* --- Enhanced Grid System for Accessibility --------------- */
.col-1 {
    width: 8.33%;
}

.col-2 {
    width: 16.66%;
}

.col-3 {
    width: 25%;
}

.col-4 {
    width: 33.33%;
}

.col-5 {
    width: 41.66%;
}

.col-6 {
    width: 50%;
}

.col-7 {
    width: 58.33%;
}

.col-8 {
    width: 66.66%;
}

.col-9 {
    width: 75%;
}

.col-10 {
    width: 83.33%;
}

.col-11 {
    width: 91.66%;
}

.col-12 {
    width: 100%;
}

[class*="col-"] {
    float: left;
    padding: 0.5rem; /* Add padding for better spacing at high zoom */
    min-height: auto; /* Allow flexible height */
    word-wrap: break-word; /* Prevent text overflow */
    /* Remove problematic border that could cause layout issues */
}

.fcol-1 {
    width: 8.33%;
}

.fcol-2 {
    width: 16.66%;
}

.fcol-3 {
    width: 25%;
}

.fcol-4 {
    width: 33.33%;
}

.fcol-5 {
    width: 41.66%;
}

.fcol-6 {
    width: 50%;
}

.fcol-7 {
    width: 58.33%;
}

.fcol-8 {
    width: 66.66%;
}

.fcol-9 {
    width: 75%;
}

.fcol-10 {
    width: 83.33%;
}

.fcol-11 {
    width: 91.66%;
}

.fcol-12 {
    width: 100%;
}

[class*="fcol-"] {
    float: left;
    padding: 0.5rem; /* Add padding for better spacing at high zoom */
    min-height: auto; /* Allow flexible height */
    word-wrap: break-word; /* Prevent text overflow */
    /* Remove problematic border that could cause layout issues */
}

.row {
    max-width: 100%; /* Remove fixed 1000px constraint for better flexibility */
    margin-left: auto;
    margin-right: auto;
    /* Enhance clearfix for better compatibility */
    overflow: auto;
    min-height: auto;
}

    .row::after {
        content: "";
        clear: both;
        display: table;
    }

/* --- Mobile-First Responsive Design ----------------------- */
/* Start with mobile layout, then enhance for larger screens */

/* Mobile Header Flexbox Layout */
/* CRITICAL: Override ALL .row properties for mobile header */
.row.mobile-header-row,
.navbar.mobile-only .row.mobile-header-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0.75rem 0.5rem !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
  /* Override ALL row class properties */
overflow: visible !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    min-height: auto !important;
}

/* Clear the ::after pseudo-element from row class */
.row.mobile-header-row::after,
.navbar.mobile-only .row.mobile-header-row::after {
    content: none !important;
    display: none !important;
    clear: none !important;
}

/* Ensure all children don't float */
.row.mobile-header-row > *,
.navbar.mobile-only .row.mobile-header-row > * {
    float: none !important;
}

.navbar.mobile-only .mobile-header-left,
.mobile-header-left {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    min-width: 48px !important;
    float: none !important;
    padding: 0 !important;
    width: auto !important;
}

.navbar.mobile-only .mobile-header-center,
.mobile-header-center {
    flex: 1 1 auto !important;
  display: flex !important;
    align-items: center !important;
    justify-content: start !important;
    text-align: center !important;
    min-width: 0 !important;
    float: none !important;
    padding: 0 !important;
    width: auto !important;
}

.navbar.mobile-only .mobile-header-right,
.mobile-header-right {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    min-width: fit-content !important;
    float: none !important;
    padding: 0 !important;
    width: auto !important;
}

/* Mobile Logo Sizing */
.logo-mob {
    max-width: 200px !important;
    width: 100% !important;
    height: auto !important;
  display: block !important;
}

/* Mobile Sign In Button */
.mobile-signin-btn {
    white-space: nowrap !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    min-width: 70px !important;
}

/* Mobile Account Info */
.mobile-acc-info {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    text-align: right !important;
    white-space: nowrap !important;
}

/* Mobile Menu Icon Adjustments */
.navbar.mobile-only .menu-icon {
    font-size: 2rem !important;
    padding: 0.5rem !important;
    margin: 0 !important;
    line-height: 1 !important;
 vertical-align: middle !important;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer !important;
    min-width: 48px !important;
    min-height: 48px !important;
}

.navbar.mobile-only .menu-icon:hover,
.navbar.mobile-only .menu-icon:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    outline: 2px solid #fff !important;
    outline-offset: -2px !important;
}

/* Mobile navbar specific styling */
.navbar.mobile-only {
    padding: 0 !important;
    background-image: linear-gradient(to bottom, #222222, #111111) !important;
    min-height: 60px !important;
}

    /* Mobile Navigation Menu */
.mob-nav-box {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: flex-start !important;
    padding-top: 60px !important;
}

.mobile-nav {
    background-color: #1a1a1a !important;
    width: 100% !important;
    max-width: 300px !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5) !important;
}

.mobile-nav-item {
    display: block !important;
    padding: 1rem 1.5rem !important;
    color: #fff !important;
    text-decoration: none !important;
    border-bottom: 1px solid #333 !important;
  transition: background-color 0.2s !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #333 !important;
    width: 100% !important;
    text-align: left !important;
    font-size: 1rem !important;
    cursor: pointer !important;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    background-color: #333 !important;
}

@media only screen and (max-width: 56.1875em) { /* 899px */
    /* Mobile Layout */
    [class^="col-"],
    [class^="fcol-"] {
        width: 100%;
        float: none !important;
     display: block;
     
    }
  
    /* Override for mobile header - use flexbox instead */
  .navbar.mobile-only [class^="col-"],
    .navbar.mobile-only [class^="fcol-"],
    .mobile-header-row [class^="col-"],
    .mobile-header-row [class^="fcol-"],
    .mobile-header-left,
    .mobile-header-center,
    .mobile-header-right {
        float: none !important;
        width: auto !important;
 padding: 0 !important;
display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }
    
    /* Mobile Navigation - Remove absolute positioning */
    .navbar {
        position: relative; /* Changed from absolute */
     top: auto;
        left: auto;
        right: auto;
    min-height: 3.5rem; /* Use min-height instead of fixed height */
    background-image: linear-gradient(to bottom, #222222, #111111);
        text-align: center;
padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    /* Specific styling for mobile navbar */
    .navbar.mobile-only {
    padding: 0 !important;
        background-image: linear-gradient(to bottom, #222222, #111111);
    }
    
    /* Ensure mobile header row stays flexbox */
    .navbar.mobile-only .row {
   overflow: visible !important;
    }
    
    .navbar.mobile-only .mobile-header-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    /* Mobile Content Area - Remove absolute positioning */
    .scroll-panel {
        position: relative !important; /* Remove absolute positioning */
 margin: 0 !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        padding: 1rem !important;
    }

    /* Mobile Footer - Remove absolute positioning */
    .footer-panel {
        position: relative !important; /* Changed from absolute */
        bottom: auto !important;
    left: auto !important;
    right: auto !important;
     background-color: #101010;
        color: #808080;
        padding: 0;
        margin-top: auto;
    }

    .scroll-panel-less {
        margin-top: 0 !important; /* Remove unnecessary margin */
  }
}

@media only screen and (min-width: 56.25em) { /* 900px */
    /* Desktop Layout */
    .mobile-only {
        display: none !important;
    }

    
    /* Desktop Grid System */
    [class*="col-"],
    [class*="fcol-"] {
        float: left;
    }

    /* Desktop Navigation - Remove absolute positioning */
    .navbar {
        position: relative; /* Changed from absolute */
        min-height: 3.5rem; /* Use min-height instead of fixed height */
        background-image: linear-gradient(to bottom, #222222, #111111);
        text-align: center;
        padding: 0.75rem;
    }

    /* Desktop Content - Remove absolute positioning */
    .scroll-panel {
        position: relative !important; /* Remove absolute positioning */
        margin: 0 !important;
        padding: 1.5rem !important;
        height: auto !important;
        overflow: visible !important;
    }

    .scroll-offset {
        width: 100%; /* Remove calc() complexity */
        max-width: 75rem; /* 1200px equivalent */
        text-align: left !important;
        padding: 1rem !important;
        margin: 0 auto !important;
    }

    /* Desktop Footer - Remove absolute positioning */
    .footer-panel {
        position: relative !important; /* Changed from absolute */
        background-color: #101010;
        color: #808080;
        padding: 0;
        margin-top: auto; /* Push to bottom of grid container */
    }

    /* Desktop Header - Remove absolute positioning */
    .top-panel {
        position: relative !important; /* Remove absolute positioning */
    }
}

/* --- High Zoom and Accessibility Breakpoints -------------- */
/* Additional breakpoint for extreme zoom levels */
@media (min-resolution: 2dppx), (max-width: 48em) { /* 768px */
    [class*="col-"],
    [class*="fcol-"] {
      width: 100%;
  float: none !important;
        display: block;
     
    }
    
    /* Exception: Keep mobile header in flexbox layout */
    .navbar.mobile-only [class^="col-"],
    .navbar.mobile-only [class^="fcol-"],
    .mobile-header-row,
    .mobile-header-left,
    .mobile-header-center,
    .mobile-header-right {
        width: auto !important;
        float: none !important;
      display: flex !important;
    }
    
    .row {
        margin: 0;
        padding: 0;
    }
    
    /* Keep mobile header row flexbox */
    .mobile-header-row {
 display: flex !important;
        flex-direction: row !important;
    }
}

/* --- Extreme Zoom / Very Small Screens -------------------- */
/* For screens below 640px, ensure mobile header stays horizontal */
@media (max-width: 40em) { /* 640px */
    /* Force single column layout for content */
    [class*="col-"],
    [class*="fcol-"] {
        width: 100% !important;
        float: none !important;
   display: block;
    }
    
    /* EXCEPTION: Mobile header must remain horizontal */
    .navbar.mobile-only,
    .navbar.mobile-only .mobile-header-row {
  display: flex !important;
    }
    
    .navbar.mobile-only [class^="col-"],
.navbar.mobile-only [class^="fcol-"],
    .navbar.mobile-only .mobile-header-row,
    .navbar.mobile-only .mobile-header-left,
    .navbar.mobile-only .mobile-header-center,
 .navbar.mobile-only .mobile-header-right {
        width: auto !important;
        float: none !important;
        display: flex !important;
    }
    
    .mobile-header-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }
    
    .mobile-header-left {
   flex: 0 0 auto !important;
    }
    
    .mobile-header-center {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    
    .mobile-header-right {
  flex: 0 0 auto !important;
    }
    
    /* Adjust logo size for very small screens */
    .logo-mob {
      max-width: 150px !important;
    }
    
    /* Adjust sign-in button for very small screens */
    .mobile-signin-btn {
  padding: 0.4rem 0.75rem !important;
   font-size: 0.8rem !important;
        min-width: 60px !important;
    }
    
    /* Adjust menu icon for very small screens */
    .navbar.mobile-only .menu-icon {
        min-width: 40px !important;
        min-height: 40px !important;
        font-size: 1.75rem !important;
    }
}

/* --- Container Flexibility Improvements ------------------- */
/* Ensure containers can expand for enlarged text */
.container {
    max-width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
}

/* --- Text and Content Overflow Prevention ----------------- */
/* Prevent any remaining overflow issues */
.row,
[class*="col-"],
[class*="fcol-"] {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* --- Remove Fixed Dimensions That Break at High Zoom ------ */
/* Override any remaining fixed heights from other stylesheets */
.h-50,
.h-245,
.mh-461,
.min-height-700 {
    height: auto !important;
    min-height: auto !important;
}

/* --- Focus Management for New Layout ---------------------- */
/* Ensure focus is managed properly in the new grid layout */
#main-layout {
    outline: none;
}

.main-content-area {
    outline: none;
}

.main-content-area:focus-within {
    /* Subtle indication when content area has focus */
    box-shadow: inset 0 0 0 2px rgba(0, 109, 204, 0.1);
}

/* --- Print Styles for Accessibility ----------------------- */
@media print {
    #main-layout {
        display: block !important;
        grid-template-rows: none !important;
    }
    
    .main-content-area {
        overflow: visible !important;
    }
    
    .footer-panel {
        position: static !important;
    }
}

/* --- Reduced Motion Support -------------------------------- */
/*@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}*/
