/* =====================================
MATCHING PAGE
===================================== */

.matching-page {
padding: 30px;
width: 100%;
min-height: 100vh;
}

.matching-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 28px;
}

.matching-header h1 {
font-size: 28px;
font-weight: 750;
color: #222;
margin-bottom: 6px;
}

.matching-header p {
color: #777;
font-size: 14px;
}

/* =====================================
MATCHING TABS
===================================== */

.matching-tabs {
display: flex;
gap: 25px;
border-bottom: 1px solid #e8e8e8;
margin-bottom: 25px;
}

.matching-tab {
background: none;
border: none;
padding: 12px 5px;
font-size: 15px;
color: #777;
cursor: pointer;
border-bottom: 3px solid transparent;
display: flex;
align-items: center;
gap: 8px;
}

.matching-tab.active {
color: #e84d75;
border-bottom-color: #e84d75;
font-weight: 700;
}

.matching-tab span {
background: #fce7ed;
color: #e84d75;
padding: 2px 8px;
border-radius: 20px;
font-size: 12px;
}

/* =====================================
FILTERS
===================================== */

.matching-filters {
display: flex;
gap: 12px;
margin-bottom: 25px;
}

.matching-filters input,
.matching-filters select {
padding: 12px 15px;
border: 1px solid #e5e5e5;
border-radius: 10px;
outline: none;
background: white;
font-size: 14px;
}

.matching-filters input {
flex: 1;
}

.matching-filters input:focus,
.matching-filters select:focus {
border-color: #e84d75;
}

/* =====================================
STUDENT DISCOVERY GRID
===================================== */

.student-discovery-grid,
.matches-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 22px;
}

/* =====================================
STUDENT CARD
===================================== */

.student-card {
background: white;
border: 1px solid #eee;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.student-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.student-card-image {
width: 100%;
height: 250px;
position: relative;
background: #f4edf0;
overflow: hidden;
}

.student-card-image img {
width: 100%;
height: 100%;
object-fit: cover;
}

.student-college-badge {
position: absolute;
left: 12px;
bottom: 12px;
background: rgba(255, 255, 255, 0.95);
padding: 7px 11px;
border-radius: 20px;
font-size: 11px;
font-weight: 600;
color: #444;
}

.student-card-content {
padding: 17px;
}

.student-card-name {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-bottom: 5px;
}

.student-card-name h3 {
font-size: 19px;
color: #222;
}

.student-card-course {
color: #888;
font-size: 13px;
margin-bottom: 12px;
}

.student-card-bio {
color: #666;
font-size: 13px;
line-height: 1.6;
margin-bottom: 14px;
}

.student-interest-tags {
display: flex;
flex-wrap: wrap;
gap: 7px;
margin-bottom: 18px;
}

.student-interest-tags span {
background: #f8f0f3;
color: #bd4568;
padding: 6px 10px;
border-radius: 20px;
font-size: 11px;
font-weight: 600;
}

/* =====================================
CARD ACTIONS
===================================== */

.student-card-actions {
display: flex;
gap: 10px;
}

.student-card-actions button {
flex: 1;
padding: 11px;
border-radius: 9px;
font-size: 13px;
font-weight: 650;
cursor: pointer;
transition: 0.2s ease;
}

.pass-student-btn {
background: white;
border: 1px solid #ddd;
color: #666;
}

.pass-student-btn:hover {
background: #f5f5f5;
}

.like-student-btn {
background: #e84d75;
border: 1px solid #e84d75;
color: white;
}

.like-student-btn:hover {
background: #d83d66;
}

/* =====================================
MATCHES
===================================== */

.match-card {
background: white;
border: 1px solid #eee;
border-radius: 14px;
padding: 18px;
display: flex;
align-items: center;
gap: 15px;
}

.match-card img {
width: 65px;
height: 65px;
border-radius: 50%;
object-fit: cover;
}

.match-card-info {
flex: 1;
}

.match-card-info h3 {
font-size: 15px;
margin-bottom: 5px;
}

.match-card-info p {
font-size: 12px;
color: #888;
}

.match-card button {
border: none;
background: #e84d75;
color: white;
padding: 9px 13px;
border-radius: 8px;
cursor: pointer;
}

/* =====================================
EMPTY STATE
===================================== */

.matching-empty-state {
text-align: center;
padding: 65px 20px;
color: #888;
grid-column: 1 / -1;
}

.matching-empty-state h3 {
color: #333;
margin-bottom: 8px;
font-size: 19px;
}

.matching-empty-state p {
font-size: 14px;
}

/* =====================================
RESPONSIVE DESIGN
===================================== */

@media (max-width: 1000px) {
.student-discovery-grid,
.matches-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

@media (max-width: 768px) {
.matching-page {
padding: 20px 15px 90px;
}

.matching-header h1 {
    font-size: 23px;
}

.student-discovery-grid,
.matches-grid {
    grid-template-columns: 1fr;
    gap: 17px;
}

.student-card-image {
    height: 280px;
}

.matching-filters {
    flex-direction: column;
}

.matching-filters input,
.matching-filters select {
    width: 100%;
}

}

/* Incoming Connection Requests */

.requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.requests-grid .student-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.requests-grid .student-card-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #222;
}

.requests-grid .student-card-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #777;
}

.request-actions {
    display: flex;
    gap: 10px;
}

.request-actions button {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.accept-request {
    background: #d83d66;
    color: #fff;
}

.accept-request:hover {
    background: #bd4568;
}

.reject-request {
    background: #f1f5f9;
    color: #475569;
}

.reject-request:hover {
    background: #e2e8f0;
}

.request-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* My Connections */

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* My Connections Card */

.matches-grid .student-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

/* Full-width profile image */

.matches-grid .student-card-info .request-avatar {
    display: block;
    width: 100%;
    height: 260px;
    max-width: none;
    object-fit: contain;
    object-position: center;
    border-radius: 10px;
    background: #f1f1f1;
    border: none;
}

/* Student details */

.matches-grid .student-card-info h3 {
    margin: 12px 0 6px;
    font-size: 18px;
}

.matches-grid .student-card-info p {
    margin: 5px 0;
    color: #777;
    font-size: 14px;
}

.matches-grid .student-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.matches-grid .student-card-info {
    min-width: 0;
}

.request-profile {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 12px;
}

.request-avatar {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.matches-grid .request-avatar {
    width: 100%;
    max-width: 180px;
    height: 180px;
    border-radius: 10%;
    object-fit: contain;
    flex-shrink: 0;
    border: 2px solid #e5e7eb;
}

/* =====================================
DISCOVER STUDENT CARDS
===================================== */

.student-discovery-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 22px;
align-items: stretch;
}

.student-discovery-grid .student-card {
display: flex;
flex-direction: column;
min-width: 0;
overflow: hidden;
background: #ffffff;
border: 1px solid #eeeeee;
border-radius: 18px;
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.045);
transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.student-discovery-grid .student-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
}

/* Profile image container */

.student-discovery-grid .request-profile {
width: 100%;
height: 230px;
overflow: hidden;
background: #fceef2;
border-radius: 0;
}

.student-discovery-grid .request-avatar {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
border: none;
border-radius: 0;
}

/* Student information */

.student-discovery-grid .student-card-info {
padding: 18px 18px 10px;
text-align: left;
flex: 1;
}

.student-discovery-grid .student-card-info h3 {
margin: 0 0 9px;
color: #252525;
font-size: 18px;
font-weight: 700;
line-height: 1.4;
overflow-wrap: anywhere;
}

.student-discovery-grid .student-card-info p {
margin: 6px 0;
color: #777777;
font-size: 13px;
line-height: 1.5;
}

/* Action buttons */

.student-discovery-grid .request-actions {
display: flex;
gap: 10px;
padding: 12px 18px 18px;
}

.student-discovery-grid .request-actions button {
flex: 1;
min-width: 0;
padding: 11px 14px;
border-radius: 10px;
font-size: 13px;
font-weight: 650;
cursor: pointer;
transition: background 0.2s ease, transform 0.2s ease;
}

.student-discovery-grid .pass-btn {
background: #ffffff;
border: 1px solid #dedede;
color: #666666;
}

.student-discovery-grid .pass-btn:hover {
background: #f5f5f5;
transform: translateY(-2px);
}

.student-discovery-grid .accept-request {
background: #e84d75;
border: 1px solid #e84d75;
color: #ffffff;
}

.student-discovery-grid .accept-request:hover {
background: #d83d66;
transform: translateY(-2px);
}

.student-discovery-grid .request-actions button:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}

/* Empty state */

#noStudentsFound {
grid-column: 1 / -1;
text-align: center;
padding: 45px 20px;
color: #888888;
}

/* =====================================
RESPONSIVE DISCOVER CARDS
===================================== */

@media (max-width: 1000px) {
.student-discovery-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 18px;
}

.student-discovery-grid .request-profile {
    height: 220px;
}

}

@media (max-width: 600px) {
.student-discovery-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}

.student-discovery-grid .student-card {
    border-radius: 14px;
}

.student-discovery-grid .request-profile {
    height: 165px;
}

.student-discovery-grid .student-card-info {
    padding: 13px 12px 7px;
}

.student-discovery-grid .student-card-info h3 {
    font-size: 15px;
}

.student-discovery-grid .student-card-info p {
    font-size: 11px;
}

.student-discovery-grid .request-actions {
    gap: 7px;
    padding: 10px 10px 13px;
}

.student-discovery-grid .request-actions button {
    padding: 10px 5px;
    font-size: 11px;
}

}

@media (max-width: 350px) {
.student-discovery-grid {
grid-template-columns: 1fr;
}

.student-discovery-grid .request-profile {
    height: 220px;
}

}

/* Incoming request profile photos */

.requests-grid .request-profile {
    width: 100%;
    height: 190px;
    overflow: hidden;
    border-radius: 12px;
    background: #fceef2;
}

.requests-grid .request-avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
}

/* My Connections profile photos */

.matches-grid .student-card-info .request-avatar {
    display: block;
    width: 100%;
    height: 220px;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    background: #fceef2;
    border: none;
    margin-bottom: 12px;
}