/* CSS Reset & Variables */
:root {
    --primary-color: #0f172a;
    /* Slate 900 */
    --secondary-color: #334155;
    /* Slate 700 */
    --accent-color: #3b82f6;
    /* Blue 500 */
    --accent-glow: rgba(59, 130, 246, 0.5);
    --gold: #fbbf24;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    /* Premium feel */
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    margin-left: 2rem;
    font-weight: 500;
    color: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    margin-top: 60px;
    overflow: hidden;
    color: white;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/hero-students.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.5));
    z-index: 2;
}

.hero-content {
    z-index: 3;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.4rem;
    color: #f1f5f9;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
}

/* Features Section */
.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 5%;
    margin-top: -3rem;
    /* Overlap hero */
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
}

.feature-item {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    background: white;
    padding: 2rem;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
    color: var(--primary-color);
}

.feature-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Search Bar */
.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

#searchInput {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    background-color: #f8fafc;
    /* Light background for new location */
}

#searchInput:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background-color: #ffffff;
}

/* Educational Guide Section */
.educational-guide {
    padding: 4rem 5%;
    background-color: #fff;
    border-radius: var(--border-radius);
    margin: 4rem auto;
    box-shadow: var(--shadow-md);
}

.guide-header {
    text-align: center;
    margin-bottom: 3rem;
}

.guide-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.content-block {
    margin-bottom: 4rem;
    overflow: hidden;
    /* Clearfix for floats */
}

.content-block h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-left: 5px solid var(--accent-color);
    padding-left: 1rem;
}

.content-block p {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
}

.content-img-right {
    float: right;
    width: 40%;
    margin-left: 2rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.content-img-left {
    float: left;
    width: 40%;
    margin-right: 2rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {

    .content-img-right,
    .content-img-left {
        float: none;
        width: 100%;
        margin: 0 0 1.5rem 0;
    }
}

/* States Grid Section */
.container {
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.divider {
    height: 4px;
    width: 60px;
    background: var(--accent-color);
    margin: 0 auto;
    border-radius: 2px;
}

.states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* State Card */
.state-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.state-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.state-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.state-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
    /* Keep state names clean */
    font-weight: 600;
}

.uni-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

/* Modal */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    /* Flex to center */
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
}

/* University List Items */
.uni-item {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.uni-item:last-child {
    border-bottom: none;
}

.uni-item:hover {
    background-color: #f8fafc;
}

.uni-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uni-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.uni-rating {
    color: var(--gold);
    font-size: 0.9rem;
}

.uni-location {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    /* Ensure it looks like text initially */
    transition: color 0.2s;
}

.uni-location:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.uni-description {
    font-size: 0.95rem;
    color: var(--text-main);
    margin: 0.5rem 0;
    line-height: 1.5;
}

.uni-link {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
    align-self: flex-start;
}

/* Footer & Privacy */
footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #cbd5e1;
    margin: 0 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .navbar {
        padding: 1rem;
    }
}