/* Universities Page Styles */

/* Header Override */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 100px 0 140px;
    /* Extra bottom padding for overlap */
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: url('/images/pattern.png') repeat; */
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, transparent 20%),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.05) 0%, transparent 20%);
    opacity: 0.1;
}

/* Filter Card */
.filter-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 20;
    margin-top: -60px;
    /* Overlap header */
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-grid {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 1fr;
    gap: 20px;
    align-items: center;
}

/* Input Groups */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 20px;
    /* RTL */
    color: var(--primary-color);
    pointer-events: none;
    z-index: 10;
    font-size: 1.1rem;
}

.form-control-custom {
    width: 100%;
    padding: 16px 20px 16px 50px;
    /* Left padding for text, Right padding for icon (RTL: flip) */
    padding-right: 55px;
    /* Icon space */
    border: 2px solid #eef2f6;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-main);
    background: #f8faff;
    transition: all 0.3s ease;
    font-family: 'Tajawal', sans-serif;
    height: 56px;
    /* Explicit height matching button */
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.1);
}

.form-control-custom::placeholder {
    color: #a0aec0;
}

/* Search Button */
.btn-search {
    width: 100%;
    height: 56px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 168, 232, 0.3);
}

.btn-search i {
    font-size: 1.2rem;
}

/* University Card Enhancements */
.uni-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f4f8;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.uni-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 168, 232, 0.3);
}

/* Updated Banner Logic */
.uni-card-img {
    height: 150px;
    /* Specific height for banner area */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uni-card-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Dark overlay */
    z-index: 1;
}

/* Floating Logo */
.uni-logo-container {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
}

.uni-logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.uni-card:hover .uni-card-img img {
    transform: scale(1.1);
}

.uni-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    padding: 4px 8px;
}

.uni-card-body {
    padding: 24px;
    flex: 1;
}

.uni-card-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.uni-features {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eef2f6;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.uni-features span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.uni-features i {
    color: var(--secondary-color);
}

.uni-card-footer {
    padding: 20px;
    background: #f8faff;
    border-top: 1px solid #eef2f6;
}

.btn-details {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background: white;
    color: var(--primary-color);
    border: 1px solid #dce5f2;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

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

/* Responsive */
@media (max-width: 992px) {
    .search-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filter-card {
        padding: 20px;
    }
}

/* Program Search Card Styles */
.university-card {
    background: white;
    border-radius: 16px;
    /* Smooth corners */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    /* Softer, deeper shadow */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border */
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.university-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 168, 232, 0.4);
    /* Highlight on hover */
}

.university-header {
    padding: 20px;
    background: #f8faff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.university-logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 5px;
    overflow: hidden;
}

.university-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.default-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f6;
    color: #a0aec0;
    font-size: 1.5rem;
}

.university-title h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.university-title p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.university-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.program-name {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
}

.program-name span.name-ar {
    display: block;
}

.program-name span.name-en {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 400;
    margin-top: 4px;
}

.program-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.detail-item {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item i {
    color: var(--secondary-color);
}

.price-section {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px dashed #e9ecef;
}

.price-amount {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.price-amount.not-found {
    font-size: 1rem;
    color: #adb5bd;
}

.register-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.register-btn:hover {
    background: var(--primary-dark);
}

.no-results {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--secondary-color);
}

/* Hero Section Redesign */
.universities-hero {
    background: linear-gradient(135deg, #0B1F33 0%, #1F3A5F 100%);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
    color: white;
}

.universities-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.universities-hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #a5b4fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 30px;
    line-height: 1.6;
}

.search-box {
    background: white;
    padding: 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    max-width: 500px;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    outline: none;
    color: #334155;
    background: transparent;
}

.search-box button {
    background: var(--secondary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.search-box button:hover {
    background: var(--secondary-hover);
    transform: scale(1.05);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    padding: 10px;
    z-index: 100;
    display: none;
    /* Toggled by JS */
}

.search-suggestions .tag {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 20px;
    margin: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.search-suggestions .tag:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: perspective(1000px) rotateY(0deg);
}

/* Responsive Hero */
@media (max-width: 992px) {
    .universities-hero .container {
        flex-direction: column-reverse;
        text-align: center;
        padding-bottom: 60px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .search-box {
        margin: 0 auto;
    }

    .hero-image {
        justify-content: center;
        margin-bottom: 30px;
    }

    .hero-image img {
        transform: none;
        max-width: 80%;
    }
}

/* Filter Sidebar Styling */
.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f4f8;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-section h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #4a5568;
    font-weight: 500;
}

.filter-card .form-control,
.filter-card .form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f8fafc;
    color: #2d3748;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.filter-card .form-control:focus,
.filter-card .form-select:focus {
    border-color: var(--secondary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.1);
    outline: none;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.price-input-group {
    flex: 1;
    position: relative;
}

.price-input-group span {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #a0aec0;
}

.price-inputs input {
    width: 100%;
    padding: 8px 12px;
    padding-left: 25px;
    /* Space for currency symbol */
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}

/* Range Slider Track */
.range-slider {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    position: relative;
    margin: 25px 0 10px;
}

/* Override existing range styles if needed */
.filter-card {
    position: sticky;
    top: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

/* Range Slider Styles */
.range-slider {
    position: relative;
    height: 5px;
    background: #e9ecef;
    border-radius: 5px;
    margin: 20px 0;
}

.range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 5px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #1a73e8;
    pointer-events: auto;
    -webkit-appearance: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Reset Button */
.reset-btn {
    width: 100%;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    color: #495057;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.reset-btn:hover {
    background: #e2e6ea;
}

.sort-box select {
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid #ced4da;
}

/* Swiper Customization */
.popular-programs-slider {
    padding: 20px 5px !important;
}

.program-slide {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s;
    height: auto !important;
    border: 1px solid #f0f0f0;
}

.program-slide:hover {
    transform: translateY(-5px);
    border-color: #1a73e8;
}

.program-slide h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.program-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.program-price {
    color: #1a73e8;
    font-weight: 700;
}

.program-university {
    color: #6c757d;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Life in Turkey Page Styles */
.turkey-hero {
    background: linear-gradient(135deg, #0B1F33 0%, #1F3A5F 100%);
    padding: 100px 0 140px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.turkey-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.turkey-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #a5b4fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.turkey-hero-content p {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Overview Section */
.turkey-overview {
    padding: 80px 0;
    background: white;
}

.overview-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.overview-text {
    flex: 1;
}

.overview-text h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.overview-text ul {
    list-style: none;
    padding: 0;
}

.overview-text li {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: #4a5568;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.overview-text li::before {
    content: '✓';
    color: var(--secondary-color);
    font-weight: bold;
}

.overview-image {
    flex: 1;
}

.overview-image img {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: rotate(2deg);
    transition: transform 0.3s;
}

.overview-image:hover img {
    transform: rotate(0);
}

/* Cards Grid Layouts */
.cities-grid,
.activities-grid,
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cost-grid,
.culture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

/* Card Styles */
.city-card,
.activity-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f0f4f8;
}

.city-card:hover,
.activity-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.city-image,
.activity-image {
    height: 200px;
    overflow: hidden;
}

.city-image img,
.activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.city-card:hover img,
.activity-card:hover img {
    transform: scale(1.1);
}

.city-content,
.activity-content {
    padding: 25px;
}

.city-content h3,
.activity-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.city-features {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    color: #718096;
    font-size: 0.9rem;
}

.city-highlights h4,
.city-features span i {
    color: var(--secondary-color);
}

/* Cost & Culture Cards */
.cost-category,
.culture-item,
.tip-item {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border-top: 4px solid transparent;
}

.cost-category:hover,
.culture-item:hover,
.tip-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
    border-top-color: var(--secondary-color);
}

.cost-icon,
.culture-icon,
.tip-icon {
    width: 70px;
    height: 70px;
    background: #f0f9ff;
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
}

.cost-items {
    text-align: right;
    margin-top: 20px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
}

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

.item-price {
    font-weight: 700;
    color: var(--primary-color);
}

/* Sections Backgrounds */
.cities-section,
.culture-section,
.tips-section {
    padding: 80px 0;
    background: #f8fafc;
}

.cost-of-living,
.activities-section {
    padding: 80px 0;
    background: white;
}

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

    .overview-content {
        flex-direction: column;
    }

    .overview-image img {
        transform: rotate(0);
        width: 100%;
    }

    .cities-grid,
    .cost-grid,
    .culture-grid,
    .activities-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

/* Homepage Redesign Styles */
.home-services {
    padding: 80px 0;
    background: #f8fafc;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    border: 1px solid rgba(226, 232, 240, 0.6);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card .icon-wrapper {
    width: 80px;
    height: 80px;
    background: #f0f9ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
    color: var(--secondary-color);
    transition: all 0.4s ease;
}

.service-card:hover .icon-wrapper {
    background: white;
    color: var(--primary-color);
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
    transition: color 0.4s ease;
}

.service-card:hover h3 {
    color: white;
}

.service-card p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 25px;
    transition: color 0.4s ease;
}

.service-card:hover p {
    color: rgba(255, 255, 255, 0.9);
}

.service-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.service-card:hover .service-link {
    color: white;
}

.service-link i {
    margin-right: 8px;
    /* RTL switch if needed */
    transition: transform 0.3s ease;
}

.service-card:hover .service-link i {
    transform: translateX(-5px);
}

/* Override Hero Overlay for Homepage */
.hero-slider .overlay {
    background: linear-gradient(135deg, rgba(11, 31, 51, 0.85) 0%, rgba(31, 58, 95, 0.6) 100%) !important;
}

/* Partners Section Enhancement */
.partners-section {
    padding: 60px 0;
    background: white;
    border-bottom: 1px solid #f1f5f9;
}

.partners-logos-wrapper {
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    border-radius: 16px;
}

.partners-logos-wrapper::before,
.partners-logos-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 70px;
    z-index: 2;
    pointer-events: none;
}

.partners-logos-wrapper::before {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
}

.partners-logos-wrapper::after {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}

.partners-track {
    display: flex;
    align-items: center;
    gap: 56px;
    width: max-content;
    will-change: transform;
    animation: scroll 30s linear infinite;
}

.partner-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    padding: 10px 15px;
    min-width: 140px;
    max-width: 180px;
}

.partner-logo img {
    height: 52px;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: transform 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.33%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .partners-track {
        transform: none !important;
    }
}

/* Stats Section */
.stats-section {
    padding: 80px 0;
    background: var(--primary-color);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.stat-item h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-item p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Call to Action */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    text-align: center;
    color: white;
}

.cta-content h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.3rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons .btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
}

/* Responsive adjustments for new Homepage elements */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        gap: 40px;
    }

    .partners-track {
        gap: 30px;
    }


    .partner-logo img {
        height: 40px;
    }
}

/* Rich Text & Detailed Content Styles */
.rich-text {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Intro Text */
.lead-text {
    font-size: 1.1rem;
    line-height: 2;
    color: #4a5568;
    font-weight: 500;
}

.rich-text p {
    margin-bottom: 1rem;
}

.rich-text ul,
.rich-text ol {
    margin-bottom: 1rem;
    padding-right: 1.5rem;
    /* RTL support */
}

.rich-text li {
    margin-bottom: 0.5rem;
}

.rich-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Fix contrast for dark background sections */
.text-white .rich-text,
.text-white .rich-text p,
.text-white .rich-text ul,
.text-white .rich-text li,
.text-white .rich-text strong {
    color: white !important;
}

.text-white .rich-text .text-success {
    color: #25D366 !important;
    /* Keep WhatsApp green or checkmark green visible */
}

.text-white .section-title-sm {
    color: white !important;
}

/* Ensure buttons inside dark sections keep their text color */
.text-white .btn-light {
    color: var(--primary-color) !important;
    background: white !important;
}

.text-white .btn-light:hover {
    background: #f8f9fa !important;
    color: var(--primary-dark) !important;
}

.detail-section {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f4f8;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.06);
}

.section-title-sm {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 12px;
}

.section-title-sm::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.detail-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f4f8;
    height: 100%;
    transition: all 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--secondary-color);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed #e2e8f0;
    display: flex;
    align-items: center;
}

.text-gold {
    color: #d69e2e;
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    margin-top: 1.5rem;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Stats Styling Update */
.university-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: #f8fafc;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: white;
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 600;
}

@media (max-width: 768px) {
    .university-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Filter Floating Additions */
.mobile-filter-btn {
    display: none;
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--secondary-color, #00A8E8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 168, 232, 0.4);
    z-index: 999;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    transition: top 0.3s cubic-bezier(0.25, 1, 0.5, 1), left 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.close-filter-btn {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

@media (max-width: 992px) {
    .mobile-filter-btn {
        display: flex;
    }

    .filter-card {
        position: fixed !important;
        /* Positioned directly to expand from the button */
        width: 320px;
        /* Fixed width rather than full screen width */
        max-height: calc(100vh - 120px);
        background: white;
        z-index: 10005 !important;
        border-radius: 16px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
        padding: 20px;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform-origin: top right;
        transform: scale(0);
        transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
            visibility 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
            transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        margin: 0;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .filter-card.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: scale(1) !important;
    }

    .close-filter-btn {
        display: block;
    }

    .main-content-offset {
        margin-top: 20px;
        position: relative;
        z-index: 10;
        padding-bottom: 50px;
    }
}

@media (min-width: 993px) {
    .main-content-offset {
        margin-top: -50px;
        position: relative;
        z-index: 10;
        padding-bottom: 50px;
    }
}

.scroll-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #64748b;
    color: white;
    border: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 998;
    cursor: pointer;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s, transform 0.3s;
}

.scroll-to-top-btn:hover {
    background-color: #475569;
    transform: translateY(-3px);
}