/* ===== COMPLETE STYLE.CSS -  ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #3f37c9;
    --accent: #4cc9f0;
    --success: #06d6a0;
    --warning: #ffd166;
    --danger: #ef476f;
    --dark: #1e1e2f;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --lighter: #f1f5f9;
    --light: #f8fafc;
    --white: #ffffff;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.logo i {
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-links i {
    margin-right: 6px;
}

.btn-nav {
    background: var(--primary);
    color: white !important;
    padding: 10px 20px;
    border-radius: var(--radius-full);
}

.btn-nav:hover {
    background: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

.logged-out-nav, .logged-in-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.logged-in-nav {
    display: none;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(45deg, #ffd166, #ffb347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.search-box {
    display: flex;
    background: white;
    border-radius: var(--radius-full);
    padding: 4px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.search-box i {
    color: var(--gray);
    margin-left: 20px;
    align-self: center;
}

.search-box input {
    flex: 1;
    padding: 16px 12px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary);
    border-radius: var(--radius-full);
    padding: 12px 32px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
    border-radius: var(--radius-full);
}

.popular-searches {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.popular-label {
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.search-tag {
    color: white;
    text-decoration: none;
    padding: 6px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-full);
    font-size: 14px;
    transition: var(--transition);
}

.search-tag:hover {
    background: rgba(255,255,255,0.25);
}

/* ===== SWIPE SECTION ===== */
.swipe-section {
    padding: 60px 0;
    background: var(--white);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--gray);
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.swipe-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.swipe-card {
    max-width: 500px;
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: var(--transition);
}

.swipe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    height: 250px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-price {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 20px;
    color: var(--dark);
    box-shadow: var(--shadow);
}

.card-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray);
}

.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--danger);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.card-content {
    padding: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-header h3 {
    font-size: 20px;
}

.rating {
    color: var(--warning);
    font-weight: 600;
}

.card-location {
    color: var(--gray);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.uni-tag {
    background: var(--lighter);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.card-features {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.card-features span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--gray);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--light-gray);
}

.owner {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.swipe-actions {
    display: flex;
    gap: 12px;
}

.swipe-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.swipe-btn.skip {
    background: var(--light-gray);
    color: var(--gray);
}

.swipe-btn.like {
    background: var(--danger);
    color: white;
}

.swipe-btn:hover {
    transform: scale(1.1);
}

.swipe-instructions {
    display: flex;
    gap: 40px;
    color: var(--gray);
    font-size: 14px;
}

.swipe-instructions i {
    margin-right: 8px;
}

/* ===== UNIVERSITIES SECTION ===== */
.universities-section {
    padding: 60px 0;
    background: var(--lighter);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--gray);
}

.university-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.university-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 200px;
    cursor: pointer;
    transition: var(--transition);
}

.university-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.university-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.university-card:hover img {
    transform: scale(1.1);
}

.university-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
}

.university-info h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.university-info p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.room-count {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    backdrop-filter: blur(5px);
}

.view-all-link {
    text-align: center;
    margin-top: 40px;
}

.view-all-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ===== FEATURED LISTINGS ===== */
.featured {
    padding: 60px 0;
    background: var(--white);
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.listing-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.listing-image {
    position: relative;
    height: 180px;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-price {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: var(--white);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 16px;
}

.listing-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.listing-content {
    padding: 16px;
}

.listing-content h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.listing-content p {
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.listing-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--gray);
}

.favorite-icon {
    cursor: pointer;
    transition: var(--transition);
}

.favorite-icon:hover {
    transform: scale(1.1);
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
    padding: 60px 0;
    background: var(--lighter);
    text-align: center;
}

.how-it-works h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--gray);
    margin-bottom: 48px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.step {
    padding: 30px;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
    font-size: 32px;
}

.step h3 {
    margin-bottom: 12px;
}

.step p {
    color: var(--gray);
}

/* ===== CTA SECTION ===== */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--dark), #2d2d44);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col .logo {
    color: white;
    margin-bottom: 16px;
}

.footer-col p {
    color: var(--light-gray);
    margin-bottom: 24px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    color: var(--light-gray);
    font-size: 20px;
    transition: var(--transition);
}

.social-links a:hover {
    color: white;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-col a {
    display: block;
    color: var(--light-gray);
    text-decoration: none;
    margin-bottom: 12px;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--light-gray);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h2 {
    font-size: 24px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    outline: none;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--gray);
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-checkbox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
}

.form-checkbox a {
    color: var(--primary);
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.modal-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.modal-divider::before,
.modal-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: var(--light-gray);
}

.modal-divider::before {
    left: 0;
}

.modal-divider::after {
    right: 0;
}

.modal-divider span {
    background: white;
    padding: 0 16px;
    color: var(--gray);
    font-size: 14px;
}

.social-login {
    margin-bottom: 24px;
}

.btn-social {
    width: 100%;
    padding: 12px;
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-social:hover {
    background: var(--lighter);
    border-color: var(--gray);
}

.modal-footer-text {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
}

.modal-footer-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .university-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        flex-direction: column;
        box-shadow: var(--shadow);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .logged-out-nav, .logged-in-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .search-box {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
    }
    
    .search-box input {
        background: white;
        border-radius: var(--radius-full);
        margin-bottom: 12px;
    }
    
    .university-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .university-grid {
        grid-template-columns: 1fr;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}
/* ===== IMPROVED MOBILE NAVIGATION ===== */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
        font-size: 24px;
        cursor: pointer;
        z-index: 1001;
    }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        flex-direction: column;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex !important;
    }
    
    .nav-links a {
        padding: 15px;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .logged-out-nav, .logged-in-nav {
        flex-direction: column;
        width: 100%;
    }
}

/* ===== IMPROVED MOBILE HERO ===== */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 28px !important;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 16px;
        padding: 0 15px;
    }
    
    .search-box {
        flex-direction: column;
        background: transparent;
        padding: 0;
        margin: 20px;
    }
    
    .search-box input {
        width: 100%;
        border-radius: 50px !important;
        margin-bottom: 10px;
        border: 1px solid #e2e8f0;
    }
    
    .search-box button {
        width: 100%;
        border-radius: 50px !important;
    }
    
    .popular-searches {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 0 15px;
    }
    
    .popular-searches a {
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* ===== IMPROVED MOBILE GRIDS ===== */
@media (max-width: 768px) {
    .university-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
        padding: 0 10px;
    }
    
    .university-card {
        height: 150px;
    }
    
    .university-info h3 {
        font-size: 14px;
    }
    
    .university-info p {
        font-size: 11px;
    }
    
    .listings-grid {
        grid-template-columns: 1fr !important;
        padding: 0 15px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr !important;
        padding: 0 15px;
    }
    
    .step {
        padding: 15px;
    }
}

/* ===== IMPROVED PROPERTY CARDS MOBILE ===== */
@media (max-width: 768px) {
    .listing-card {
        margin: 0 0 15px 0;
    }
    
    .listing-image {
        height: 180px;
    }
    
    .listing-price {
        font-size: 14px;
        padding: 4px 10px;
    }
    
    .listing-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .listing-content {
        padding: 12px;
    }
    
    .listing-content h3 {
        font-size: 15px;
    }
    
    .listing-location {
        font-size: 12px;
    }
    
    .listing-meta {
        font-size: 11px;
        gap: 10px;
    }
    
    .btn-contact {
        padding: 8px;
        font-size: 13px;
    }
}

/* ===== IMPROVED MODALS MOBILE ===== */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10px;
        max-height: 85vh;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .modal-footer-text {
        font-size: 13px;
    }
}

/* ===== IMPROVED MOBILE FOOTER ===== */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: center;
    }
    
    .footer-col {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-info p {
        justify-content: center;
    }
    
    .footer-bottom {
        font-size: 12px;
        padding: 15px;
    }
}