/* WhiteWater Express Intranet Styles */

/* ========================================
   FONT DECLARATIONS
   ======================================== */
@font-face {
    font-family: 'Sony Sketch EF';
    src: url('../fonts/sony-sketch-ef/Sony_Sketch_EF.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Cooper Hewitt';
    src: url('../fonts/cooper-hewitt/CooperHewitt-Book.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Cooper Hewitt';
    src: url('../fonts/cooper-hewitt/CooperHewitt-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Fineday Two';
    src: url('../fonts/Fineday/Fineday-StyleTwonon-connect.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --accent: #1a4d9f;
    --accent-600: #173f81;
    --accent-300: #d8e3f8;
    --on-accent: #fff;
    --brand-blue-dark: #21145F;
    --brand-blue-light: #0082CA;
    --brand-blue-bright: #3CB4E5;
}

/* ========================================
   GLOBAL RESETS
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Cooper Hewitt', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--brand-blue-light);
    margin: 0;
    padding: 0;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    position: relative;
    height: 340px;
    background-image: url('https://intranet.whitewatercw.com/assets/images/whitewater_background.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-logo {
    max-width: 500px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8))
    drop-shadow(0 0 30px rgba(255, 255, 255, 0.4));
}

.hero-title {
    font-family: 'Sony Sketch EF', Arial, sans-serif;
    color: white;
    font-size: 48px;
    font-weight: normal;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    margin-top: 10px;
}

.hero-underline {
    width: 100%;
    height: 6px;
    background: var(--brand-blue-light);
    margin-top: 10px;
}

.hero-logo-topleft {
    position: absolute;
    top: 25px;
    left: 25px;
    z-index: 3;
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8))
    drop-shadow(0 0 30px rgba(255, 255, 255, 0.4));
}

/* ========================================
   SEARCH BOX
   ======================================== */
#global_search_box {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 5;
}

#global_search_form {
    display: flex;
    align-items: center;
    position: relative;
}

.search-input {
    padding: 8px 40px 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    width: 250px;
    outline: none;
}

.search-input:focus {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.search-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
    cursor: pointer;
    z-index: 4;
    background: transparent;
    border: 0;
    padding: 0 8px;
    pointer-events: auto;
}

.search-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Search Dropdown */
#global_search_dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid #e3e6ef;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    width: 400px;
    max-width: 90vw;
    z-index: 10;
}

#global_search_dropdown.hidden {
    display: none;
}

#global_search_dropdown .dd-item {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: #122;
}

#global_search_dropdown .dd-item:hover {
    background: #f3f6fb;
}

.dd-title {
    font-weight: 600;
}

.dd-meta {
    font-size: 12px;
    color: #667;
    margin-top: 2px;
}

.dd-more {
    display: block;
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    color: var(--accent);
    border-top: 1px solid #eee;
}

.dd-more:hover {
    background: #f3f6fb;
}

/* ========================================
   DRIVE 25 LOGO
   ======================================== */
.menu-section .hero-bottom-image {
    position: absolute !important;
    top: -15px !important;
    right: 20px !important;
    z-index: 100 !important;
    max-width: 350px;
    max-height: 110px;
    height: auto;
    width: auto;
    background-color: white;
    padding: 8px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.drive25-image {
    position: relative;
    height: 350px;
    width: auto;
    background-color: white;
    padding: 8px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* ========================================
   MENU SECTION
   ======================================== */
.menu-section {
    background: var(--brand-blue-light);
    padding: 0 0 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.menu-wrapper {
    width: 100%;
    position: relative;
}

/* ========================================
   NAVIGATION MENU
   ======================================== */
.topnav {
    background-color: var(--brand-blue-dark);
    overflow: hidden;
}

.topnav a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 16px;
    font-family: 'Cooper Hewitt', Arial, sans-serif;
}

.topnav a:hover {
    background-color: var(--brand-blue-light);
    color: white;
}

.topnav a.active,
.dropdown .dropbtn.active {
    background-color: var(--brand-blue-light);
    color: white;
}

.dropdown {
    float: left;
    overflow: hidden;
}

.dropdown .dropbtn {
    font-size: 16px;
    border: none;
    outline: none;
    color: white;
    padding: 14px 16px;
    background-color: inherit;
    font-family: 'Cooper Hewitt', Arial, sans-serif;
    margin: 0;
    cursor: pointer;
}

.dropdown:hover .dropbtn {
    background-color: var(--brand-blue-light);
    color: white;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 20000;
}

.dropdown-content a {
    float: none;
    color: var(--brand-blue-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: var(--brand-blue-bright);
    color: white;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.topnav .icon {
    display: none;
}

/* User Info Bar */
.user-bar-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--brand-blue-dark);
    color: #ffffff;
    padding: 6px 18px;
    font-size: 0.9rem;
    border-top: 2px solid #0b1d3a;
    position: relative;
    z-index: 10;
}

.user-bar-inline strong {
    color: #ffd600;
    font-weight: 600;
}

.user-bar-right {
    font-style: italic;
    opacity: 0.9;
}

/* ========================================
   CATEGORIES SECTION
   ======================================== */
.categories-section {
    background: white;
    padding: 40px 0;
    margin-bottom: 20px;
}

.categories-wrapper {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 10px;
}

.categories-title {
    color: white;
    font-size: 36px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    padding: 0 10px 30px 10px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 10px;
}

.category-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--brand-blue-dark);
}

.category-logo {
    max-width: 180px;
    max-height: 80px;
    object-fit: contain;
}

/* ========================================
   CONTENT PAGE
   ======================================== */
.content-page {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-page-inner {
    padding: 40px;
}

.content-page-inner-two {
    padding: 40px;
    height: 900px;
}

.page-title {
    font-size: 32px;
    color: var(--brand-blue-dark);
    margin-bottom: 30px;
    font-family: 'Sony Sketch EF', Arial, sans-serif;
}

.section-header {
    font-size: 20px;
    color: var(--brand-blue-dark);
    margin: 30px 0 15px 0;
    font-weight: bold;
    font-family: 'Cooper Hewitt', Arial, sans-serif;
}

.section-header:first-of-type {
    margin-top: 0;
}

/* ========================================
   LINK CARDS
   ======================================== */
.card-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.link-card:hover {
    border-color: var(--brand-blue-light);
    box-shadow: 0 4px 12px rgba(0, 130, 202, 0.15);
    transform: translateX(5px);
}

.link-card i {
    font-size: 20px;
    color: var(--brand-blue-light);
    margin-right: 15px;
    min-width: 24px;
}

.link-card-content {
    flex: 1;
}

.link-card-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--brand-blue-dark);
    font-family: 'Cooper Hewitt', Arial, sans-serif;
}

.link-card:hover .link-card-title {
    color: var(--brand-blue-light);
}

.link-card-arrow {
    font-size: 18px;
    color: #999;
    transition: all 0.3s ease;
}

.link-card:hover .link-card-arrow {
    color: var(--brand-blue-light);
    transform: translateX(5px);
}

/* Link Cards with Images */
.card-container-img {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    justify-items: center;
}

.link-card-img {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 14px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    max-width: 320px;
}

.link-card-img:hover {
    border-color: var(--brand-blue-light);
    box-shadow: 0 4px 12px rgba(0, 130, 202, 0.15);
    transform: translateY(-3px);
}

.link-card-img img {
    width: 100%;
    max-width: 160px;
    height: auto;
    margin-bottom: 8px;
    object-fit: contain;
}

.link-card-content-img {
    text-align: center;
    width: 100%;
}

.link-card-title-img {
    font-size: 16px;
    font-weight: 500;
    color: var(--brand-blue-dark);
    font-family: 'Cooper Hewitt', Arial, sans-serif;
    margin-bottom: 4px;
}

.link-card-img:hover .link-card-title-img {
    color: var(--brand-blue-light);
}

.link-card-arrow-img {
    font-size: 18px;
    color: #999;
    transition: all 0.3s ease;
    margin-top: 6px;
}

.link-card-img:hover .link-card-arrow-img {
    color: var(--brand-blue-light);
    transform: translateY(-2px);
}

/* ========================================
   TABLES
   ======================================== */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hoverTable {
    width: 100%;
    border-collapse: collapse;
}

.hoverTable thead th {
    position: sticky;
    top: 0;
    background: #f0f4fa;
    z-index: 1;
    padding: 7px;
}

.hoverTable td {
    padding: 7px;
}

.hoverTable tr:hover {
    background-color: yellow;
}

.hoverTable td:first-child {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}

.hoverTable td:last-child {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
}

/* ========================================
   TABS
   ======================================== */
.tabs {
    width: 100%;
    height: 100%;
    display: inline-block;
}

.tab-links {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 4px;
}

.tab-links:after {
    display: inline-block;
    clear: both;
    content: " ";
}

.tab-links li {
    float: none;
    flex: 0 0 auto;
    margin: 0px 5px;
    list-style: none;
}

.tab-links a {
    padding: 8px 15px;
    display: inline-block;
    border-radius: 5px 5px 0px 0px;
    background: var(--brand-blue-light);
    color: #E6E6E6;
    font-size: 16px;
    font-weight: 400;
    transition: all linear 0.15s;
    text-decoration: none;
}

.tab-links a:hover {
    background: var(--brand-blue-dark);
    text-decoration: none;
}

li.active a,
li.active a:hover {
    background: #FFFFFF;
    color: #4c4c4c;
}

.tab-content {
    padding: 5px;
    border-radius: 3px;
    box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.15);
}

.tab {
    display: none;
}

.tab.active {
    display: block;
    padding: 5px;
}

/* ========================================
   BUTTONS & FORMS
   ======================================== */
.search-block {
    margin-bottom: 10px;
}

.search-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.search-row .spacer {
    flex: 1;
}

.btn {
    padding: 0.45rem 0.75rem;
    border: 1px solid #cfd6e4;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    min-height: 44px;
}

.btn:hover {
    background: #f5f7fb;
}

.btn-ghost {
    background: transparent;
}

.btn-accent {
    background: var(--accent);
    color: var(--on-accent);
    border: 1px solid var(--accent);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-accent:hover {
    background: var(--accent-600);
    border-color: var(--accent-600);
}

input,
select,
textarea {
    font-size: 16px;
}

/* ========================================
   MODALS
   ======================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal {
    width: min(600px, 92vw);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    padding: 16px;
    z-index: 10001;
}

.modal h3 {
    margin: 0.2rem 0 0.6rem;
}

.modal textarea {
    width: 100%;
    min-height: 160px;
    padding: 0.6rem;
    border: 1px solid #cfd6e4;
    border-radius: 8px;
    resize: vertical;
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}

.note.error {
    color: #b00020;
}

.note.ok {
    color: #0c7a3b;
}

.hidden {
    display: none;
}

/* ========================================
   FOOTER   background: var(--brand-blue-dark);
   ======================================== */
.footer-section {

    padding: 30px 0;
    color: white;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-text {
    font-size: 16px;
    line-height: 1.8;
}

.footer-text strong {
    font-weight: 500;
}

/* ========================================
   UTILITIES
   ======================================== */
.container-px {
    width: min(1200px, 100% - 24px);
    margin-inline: auto;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet & Below (1024px) */
@media screen and (max-width: 1024px) {
    /* Hamburger Menu */
    .topnav a:not(:first-child),
    .dropdown .dropbtn {
        display: none;
    }

    .topnav a.icon {
        float: right;
        display: block;
    }

    .topnav.responsive {
        position: relative;
    }

    .topnav.responsive a.icon {
        position: absolute;
        right: 0;
        top: 0;
    }

    .topnav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }

    .topnav.responsive .dropdown {
        float: none;
    }

    .topnav.responsive .dropdown-content {
        position: relative;
    }

    .topnav.responsive .dropdown .dropbtn {
        display: block;
        width: 100%;
        text-align: left;
    }

    /* Drive 25 Logo - Scale down, position behind hamburger */
    .menu-section .hero-bottom-image {
        z-index: 0;
        top: -48px !important;
        right: 8px !important;
        max-width: 180px !important;
        max-height: 64px !important;
        padding: 4px 8px;
        border-radius: 3px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
        opacity: 0.95;
    }

    .topnav {
        position: relative;
        z-index: 10;
    }

    .topnav .icon {
        position: relative;
        z-index: 11;
    }

    /* Link Cards with Images - Tighter Layout */
    .card-container-img {
        gap: 12px;
    }

    .link-card-img {
        max-width: 200px;
        padding: 12px;
    }

    .link-card-img img {
        max-width: 140px;
    }

    .link-card-title-img {
        font-size: 15px;
    }
}

/* Tablet & Below (768px) */
@media (max-width: 768px) {
    /* CRITICAL FIX: Hide Drive 25 Logo completely on mobile */
    .menu-section .hero-bottom-image {
        display: none !important;
    }

    /* Hero Section */
    .hero-logo-topleft {
        display: none !important;
    }

    .hero-content {
        position: absolute;
        left: 16px;
        top: 58%;
        transform: translateY(-50%);
        text-align: left;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-logo {
        max-width: 300px;
    }

    /* Search Box */
    #global_search_box {
        top: 12px;
        right: 12px;
    }

    .search-input {
        width: clamp(160px, 34vw, 260px);
        padding: 10px 40px 10px 12px;
        border-radius: 10px;
    }

    .search-icon {
        font-size: 20px;
        min-width: 44px;
        min-height: 44px;
    }

    #global_search_dropdown {
        width: min(420px, 92vw);
        max-height: clamp(220px, 50vh, 420px);
        overflow: auto;
    }

    /* Categories */
    .categories-title {
        font-size: 28px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    /* Content Page */
    .content-page-inner {
        padding: 20px;
    }

    .page-title {
        font-size: 24px;
    }

    .section-header {
        font-size: 18px;
    }

    /* Link Cards */
    .card-container {
        grid-template-columns: 1fr;
    }

    .link-card {
        padding: 12px 16px;
    }

    .link-card-title {
        font-size: 15px;
    }

    /* User Bar */
    .user-bar-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 0.85rem;
    }

    .user-bar-right {
        align-self: flex-end;
        width: 100%;
        text-align: right;
    }
}

/* Mobile (600px) */
@media (max-width: 600px) {
    /* Link Cards with Images - Single Column */
    .card-container-img {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .link-card-img {
        max-width: 180px;
        padding: 10px;
    }

    .link-card-img img {
        max-width: 120px;
        margin-bottom: 6px;
    }

    .link-card-title-img {
        font-size: 14px;
    }

    .link-card-arrow-img {
        font-size: 16px;
        margin-top: 4px;
    }
}

/* Mobile Tables - Cards Mode */
@media (max-width: 640px) {
    table.mobile-cards {
        display: block;
    }

    table.mobile-cards thead {
        display: none;
    }

    table.mobile-cards tbody {
        display: grid;
        gap: 10px;
    }

    table.mobile-cards tr {
        display: grid;
        gap: 6px;
        padding: 10px;
        border: 1px solid #e7edf5;
        border-radius: 10px;
        background: #fff;
    }

    table.mobile-cards td {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 6px;
    }

    table.mobile-cards td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #52627a;
    }
}

/* Small Mobile (480px) */
@media (max-width: 480px) {
    .hero-logo-topleft {
        max-width: 100px;
        top: 8px;
        left: 8px;
    }

    .hero-title {
        font-size: 24px;
    }
}

/* Tiny Screens (400px) */
@media (max-width: 400px) {
    .link-card-img {
        max-width: 160px;
        padding: 8px;
    }

    .link-card-img img {
        max-width: 100px;
    }

    .link-card-title-img {
        font-size: 13px;
    }
}