/* --- Bento / Apple Style Design System --- */

:root {
    --bg-page: #f5f5f7;
    --bg-card: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent-blue: #0071e3;
    --accent-blue-hover: #0077ed;
    --border-light: rgba(0, 0, 0, 0.05);
    /* Very subtle border */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.08);
    --radius-lg: 20px;
    --radius-xl: 30px;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* 1. Hero Section (Clean & Minimal) */
.university-hero-bento {
    position: relative;
    height: 500px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: -80px;
    /* Overlap header */
    overflow: hidden;
}

.hero-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(2px);
    /* Slight blur for focus */
    z-index: 1;
}

.hero-content-bento {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.university-logo-bento img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: white;
    padding: 15px;
    border-radius: 28px;
    /* Squircle */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero-title-bento {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-badges-bento {
    display: flex;
    gap: 12px;
}

.badge-pill {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary-bento {
    background: var(--accent-blue);
    color: white;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
    display: inline-flex;
    align-items: center;
}

.btn-primary-bento:hover {
    background: var(--accent-blue-hover);
    transform: scale(1.02);
    color: white;
    /* Ensure text stays white */
}

/* 2. Bento Grid Layout */
.bento-grid-container {
    display: grid;
    /* 3 Columns by default */
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(200px, auto);
    /* Flexible row height */
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Base Card Style */
.bento-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-light);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    z-index: 2;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.card-body-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: #f0f0f2;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* Specific Tile Spans */

/* Overview: Wide, top-left */
.overview-card {
    grid-column: span 2;
    grid-row: span 1;
}

/* Stats: Box, top-right */
.stats-card {
    grid-column: span 1;
    grid-row: span 1;
    background: #fafafc;
    /* Slightly darker white */
}

/* Colleges: Tall */
.colleges-card {
    grid-column: span 1;
    grid-row: span 2;
}

.scrollable {
    max-height: 350px;
    overflow-y: auto;
    padding-left: 5px;
}

/* Language & Accreditation: Small stacking */
.lang-card,
.acc-card {
    grid-column: span 1;
    grid-row: span 1;
    display: flex;
    flex-direction: row;
    /* Horizontal layout for small cards */
    align-items: center;
    gap: 15px;
    padding: 20px;
}

.lang-card .card-icon,
.acc-card .card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    background: rgba(0, 113, 227, 0.1);
    color: var(--accent-blue);
}

.mini-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.mini-text {
    font-size: 0.85rem;
    margin: 0;
    color: var(--text-secondary);
}

/* Features & Achievements: Wide */
.features-card,
.achievements-card,
.cons-card {
    grid-column: span 2;
    grid-row: span 1;
}

/* CTA Card: Dark Mode style */
.cta-card {
    grid-column: span 1;
    grid-row: span 1;
    background: #1d1d1f;
    /* Apple Dark */
    color: white;
    border: none;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.cta-card .card-title {
    color: white;
    margin-bottom: 30px;
}

.bento-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: right;
    /* Specific for RTL */
    width: 100%;
}

.bento-list li {
    padding: 8px 0;
    color: #a1a1a6;
    /* Light gray text */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bento-list li:last-child {
    border-bottom: none;
}

.bento-list li i {
    color: #298e46;
    /* Success green */
    margin-left: 10px;
}

.btn-whatsapp-bento {
    background: #34c759;
    /* Apple Green */
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
    display: block;
}

.btn-whatsapp-bento:hover {
    background: #30d158;
    transform: scale(1.02);
}

/* Stats Grid inside Stats Card */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
}

.stat-box {
    background: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 992px) {
    .bento-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .colleges-card {
        grid-column: span 2;
        /* Full width on tablet */
    }
}

@media (max-width: 768px) {
    .bento-grid-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .bento-card {
        width: 100%;
        margin-bottom: 0;
    }

    .hero-title-bento {
        font-size: 2.5rem;
    }
}

/* Utilities */
.text-warning {
    color: #ff9f0a !important;
}

/* Apple Orange */
.text-gold {
    color: #ffcc00 !important;
}

/* Apple Yellow */
.text-danger {
    color: #ff3b30 !important;
}

/* Apple Red */
.text-accent {
    color: var(--accent-blue) !important;
}

/* 3. Programs Section (Redesigned List) */
.university-programs,
.university-facilities,
.university-admission,
.university-costs,
.university-life,
.university-cta {
    padding: 80px 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: -0.02em;
}

/* Tabs: Segmented Control Style */
.programs-tabs {
    max-width: 600px;
    margin: 0 auto 50px;
}

.tab-buttons {
    display: flex;
    background: #e5e5ea;
    padding: 4px;
    border-radius: 50px;
}

.tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: white;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-contents {
    display: block;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Programs List Layout */
.programs-list-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.program-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f2;
    cursor: pointer;
    transition: background 0.2s ease;
}

.program-row:last-child {
    border-bottom: none;
}

.program-row:hover {
    background: #f9f9fa;
}

.program-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.program-icon-small {
    width: 45px;
    height: 45px;
    background: rgba(0, 113, 227, 0.1);
    color: var(--accent-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.program-icon-small.master-icon {
    background: rgba(175, 82, 222, 0.1);
    /* Purple */
    color: #af52de;
}

.program-icon-small.phd-icon {
    background: rgba(255, 45, 85, 0.1);
    /* Red/Pink */
    color: #ff2d55;
}

.program-name {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.program-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.program-meta .divider {
    color: #d1d1d6;
}

.program-meta i {
    font-size: 0.85rem;
}

.program-action {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 15px;
}

.program-price {
    font-weight: 700;
    color: var(--accent-blue);
    font-size: 1.1rem;
}

.program-price .period {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.arrow-icon {
    color: #c7c7cc;
    font-size: 0.9rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.program-row:hover .arrow-icon {
    color: var(--accent-blue);
    transform: translateX(-3px);
    /* RTL arrow moves left */
}

/* Mobile Responsiveness for List */
@media (max-width: 768px) {
    .program-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .program-action {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px dashed #f0f0f2;
    }
}

/* 4. Facilities Grid */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.facility-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.facility-image {
    height: 250px;
    overflow: hidden;
}

.facility-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.facility-card:hover .facility-image img {
    transform: scale(1.05);
}

.facility-content {
    padding: 30px;
}

.facility-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.facility-content ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.facility-content ul li {
    position: relative;
    padding-right: 20px;
    /* Arabic RTL */
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.facility-content ul li::before {
    content: "•";
    color: var(--accent-blue);
    position: absolute;
    right: 0;
    font-size: 1.5rem;
    line-height: 1;
}

/* 5. FAQ Section (Restored) */
.university-faq {
    padding: 80px 0;
    background: #fcfcfd;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item-detail {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item-detail.active {
    box-shadow: var(--shadow-soft);
    border-color: var(--accent-blue);
}

.faq-question-detail {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: white;
    transition: background 0.2s;
}

.faq-question-detail:hover {
    background: #f9f9fa;
}

.faq-question-detail h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.faq-question-detail i {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.faq-item-detail.active .faq-question-detail i {
    transform: rotate(180deg);
    color: var(--accent-blue);
}

.faq-answer-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f9f9fa;
}

.faq-answer-detail p {
    margin: 0;
    padding: 20px 25px;
    color: var(--text-secondary);
    line-height: 1.6;
    border-top: 1px solid #f0f0f2;
}

/* 6. Bottom CTA */
.university-cta {
    background: #1d1d1f;
    /* Dark bg */
    color: white;
    text-align: center;
    padding: 100px 0;
}

.cta-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.primary-btn {
    background: var(--accent-blue);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.primary-btn:hover {
    background: var(--accent-blue-hover);
    transform: scale(1.05);
    color: white;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: white;
    color: #1d1d1f;
}

/* Responsive Fixes */
@media (max-width: 992px) {

    .facilities-grid,
    .grid-3,
    .grid-2,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}