/* Honor Roll Table Styles */
.honor-roll-table {
    margin-top: 50px;
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* Header Styles */
.honor-roll-table thead {
    background-color: var(--brand-dark);
}

.honor-roll-table th {
    color: white;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 16px 20px;
    text-align: center;
    border: none;
}

.category-column {
    width: 25%;
    text-align: left;
}

.house-column {
    width: 12.5%;
    text-align: center;
}

/* Body Styles */
.honor-roll-table tbody tr {
    transition: background-color 0.2s ease;
}

.honor-roll-table tbody tr:hover {
    background-color: #f8f9fa !important;
}

/* Cell Styles */
.honor-roll-table td {
    padding: 16px 20px;
    border: none;
    font-size: 14px;
    line-height: 1.4;
    color: #000000;
}

.category-cell {
    text-align: left;
    font-weight: 500;
    color: #1a2332;
}

.position-cell {
    text-align: center;
    font-weight: 400;
}

/* White separator line between columns */
.honor-roll-table td + td,
.honor-roll-table th + th {
    border-left: 1px solid white;
}

/* Golden transparent overlay on row hover */
.honor-roll-table tbody tr:hover {
    position: relative;
    background-color: rgba(254, 207, 7) !important;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .honor-roll-table th,
    .honor-roll-table td {
        padding: 14px 16px;
        font-size: 13px;
    }

    .category-column {
        width: 28%;
    }

    .house-column {
        width: 12%;
    }
}

@media (max-width: 768px) {
    .honor-roll-table {
        min-width: 100%;
        border-radius: 0;
        margin-top: 30px;
    }

    .honor-roll-table th,
    .honor-roll-table td {
        padding: 12px 8px;
        font-size: 12px;
    }

    .category-column {
        width: 35%;
    }

    .house-column {
        width: 10.8%;
    }

    /* Hide some columns on smaller screens if needed */
    .honor-roll-table th:nth-child(n+8),
    .honor-roll-table td:nth-child(n+8) {
        display: none;
    }
}

@media (max-width: 600px) {
    .honor-roll-table {
        font-size: 11px;
    }

    .honor-roll-table th,
    .honor-roll-table td {
        padding: 10px 6px;
        font-size: 11px;
    }

    .category-column {
        width: 40%;
    }

    .house-column {
        width: 10%;
    }

    /* Hide more columns for very small screens */
    .honor-roll-table th:nth-child(n+7),
    .honor-roll-table td:nth-child(n+7) {
        display: none;
    }
}

@media (max-width: 480px) {
    /* Card-style layout for mobile */
    .honor-roll-table,
    .honor-roll-table thead,
    .honor-roll-table tbody,
    .honor-roll-table th,
    .honor-roll-table td,
    .honor-roll-table tr {
        display: block;
    }

    .honor-roll-table {
        border: none;
        box-shadow: none;
        margin-top: 20px;
    }

    .honor-roll-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .honor-roll-table tr {
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 16px;
        padding: 16px;
        background: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        position: relative;
    }

    .honor-roll-table tr:hover {
        background-color: rgba(254, 207, 7, 0.1) !important;
    }

    .honor-roll-table td {
        border: none;
        padding: 8px 0;
        text-align: left !important;
        font-size: 13px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #eee;
    }

    .honor-roll-table td:last-child {
        border-bottom: none;
    }

    .honor-roll-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--brand-dark);
        flex-shrink: 0;
        width: 120px;
    }

    .category-cell:before {
        content: "Category: ";
    }

    .position-cell:before {
        content: attr(data-house) ": ";
    }

    /* Add specific data labels for each house column */
    .honor-roll-table td:nth-child(2):before { content: "Jinnah House: "; }
    .honor-roll-table td:nth-child(3):before { content: "Khushal House: "; }
    .honor-roll-table td:nth-child(4):before { content: "Iqbal House: "; }
    .honor-roll-table td:nth-child(5):before { content: "Ayub House: "; }
    .honor-roll-table td:nth-child(6):before { content: "Munawar House: "; }
    .honor-roll-table td:nth-child(7):before { content: "Rustam House: "; }
}

/* Extra small screens */
@media (max-width: 360px) {
    .honor-roll-table tr {
        padding: 12px;
        margin-bottom: 12px;
    }

    .honor-roll-table td {
        font-size: 12px;
        padding: 6px 0;
    }

    .honor-roll-table td:before {
        width: 100px;
        font-size: 11px;
    }
}

/* Horizontal scroll container for tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -20px;
        padding: 0 20px;
    }

    .honor-roll-table {
        min-width: 700px;
    }
}

/* Print Styles */
@media print {
    .honor-roll-table {
        box-shadow: none;
        border-radius: 0;
    }

    .honor-roll-table tbody tr:hover {
        background-color: inherit !important;
    }

    /* Show all columns in print */
    .honor-roll-table th,
    .honor-roll-table td {
        display: table-cell !important;
        font-size: 10px;
        padding: 8px 4px;
    }
}

/*
============ House Positions Section ===============
*/

.positions-card {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  margin: 30px auto;
  max-width: 800px;
  box-shadow:
    0px 2px 4px rgba(3, 7, 18, 0.04),
    0px 8px 8px rgba(3, 7, 18, 0.06),
    0px 16px 16px rgba(3, 7, 18, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px;
}

/* Hover effect: lift and deepen shadow */
.positions-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0px 4px 8px rgba(3, 7, 18, 0.06),
    0px 12px 12px rgba(3, 7, 18, 0.08),
    0px 24px 24px rgba(3, 7, 18, 0.1);
}

/* Column 1: Text content */
.positions-card .card-content {
  flex: 1 1 300px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Column 2: Image */
.positions-card .card-image {
  flex: 0 0 300px;
  text-align: center;
}

.positions-card .card-image img {
  max-width: 100%;
  height: auto;
}

/* Optional header section inside the card */
.positions-card .card-header {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 8px;
  border-bottom: 2px solid var(--brand-yellow);
  padding-bottom: 8px;
}

/* Optional body/content area */
.positions-card .card-body,
.positions-card .sports-list {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  color: #333333;
  line-height: 1.6;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* If you have a footer for actions/links */
.positions-card .card-footer {
  margin-top: auto;
  text-align: right;
}

/* Enhanced responsive design for positions card */
@media (max-width: 1024px) {
  .positions-card {
    max-width: 90%;
    padding: 20px;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .positions-card {
    flex-direction: column;
    padding: 16px;
    margin: 20px auto;
    gap: 16px;
    max-width: 95%;
  }

  .positions-card .card-header {
    font-size: 18px;
  }

  .positions-card .card-image {
    flex: 1 1 auto;
    margin-top: 16px;
  }

  .positions-card .card-content {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .positions-card {
    padding: 12px;
    margin: 15px auto;
    border-radius: 12px;
  }

  .positions-card .card-header {
    font-size: 16px;
  }

  .positions-card .card-body,
  .positions-card .sports-list {
    font-size: 13px;
  }
}