/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Almarai:wght@300;400;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #4531ab;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #f59e0b;
    --secondary-dark: #d97706;
    --accent-color: #10b981;
    --accent-dark: #059669;
    
    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-primary: 'Cairo', sans-serif;
    --font-secondary: 'Almarai', sans-serif;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    direction: rtl;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 10000;
    transition: width 0.3s ease;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.logo i {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cta-btn {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    text-align: center;
}

.hero-content {
    margin-bottom: 2rem;
}

.hero-content h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== SEARCH WIDGET ===== */
.search-widget {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 2rem;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    background: white;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(69, 49, 171, 0.1);
}

.search-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.875rem 2rem;
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.privacy-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ===== RESULTS SECTION ===== */
.results-section {
    padding: 2rem;
    min-height: 100vh;
    padding-top: 100px;
}

.results-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.results-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.results-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.results-count {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-back {
    margin-right: auto;
    background: #f3f4f6;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.btn-back:hover {
    background: #e5e7eb;
}

.results-table-container {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
}

.results-table th {
    background: #f9fafb;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.results-table tbody tr:hover {
    background: #f9fafb;
}

.university-name {
    font-weight: 600;
    color: var(--primary-color);
}

.language-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

.language-badge.turkish {
    background: #fef3c7;
    color: #92400e;
}

.language-badge.english {
    background: #dbeafe;
    color: #1e40af;
}

.language-badge.arabic {
    background: #d1fae5;
    color: #065f46;
}

.tuition {
    font-weight: 700;
    color: var(--accent-color);
}

.btn-apply {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(69, 49, 171, 0.3);
}

.no-results {
    text-align: center;
    padding: 3rem !important;
    color: var(--text-secondary);
}

.no-results svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== UNIVERSITIES SECTION ===== */
.universities-page-wrapper {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 100%);
}

.universities-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.page-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
}

.page-subtitle {
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    margin-top: 1.5rem;
}

.university-search-box {
    max-width: 400px;
    margin: 0 auto 2rem;
    position: relative;
}

.university-search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.university-search-box input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.university-search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(69, 49, 171, 0.1);
}

.universities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.university-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.university-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 1.25rem;
    color: white;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.card-header .university-name-en {
    font-size: 0.8rem;
    opacity: 0.9;
}

.card-body {
    padding: 1.25rem;
}

.card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.info-item i {
    color: var(--primary-color);
}

.card-programs {
    margin-bottom: 1rem;
}

.card-programs h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.program-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.85rem;
}

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

.program-name {
    color: var(--text-primary);
}

.program-prices {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.8rem;
}

.new-price {
    color: var(--accent-color);
    font-weight: 700;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: #f3f4f6;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.card-btn {
    flex: 1;
    padding: 0.625rem;
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.card-btn.primary {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
}

.card-btn.secondary {
    background: #f3f4f6;
    color: var(--text-primary);
}

.card-btn:hover {
    transform: translateY(-2px);
}

/* ===== PAGINATION ===== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    transition: all var(--transition-normal);
    z-index: 999;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    padding: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.footer-logo h3 {
    font-size: 1.25rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: var(--radius-full);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    padding-right: 5px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.contact-info i {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .search-filters {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        gap: 1rem;
        transition: right var(--transition-normal);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

@media (max-width: 768px) {
    .search-filters {
        grid-template-columns: 1fr;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .universities-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-back {
        margin-right: 0;
        margin-top: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-title::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 55px;
        height: 55px;
    }
    
    .back-to-top {
        bottom: 90px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .logo span {
        display: none;
    }
    
    .search-widget {
        padding: 1.5rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}
