/* ============================================================
   DR. SHIEBA MEDICAL WEBSITE — MAIN STYLESHEET
   ============================================================ */

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

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    --navy:             #0A1F44;
    --royal-blue:       #1E4ED8;
    --royal-blue-light: #3B6FE8;
    --royal-blue-dark:  #1540B0;
    --cardiac-red:      #E63946;
    --cardiac-red-light:#FF4D5A;
    --teal:             #0EA5E9;
    --light-grey:       #F5F7FA;
    --mid-grey:         #E2E8F0;
    --text-dark:        #0D1B2A;
    --text-muted:       #64748B;
    --white:            #FFFFFF;

    --glass-bg:         rgba(255, 255, 255, 0.10);
    --glass-border:     rgba(255, 255, 255, 0.20);

    --shadow-xs:  0 1px 4px rgba(10, 31, 68, 0.06);
    --shadow-sm:  0 2px 12px rgba(10, 31, 68, 0.08);
    --shadow-md:  0 8px 32px rgba(10, 31, 68, 0.12);
    --shadow-lg:  0 20px 60px rgba(10, 31, 68, 0.16);
    --shadow-glow:0 0 48px rgba(30, 78, 216, 0.28);

    --radius-sm:  12px;
    --radius-md:  20px;
    --radius-lg:  32px;
    --radius-xl:  48px;

    --transition:       all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast:  all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:  all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    --font-en:    'Inter', sans-serif;
    --font-ar:    'Cairo', sans-serif;
    --navbar-height: 72px;
}

/* Dark mode */
[data-theme="dark"] {
    --light-grey:   #0D1B2A;
    --mid-grey:     #162033;
    --text-dark:    #EFF6FF;
    --text-muted:   #94A3B8;
    --white:        #1A2D4A;
    --glass-bg:     rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.10);
    --shadow-md:    0 8px 32px rgba(0, 0, 0, 0.40);
    --shadow-lg:    0 20px 60px rgba(0, 0, 0, 0.50);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-en);
    color: var(--text-dark);
    background-color: var(--light-grey);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[dir="rtl"] body,
[lang="ar"] body {
    font-family: var(--font-ar);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

ul, ol { list-style: none; }

button { cursor: pointer; border: none; background: none; font-family: inherit; }

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { color: var(--text-muted); line-height: 1.75; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.container--wide { max-width: 1400px; }
.container--narrow { max-width: 800px; }

.section {
    padding-block: 5rem;
}

.section--sm { padding-block: 3rem; }
.section--lg { padding-block: 7rem; }

.section__header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section__label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--royal-blue);
    background: rgba(30, 78, 216, 0.1);
    padding: 0.35rem 1rem;
    border-radius: 99px;
    margin-bottom: 0.75rem;
}

.section__title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    color: var(--navy);
    margin-bottom: 1rem;
}

[data-theme="dark"] .section__title { color: var(--text-dark); }

.section__subtitle {
    font-size: 1.0625rem;
    color: var(--text-muted);
    max-width: 560px;
    margin-inline: auto;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.flex { display: flex; }
.flex--center { align-items: center; justify-content: center; }
.flex--between { align-items: center; justify-content: space-between; }
.flex--gap { gap: 1rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.12);
    opacity: 0;
    transition: var(--transition-fast);
}

.btn:hover::before { opacity: 1; }

.btn--primary {
    background: linear-gradient(135deg, var(--royal-blue), var(--royal-blue-dark));
    color: var(--white);
    box-shadow: 0 4px 20px rgba(30, 78, 216, 0.35);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(30, 78, 216, 0.45);
}

.btn--outline {
    border: 2px solid var(--royal-blue);
    color: var(--royal-blue);
    background: transparent;
}

.btn--outline:hover {
    background: var(--royal-blue);
    color: var(--white);
}

.btn--ghost {
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
}

.btn--ghost:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.7);
}

.btn--red {
    background: linear-gradient(135deg, var(--cardiac-red), #C0392B);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.35);
}

.btn--red:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.45);
}

.btn--sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.btn--lg { padding: 1rem 2.25rem; font-size: 1.0625rem; }

.btn--whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.btn--whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.45);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card__image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.card__body {
    padding: 1.5rem;
}

.card__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--royal-blue);
    margin-bottom: 0.5rem;
    display: block;
}

.card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

[data-theme="dark"] .card__title { color: var(--text-dark); }

.card__excerpt {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.card__meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Glass card */
.card--glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

.card--glass:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

/* Service card */
.service-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--mid-grey);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(30, 78, 216, 0.2);
}

.service-card__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(30, 78, 216, 0.1), rgba(30, 78, 216, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
    transition: var(--transition);
}

.service-card:hover .service-card__icon {
    background: linear-gradient(135deg, var(--royal-blue), var(--royal-blue-dark));
}

.service-card:hover .service-card__icon svg,
.service-card:hover .service-card__icon i {
    color: var(--white) !important;
    filter: brightness(100);
}

.service-card__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .service-card__title { color: var(--text-dark); }

.service-card__desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-height);
    background: transparent;
    transition: var(--transition);
}

.navbar--scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--mid-grey);
}

[data-theme="dark"] .navbar--scrolled {
    background: rgba(13, 27, 42, 0.92);
    border-bottom-color: rgba(255,255,255,0.08);
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.navbar__logo {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-decoration: none;
}

.navbar__logo-name {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--white);
    transition: var(--transition-fast);
}

.navbar--scrolled .navbar__logo-name { color: var(--navy); }
[data-theme="dark"] .navbar--scrolled .navbar__logo-name { color: var(--text-dark); }

.navbar__logo-title {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    transition: var(--transition-fast);
}

.navbar--scrolled .navbar__logo-title { color: var(--text-muted); }

.navbar__links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar__link {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.88);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.navbar__link:hover {
    color: var(--white);
    background: rgba(255,255,255,0.12);
}

.navbar--scrolled .navbar__link { color: var(--text-muted); }
.navbar--scrolled .navbar__link:hover { color: var(--navy); background: var(--light-grey); }

[data-theme="dark"] .navbar--scrolled .navbar__link { color: var(--text-muted); }
[data-theme="dark"] .navbar--scrolled .navbar__link:hover { color: var(--text-dark); background: rgba(255,255,255,0.06); }

.navbar__link--active {
    color: var(--white) !important;
    background: rgba(255,255,255,0.18) !important;
}

.navbar--scrolled .navbar__link--active {
    color: var(--royal-blue) !important;
    background: rgba(30, 78, 216, 0.1) !important;
}

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

.navbar__toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.12);
    color: var(--white);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.navbar__toggle-btn:hover { background: rgba(255,255,255,0.22); }
.navbar--scrolled .navbar__toggle-btn { background: var(--mid-grey); color: var(--text-dark); }
[data-theme="dark"] .navbar--scrolled .navbar__toggle-btn { background: rgba(255,255,255,0.08); color: var(--text-dark); }

.navbar__lang {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    letter-spacing: 0.05em;
    transition: var(--transition-fast);
    text-decoration: none;
}

.navbar__lang:hover { background: rgba(255,255,255,0.28); }
.navbar--scrolled .navbar__lang { background: var(--mid-grey); color: var(--text-dark); }
[data-theme="dark"] .navbar--scrolled .navbar__lang { background: rgba(255,255,255,0.08); color: var(--text-dark); }

.navbar__book {
    background: linear-gradient(135deg, var(--cardiac-red), #C0392B);
    color: var(--white) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.8375rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.35);
}

.navbar__book:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.45) !important;
    background: rgba(0,0,0,0) !important;
}

/* Mobile menu */
.navbar__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    transition: var(--transition-fast);
}

.navbar__hamburger span {
    display: block;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.navbar--scrolled .navbar__hamburger { background: var(--mid-grey); }
.navbar--scrolled .navbar__hamburger span { background: var(--text-dark); }

.navbar__hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.is-active span:nth-child(2) { opacity: 0; }
.navbar__hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.navbar__mobile {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem 1.5rem 1.5rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--mid-grey);
    flex-direction: column;
    gap: 0.25rem;
    z-index: 999;
}

[data-theme="dark"] .navbar__mobile {
    background: #0D1B2A;
    border-top-color: rgba(255,255,255,0.08);
}

.navbar__mobile.is-open { display: flex; }

.navbar__mobile-link {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition-fast);
}

.navbar__mobile-link:hover {
    background: var(--light-grey);
    color: var(--royal-blue);
}

[data-theme="dark"] .navbar__mobile-link { color: var(--text-dark); }
[data-theme="dark"] .navbar__mobile-link:hover { background: rgba(255,255,255,0.06); }

.navbar__mobile-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--mid-grey);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy) 0%, #0D2E6E 50%, #1E4ED8 100%);
}

.hero__shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero__shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
}

.hero__shape--1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--teal), transparent);
    top: -200px;
    right: -100px;
    animation: floatShape 8s ease-in-out infinite;
}

.hero__shape--2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--cardiac-red), transparent);
    bottom: -100px;
    left: -100px;
    animation: floatShape 10s ease-in-out infinite reverse;
}

.hero__shape--3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--royal-blue-light), transparent);
    top: 30%;
    right: 30%;
    opacity: 0.05;
    animation: floatShape 12s ease-in-out infinite 2s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(20px, -20px) scale(1.05); }
    66%       { transform: translate(-10px, 15px) scale(0.97); }
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
}

.hero__content { position: relative; z-index: 1; }

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 99px;
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255,255,255,0.88);
    margin-bottom: 1.5rem;
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.85); }
}

.hero__title {
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.hero__title--gradient {
    background: linear-gradient(135deg, #93C5FD, #60A5FA, var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.375rem);
    color: rgba(255,255,255,0.78);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.hero__institution {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 2.5rem;
}

.hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero__stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.hero__stat {
    display: flex;
    flex-direction: column;
}

.hero__stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.hero__stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    margin-top: 0.2rem;
}

.hero__image-wrapper {
    position: relative;
    z-index: 1;
}

.hero__image-frame {
    width: 320px;
    height: 400px;
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.hero__image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__image-badge {
    position: absolute;
    bottom: -16px;
    left: -16px;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-md);
    min-width: 160px;
}

.hero__image-badge-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}

.hero__image-badge-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.45);
    font-size: 0.75rem;
    animation: bounce 2s ease-in-out infinite;
}

.hero__scroll-icon {
    width: 28px;
    height: 44px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
}

.hero__scroll-dot {
    width: 4px;
    height: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
    animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes scrollDot {
    0%   { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(14px); opacity: 0; }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(-6px); }
}

/* ============================================================
   TRUST / STATS STRIP
   ============================================================ */
.trust-strip {
    background: var(--white);
    border-bottom: 1px solid var(--mid-grey);
    padding-block: 2.5rem;
}

[data-theme="dark"] .trust-strip {
    background: #0D2039;
    border-bottom-color: rgba(255,255,255,0.06);
}

.trust-strip__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
    align-items: center;
}

.trust-item {
    text-align: center;
}

.trust-item__value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--royal-blue);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.trust-item__label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.services-section {
    background: var(--light-grey);
}

.services-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.services-bento__item:nth-child(1) { grid-column: span 2; }
.services-bento__item:nth-child(4) { grid-column: span 2; }

/* ============================================================
   ARTICLES SECTION
   ============================================================ */
.articles-section { background: var(--white); }
[data-theme="dark"] .articles-section { background: #0D1B2A; }

/* ============================================================
   VIDEO CARDS
   ============================================================ */
.video-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    background: var(--navy);
}

.video-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.video-card:hover .video-card__thumb {
    transform: scale(1.06);
    opacity: 0.75;
}

.video-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,31,68,0.85) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-card__play {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
    margin-bottom: 2rem;
}

.video-card:hover .video-card__play {
    background: var(--royal-blue);
    border-color: var(--royal-blue);
    transform: scale(1.1);
}

.video-card__info {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
}

.video-card__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--white);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--mid-grey);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    color: var(--text-dark);
    background: var(--white);
    transition: var(--transition-fast);
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--royal-blue);
    box-shadow: 0 0 0 3px rgba(30, 78, 216, 0.12);
}

[data-theme="dark"] .form-control {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-dark);
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--royal-blue-light);
    box-shadow: 0 0 0 3px rgba(59, 111, 232, 0.15);
}

.form-control.is-invalid { border-color: var(--cardiac-red); }
.form-error {
    font-size: 0.8rem;
    color: var(--cardiac-red);
    display: none;
}
.form-control.is-invalid + .form-error { display: block; }

textarea.form-control {
    resize: vertical;
    min-height: 130px;
}

.form-control::placeholder { color: var(--text-muted); opacity: 0.7; }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.badge--blue  { background: rgba(30, 78, 216, 0.1); color: var(--royal-blue); }
.badge--red   { background: rgba(230, 57, 70, 0.1); color: var(--cardiac-red); }
.badge--green { background: rgba(34, 197, 94, 0.1); color: #16A34A; }
.badge--grey  { background: var(--mid-grey); color: var(--text-muted); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 3rem;
}

.pagination__link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--white);
    border: 1.5px solid var(--mid-grey);
    transition: var(--transition-fast);
}

.pagination__link:hover,
.pagination__link--active {
    background: var(--royal-blue);
    border-color: var(--royal-blue);
    color: var(--white);
}

/* ============================================================
   SECTION — CTA BANNER
   ============================================================ */
.cta-banner {
    background: linear-gradient(135deg, var(--navy), #0D2E6E 50%, var(--royal-blue));
    border-radius: var(--radius-xl);
    padding: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 50%, rgba(14,165,233,0.15), transparent 60%);
}

.cta-banner__title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    position: relative;
}

.cta-banner__subtitle {
    color: rgba(255,255,255,0.72);
    margin-bottom: 2rem;
    position: relative;
}

.cta-banner__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--navy);
    color: rgba(255,255,255,0.72);
    padding-block: 4rem 2rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.footer__brand-title {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1rem;
}

.footer__brand-desc {
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer__social {
    display: flex;
    gap: 0.6rem;
}

.footer__social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.65);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.footer__social-link:hover {
    background: var(--royal-blue);
    border-color: var(--royal-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.footer__heading {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 1.25rem;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer__link {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.58);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.footer__link:hover { color: var(--white); padding-left: 4px; }
[dir="rtl"] .footer__link:hover { padding-left: 0; padding-right: 4px; }

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.58);
    margin-bottom: 0.75rem;
}

.footer__contact-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(30, 78, 216, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--royal-blue-light);
    font-size: 0.875rem;
}

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ============================================================
   ANIMATIONS — SCROLL REVEAL
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.reveal--left  { transform: translateX(-28px); }
.reveal--right { transform: translateX(28px); }
.reveal--scale { transform: scale(0.92); }

.reveal--left.is-visible,
.reveal--right.is-visible { transform: none; }
.reveal--scale.is-visible { transform: none; }

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.alert--success { background: rgba(34, 197, 94, 0.1); color: #16A34A; border: 1px solid rgba(34, 197, 94, 0.25); }
.alert--error   { background: rgba(230, 57, 70, 0.1); color: var(--cardiac-red); border: 1px solid rgba(230, 57, 70, 0.25); }
.alert--info    { background: rgba(30, 78, 216, 0.1); color: var(--royal-blue); border: 1px solid rgba(30, 78, 216, 0.2); }

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-header {
    background: linear-gradient(135deg, var(--navy), #0D2E6E);
    padding-top: calc(var(--navbar-height) + 3.5rem);
    padding-bottom: 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 50%, rgba(30,78,216,0.3), transparent 60%);
    pointer-events: none;
}

.page-header__title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--white);
    position: relative;
    z-index: 1;
    margin-bottom: 0.5rem;
}

.page-header__subtitle {
    color: rgba(255,255,255,0.65);
    position: relative;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.5);
    position: relative;
    z-index: 1;
    margin-top: 1rem;
}

.breadcrumb__link { color: rgba(255,255,255,0.5); transition: var(--transition-fast); }
.breadcrumb__link:hover { color: var(--white); }
.breadcrumb__sep { opacity: 0.4; }
.breadcrumb__current { color: rgba(255,255,255,0.75); }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center  { text-align: center; }
.text-end     { text-align: end; }
.text-muted   { color: var(--text-muted); }
.text-white   { color: var(--white); }
.text-navy    { color: var(--navy); }
.text-blue    { color: var(--royal-blue); }
.text-red     { color: var(--cardiac-red); }

.fw-400 { font-weight: 400; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mt-4  { margin-top: 2rem; }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.mb-4  { margin-bottom: 2rem; }

.d-none   { display: none; }
.d-flex   { display: flex; }
.d-grid   { display: grid; }
.d-block  { display: block; }
.d-inline { display: inline; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .services-bento { grid-template-columns: repeat(2, 1fr); }
    .services-bento__item:nth-child(1),
    .services-bento__item:nth-child(4) { grid-column: span 1; }
}

@media (max-width: 768px) {
    :root { --navbar-height: 64px; }

    .navbar__links,
    .navbar__lang { display: none; }

    .navbar__hamburger { display: flex; }

    .hero__grid { grid-template-columns: 1fr; }
    .hero__image-wrapper { display: none; }
    .hero__ctas { flex-direction: column; align-items: flex-start; }

    .footer__grid { grid-template-columns: 1fr; gap: 2rem; }

    .cta-banner { padding: 2.5rem 1.5rem; }

    .services-bento { grid-template-columns: 1fr; }

    .section { padding-block: 3.5rem; }
}

@media (max-width: 480px) {
    .hero__stats { gap: 1.5rem; }
    .trust-strip__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   PUBLICATION CARD  (research page)
   ============================================================ */

/* Disable the generic card hover-lift for publication cards */
.pub-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.pub-card__inner {
    display: flex;
    align-items: stretch;
}

.pub-card__body {
    flex: 1;
    padding: 1.5rem 1.75rem;
    min-width: 0;
}

.pub-card__thumb-col {
    flex-shrink: 0;
    width: 148px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem 1.25rem 1rem;
    border-left: 1px solid #E2E8F0;
    background: #FAFBFC;
    gap: .6rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

[data-theme="dark"] .pub-card__thumb-col {
    border-left-color: rgba(255,255,255,.08);
    background: transparent;
}

/* ── Badges ── */
.pub-card__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    margin-bottom: .9rem;
}

.pub-badge {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .01em;
    padding: .28rem .7rem;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
}

.pub-badge--new {
    background: #14532D;
    color: #DCFCE7;
}

.pub-badge--type {
    background: #F8FAFC;
    color: #475569;
    border: 1px solid #CBD5E1;
}

.pub-badge--fulltext {
    background: transparent;
    color: var(--royal-blue);
    border: 1.5px solid var(--royal-blue);
}

/* ── Title ── */
.pub-card__title {
    font-size: 1.0125rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.48;
    margin-bottom: .45rem;
}

[data-theme="dark"] .pub-card__title { color: var(--text-dark); }

/* ── Date ── */
.pub-card__date {
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: .55rem;
}

/* ── Journal ── */
.pub-card__journal {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: .7rem;
    opacity: .85;
}

/* ── Authors ── */
.pub-card__authors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .4rem;
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: .9rem;
}

.pub-card__author {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

/* Small grey circle avatar */
.pub-card__author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #CBD5E1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .55rem;
    color: #fff;
    overflow: hidden;
}

.pub-card__author-avatar i {
    font-size: .75rem;
    color: #94A3B8;
    margin-top: 2px;
}

.pub-card__author-sep {
    color: #94A3B8;
    line-height: 1;
}

.pub-card__author-more {
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: .02em;
}

/* ── Abstract ── */
.pub-card__abstract-wrap {
    margin-bottom: .9rem;
    background: #F8FAFC;
    border-radius: 8px;
    padding: .8rem 1rem .7rem;
    border-left: 3px solid #CBD5E1;
}

[data-theme="dark"] .pub-card__abstract-wrap {
    background: rgba(255,255,255,.04);
    border-left-color: rgba(255,255,255,.15);
}

.pub-card__abstract-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: .4rem;
}

.pub-card__abstract-text {
    font-size: .845rem;
    color: #374151;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .pub-card__abstract-text { color: #94A3B8; }

.pub-card__abstract-text.is-expanded {
    display: block;
    overflow: visible;
}

.pub-card__abstract-toggle {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    margin-top: .55rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--royal-blue);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 1;
    font-family: inherit;
}

.pub-card__abstract-toggle:hover { text-decoration: underline; }

.pub-card__abstract-toggle i {
    font-size: .6rem;
    transition: transform .2s;
}

/* ── Action buttons ── */
.pub-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: .1rem;
}

/* ── Thumbnail column ── */
.pub-card__thumb-link {
    display: block;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    transition: box-shadow .2s, transform .2s;
}

.pub-card__thumb-link:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    transform: translateY(-2px);
}

.pub-card__thumb {
    width: 100%;
    display: block;
    border-radius: 6px;
}

.pub-card__thumb-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: #F1F5F9;
    border: 1.5px dashed #CBD5E1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    font-size: 2rem;
}

.pub-card__source-link {
    font-size: .72rem;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    transition: color .15s;
}

.pub-card__source-link:hover { color: var(--royal-blue); }

/* ── Responsive ── */
@media (max-width: 640px) {
    .pub-card__inner { flex-direction: column-reverse; }

    .pub-card__thumb-col {
        width: 100%;
        flex-direction: row;
        align-items: flex-start;
        border-left: none;
        border-bottom: 1px solid #E2E8F0;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        background: #FAFBFC;
        padding: 1rem 1.5rem;
        gap: 1rem;
    }

    .pub-card__thumb-link { width: 80px; flex-shrink: 0; }
    .pub-card__body { padding: 1.25rem 1.5rem; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .navbar, .footer, .hero__scroll { display: none; }
    body { background: white; color: black; }
}
