/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Bar */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h2 {
    color: #3498db;
    font-size: 1.8rem;
}

.logo span {
    font-size: 0.9rem;
    color: #ecf0f1;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

/* Active navigation link */
.nav-links a.active {
    color: #3498db;
    border-bottom: 3px solid #3498db;
    padding-bottom: 5px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* FIXED: Search Bar - Shorter Length */
.search-bar {
    max-width: 500px;        /* Changed from 700px to 500px for shorter look */
    width: 85%;              /* Changed from 80px (wrong!) to 85% */
    margin: 0 auto 1.5rem;
    display: flex;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    min-width: 200px;        /* Added minimum width */
    padding: 12px 18px;      /* Slightly reduced padding */
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;      /* Slightly smaller font */
    outline: none;
}

.search-bar button {
    padding: 12px 35px;      /* Reduced from 15px 40px */
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;      /* Slightly smaller font */
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.search-bar button:hover {
    background-color: #34495e;
}

.quick-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover {
    background-color: white;
    color: #667eea;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-card p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* Regional Showcase */
.regions-preview {
    padding: 80px 0;
    background-color: #ecf0f1;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.region-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.region-card:hover {
    transform: scale(1.05);
}

.region-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.region-info {
    padding: 20px;
    text-align: center;
}

.region-info h3 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.region-info p {
    color: #7f8c8d;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    padding: 15px 50px;
    background-color: white;
    color: #f5576c;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    color: #3498db;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Filter Section */
/* Filter Section - IMPROVED UI */
.filter-section {
    background-color: white;
    padding: 35px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filter-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 25px;
}

/* Search Box - FIXED ICON OVERLAP */
.search-box {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 14px 50px 14px 50px;  /* Left and right padding for icons */
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    background: #f8f9fa;
}

.search-box input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box input::placeholder {
    color: #999;
}

/* Search Icon - FIXED POSITION */
.search-box button {
    position: absolute;
    left: 15px;
    padding: 0;
    width: 35px;
    height: 35px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 1.3rem;
    transition: transform 0.2s;
}

.search-box button:hover {
    transform: scale(1.1);
}

/* Or you can make the icon on the right side */
.search-box button.right-icon {
    left: auto;
    right: 15px;
}

/* Filter Dropdowns - IMPROVED STYLE */
.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filters select {
    padding: 14px 35px 14px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: all 0.3s;
    min-width: 160px;
}

.filters select:hover {
    border-color: #667eea;
    background-color: white;
}

.filters select:focus {
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Sort Options - IMPROVED */
.sort-options {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 30px;
}

.sort-options label {
    font-weight: 600;
    color: #667eea;
    font-size: 0.95rem;
}

.sort-options select {
    padding: 10px 35px 10px 15px;
    border: 2px solid #667eea;
    border-radius: 20px;
    outline: none;
    cursor: pointer;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-weight: 500;
    color: #667eea;
}

/* Active Filters - IMPROVED */
.active-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    min-height: 35px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.filter-tag button:hover {
    background: rgba(255,255,255,0.2);
}

/* Results Info - IMPROVED */
.results-info {
    border-top: 2px solid #f0f0f0;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-info p {
    color: #555;
    font-size: 1rem;
    font-weight: 500;
}

#resultCount {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-box {
        width: 100%;
        max-width: 100%;
    }
    
    .filters {
        width: 100%;
        flex-direction: column;
    }
    
    .filters select {
        width: 100%;
    }
    
    .sort-options {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }
}

/* Results Info */
.results-info {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.results-info p {
    color: #666;
    font-size: 0.95rem;
}

#resultCount {
    font-weight: 700;
    color: #667eea;
}

/* Universities Section */
.universities-section {
    padding: 50px 0 80px;
    background-color: #f8f9fa;
}

.universities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* University Card */
.university-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.university-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
}

.uni-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.uni-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.university-card:hover .uni-image img {
    transform: scale(1.1);
}

.uni-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.uni-content {
    padding: 25px;
}

.uni-content h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.uni-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.uni-majors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.major-tag {
    background-color: #ecf0f1;
    color: #555;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.uni-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid #ecf0f1;
    border-bottom: 1px solid #ecf0f1;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;
    color: #7f8c8d;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat p {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 700;
}

.view-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.no-results p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .search-bar {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }
    
    .search-bar input,
    .search-bar button {
        width: 100%;
        min-width: auto;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
        max-width: 100%;
    }
    
    .filters {
        width: 100%;
    }
    
    .filters select {
        flex: 1;
    }
    
    .sort-options {
        width: 100%;
        margin-left: 0;
    }
    
    .universities-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}
/* --- PATCH: make CSS match uni.html structure --- */

/* Your HTML uses .filter-controls, not .filter-bar */
.filter-controls{
  display:flex;
  gap:15px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom:25px;
}

/* Your HTML uses .filter-dropdown, not .filters select */
.filter-dropdown{
  padding: 14px 35px 14px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 30px;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  background-color: #f8f9fa;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;
  appearance: none;
  min-width: 160px;
}
.filter-dropdown:hover{ border-color:#667eea; background:#fff; }
.filter-dropdown:focus{ border-color:#667eea; background:#fff; box-shadow:0 0 0 3px rgba(102,126,234,.1); }

/* Your HTML has span.search-icon (not a button) */
.search-box .search-icon{
  position:absolute;
  right: 15px;
  pointer-events:none;
  font-size: 1.1rem;
  color:#667eea;
}

/* Prevent the big empty gap: reduce filter section padding */
.filter-section{ padding: 18px 0; }

/* Make the result count line look normal */
.results-info{
  margin-top: 10px;
  border-top: 1px solid #e0e0e0;
  padding-top: 15px;
}
#resultCount{
  display:inline-block;
  font-weight:700;
  color:#667eea;
  font-size:1.05rem;
}

/* Mobile: stack nicely */
@media (max-width: 768px){
  .filter-controls{ flex-direction:column; align-items:stretch; }
  .search-box{ max-width:100%; }
  .filter-dropdown{ width:100%; }
}
/* Auto-hide filter bar animations */
#filterBar{
  position: sticky;
  top: 70px;            /* keep your current sticky offset */
  z-index: 100;
  transition: transform 0.25s ease, opacity 0.25s ease;
  will-change: transform;
}

#filterBar.hidden{
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

#filterBar.visible{
  transform: translateY(0);
  opacity: 1;
}

