/* FILE: CSS/res_RM.css */
/* Prevent sort arrows from overlapping header text */
.memo-table th[data-column] {
    position: relative;
    padding-right: 2.5em !important;
}
.memo-table th[data-column]:hover::after {
    right: 0.75em;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.memo-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  align-items: center; /* center each box */
  align-self: center;
}

.memo-box {
  background-color: white;
  border: 1px solid #ccc;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border-radius: 15px;
  font-size: 0.9rem;
  max-width: 1000px;
  width: 100%;
 
}

.memo-box a {
  color: #007acc;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
  display: block;
}

.memo-box a:hover {
  text-decoration: underline;
}

.memo-box p {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #666;
}

@media (max-width: 600px) {
  .memo-container {
    gap: 0.75rem;
    padding: 0.5rem;
  }

  .memo-box {
    padding: 0.75rem;
  }

  .memo-box a {
    font-size: 0.95rem;
  }

  .memo-box p {
    font-size: 0.75rem;
  }
}

.memo-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    
    /* MODIFIED: Changed from solid #fff to semi-transparent */
    background: rgba(255, 255, 255, 0.65); 
    
    /* ADDED: These lines create the blur */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari browser support */

    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); /* Shadow for the main box */
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------
   TITLE-ONLY MODIFIER
   For pages (e.g. divisions.php) where .memo-wrapper only wraps
   a page title, with the actual content living separately below
   in its own container - the glass box/border/blur just reads as
   a stray outline around the heading in that case. Add
   class="memo-wrapper title-only" to strip it back to plain text.
   Dark mode counterpart lives in darkmode1.css / darkmode2.css.
   --------------------------------------------------------
*/
.memo-wrapper.title-only {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.memo-title {
    text-align: center;
    color: #03508c;
    font-size: 2rem;
}

.memo-wrapper h2 {
    text-align: center;
    color: #03508c;
    font-size: 2rem;
    margin-bottom: 20px;
}

/* Layout: filter on top-left, table fills the rest */
.memo-flex {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

/* Filter styling: bigger and aligned left */
.memo-filters {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    margin-top: -48px;
    padding-left: 0;
}

.memo-filters label {
    font-size: 1.15rem;
    font-weight: bold;
    margin-right: 8px;
    color: #03508c;
}

.memo-filters select {
    padding: 8px 18px;
    border-radius: 8px;
    border: 2px solid #03508c;
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0 2px;
    min-width: 140px;
    box-shadow: 0 2px 6px rgba(33,79,136,0.06);
    background: none;
    text-align: center;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.memo-table-wrapper {
    overflow-x: auto;
}

.memo-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    background: #fff;
}

.memo-table th, .memo-table td {
    border: 1px solid #ddd;
    padding: 20px 12px;
    text-align: left;
    vertical-align: middle;
}

.memo-table th {
    background-color: #f2f2f2;
    font-weight: 600;
    text-align: center;
}

.memo-table td a {
    color: #03508c;
    text-decoration: none;
}

/* Removed underline on hover as requested */
.memo-table td a:hover {
    text-decoration: none;
}

/* Made the row highlight a bit darker */
.memo-table tbody tr:hover,
.memo-table tr:hover {
    background-color: #dbeafe; /* A slightly darker, richer professional blue */
    transition: background-color 0.2s ease;
}

/* CSS TRICK: Make the entire row clickable */
.memo-table tbody tr {
    position: relative; /* Establishes boundaries for the absolute link */
}

.memo-table td a::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1; /* Stretches the link to cover the entire relative row */
}

/* --- COLUMN 3: DOWNLOAD BUTTON SPECIFICS --- */
.memo-table td:nth-child(3) {
    position: relative; /* Traps the download link to ONLY cover this specific cell */
    z-index: 2; /* Brings this cell "forward" so it doesn't get covered by the row link */
    text-align: center; /* Centers the download text/icon */
}

.memo-table td:nth-child(3):hover {
    background-color: #bfdbfe; /* A distinct, slightly deeper blue on hover */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Make the icon scale up when hovering ANYWHERE in the 3rd column cell */
.memo-table td:nth-child(3):hover .download-icon-link {
    transform: scale(1.15);
}

/* Ensure the transform is smooth */
.download-icon-link {
    display: inline-block;
    transition: transform 0.2s ease;
}

/* CSS TRICK: Stretch the download link to cover ONLY the 3rd column cell */
.memo-table td:nth-child(3) .download-icon-link::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3; 
}

/* Make the Date Posted column wider */
.memo-table th:nth-child(2),
.memo-table td:nth-child(2) {
    width: 150px; /* Adjust this value as needed */
    min-width: 150px;
    max-width: 300px;
    text-align: center;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0 0 0;
    flex-wrap: wrap; /* Add this line */
}

.pagination a {
    padding: 8px 18px;
    border-radius: 8px;
    background: none;
    color: #03508c;
    font-weight: 600;
    border: 2px solid #03508c;
    font-size: 1.08rem;
    letter-spacing: 0.5px;
    margin: 0 2px;
    box-shadow: 0 2px 6px rgba(33,79,136,0.06);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    position: relative;
}

.pagination a.active,
.pagination a:hover {
    background: #03508c;
    color: #fff;
    box-shadow: 0 4px 12px rgba(33,79,136,0.10);
    outline: none;
    z-index: 1;
}

.pagination a:first-child,
.pagination a:last-child {
    font-weight: bold;
    font-size: 1.08rem;
    letter-spacing: 1px;
}

.memo-filters select,
.pagination a {
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 18px;
    padding-right: 18px;
}

.filter-btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 8px 18px;
    border-radius: 8px;
    background: none;
    color: #03508c;
    font-weight: 600;
    border: 2px solid #03508c;
    font-size: 1.08rem;
    letter-spacing: 0.5px;
    margin: 0 2px;
    box-shadow: 0 2px 6px rgba(33,79,136,0.06);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    min-width: 140px;
    text-decoration: none;
    position: relative;
    /* Custom arrow */
    background-image: url("data:image/svg+xml;utf8,<svg fill='03508c' height='18' viewBox='0 0 24 24' width='18' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
    padding-right: 36px;
}

.filter-btn:focus,
.filter-btn:hover {
    background: #03508c;
    color: #fff;
    box-shadow: 0 4px 12px rgba(33,79,136,0.10);
    outline: none;
}

/*
==============================================
  Custom Column Widths for Schools Directory
==============================================
*/
.schools-table th:nth-child(3),
.schools-table td:nth-child(3) {
    width: 180px; 
    min-width: 180px;
}

.schools-table th:nth-child(5),
.schools-table td:nth-child(5) {
    width: 200px; 
    min-width: 200px;
}


/* ==============================================
   📱 MOBILE OVERRIDES 
============================================== */
@media screen and (max-width: 768px) {
    .memo-wrapper {
        padding: 10px;
    }
    .memo-filters {
        flex-direction: row;
        align-items: center; 
        gap: 8px;
        justify-content: center; 
        margin-top: 10px;
    }
    .memo-table th, .memo-table td {
        padding: 8px;
        font-size: 14px;
    }
    
    /* 🔴 THE FIX: Release the 150px constraint on the Date column */
    .memo-table th:nth-child(2),
    .memo-table td:nth-child(2) {
        width: auto;
        min-width: 0;
        white-space: nowrap; /* Ensures the date doesn't stack awkwardly */
    }

    /* Keep the download button cell neat and save space */
    .memo-table th:nth-child(3),
    .memo-table td:nth-child(3) {
        padding: 8px 4px;
    }
}

@media (max-width: 600px) {
    .pagination {
        gap: 4px; 
    }
    .pagination a {
        padding: 6px 8px; 
        font-size: 0.9rem; 
        margin: 0 1px; 
        min-width: 32px; 
    }
}

/* File "resources_rm.css" created on June 10, 2025; Gian Centeno */
/* Updated on May 15, 2026 just because */