/* ══════════════════════════════════════════════════════════════════
   ريادة - Riyada Platform Stylesheet
   ══════════════════════════════════════════════════════════════════ */

/* ── Base Styles ── */
* { 
    font-family: 'Tajawal', sans-serif; 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    background-color: #1a1f2e; 
    color: #ffffff; 
    overflow-x: hidden; 
}

/* ── Validation Errors ── */
.text-danger,
.field-validation-error,
.validation-summary-errors li {
    color: #e74c3c !important;
}

/* ── Form Controls: force RTL text entry ── */
.form-control,
.form-select,
textarea.form-control {
    direction: rtl;
    text-align: right;
}

/* ── Hide browser native password reveal button ── */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
}
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-strong-password-auto-fill-button,
input[type="password"]::-webkit-textfield-decoration-container {
    display: none !important;
    visibility: hidden !important;
}

/* ── Navbar ── */
.riyada-nav {
    background: #1a1f2e;
    padding: 0.7rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(23,185,126,0.1);
    transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease, border-bottom 0.35s ease;
}

.riyada-nav.scrolled {
    background: rgba(26, 31, 46, 0.45);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.riyada-nav .nav-link { 
    color: rgba(255,255,255,0.8); 
    font-weight: 500; 
    font-size: 0.95rem; 
    padding: 0.5rem 1rem !important; 
    transition: color 0.3s; 
}

.riyada-nav .nav-link:hover, 
.riyada-nav .nav-link.active { 
    color: #17b97e; 
}

.riyada-nav .brand-text { 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: #fff; 
}

.btn-riyada { 
    background: #17b97e; 
    color: #fff; 
    border: none; 
    border-radius: 25px; 
    padding: 0.5rem 1.8rem; 
    font-weight: 600; 
    transition: all 0.3s; 
}

.btn-riyada:hover { 
    background: #14a76c; 
    color: #fff; 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(23,185,126,0.3); 
}

/* ── Riyada Logo SVG ── */
.riyada-logo { width: 45px; height: 45px; }
.riyada-logo-sm { width: 55px; height: 55px; }
.riyada-logo-lg { width: 80px; height: 80px; }

/* ── Hero ── */
.hero-riyada {
    background: #1a1f2e;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-riyada::before, 
.hero-riyada::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border: 2px solid rgba(23,185,126,0.3);
    transform: rotate(45deg);
}

.hero-riyada::before { top: -100px; right: -100px; }
.hero-riyada::after { bottom: -100px; left: -100px; }

.geo-diamond {
    position: absolute;
    border: 2px solid rgba(23,185,126,0.15);
    transform: rotate(45deg);
}

.geo-diamond-1 { width: 200px; height: 200px; top: 10%; right: 5%; }
.geo-diamond-2 { width: 150px; height: 150px; bottom: 15%; left: 8%; }
.geo-diamond-3 { width: 100px; height: 100px; top: 30%; left: 3%; border-color: rgba(23,185,126,0.25); }
.geo-diamond-4 { width: 250px; height: 250px; bottom: -50px; right: 15%; border-color: rgba(23,185,126,0.1); }

/* Floating icons */
.float-icon { position: absolute; color: rgba(255,255,255,0.06); font-size: clamp(2rem, 3.5vw, 4.5rem); }
.fi-1 { top: 15%; right: 20%; } 
.fi-2 { top: 25%; left: 15%; } 
.fi-3 { bottom: 25%; right: 30%; }
.fi-4 { bottom: 35%; left: 25%; } 
.fi-5 { top: 40%; right: 10%; } 
.fi-6 { top: 10%; left: 35%; }

.hero-title {
    font-size: clamp(2.75rem, 6vw, 7rem);
    font-weight: 900;
    color: #17b97e;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.35rem, 3vw, 3.25rem);
    font-weight: 700;
    color: #ffffff;
    margin-top: 0.5rem;
}

/* ── Chevron Divider ── */
.chevron-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2.5rem 0;
    overflow: hidden;
}

.chevrons { 
    color: rgba(255,255,255,0.15); 
    font-size: 1.1rem; 
    letter-spacing: -2px; 
    white-space: nowrap; 
}

/* ── Stats Section ── */
.stats-section { background: #1a1f2e; padding: clamp(2.5rem, 5vw, 6rem) 0; }

.stats-title {
    font-size: clamp(1.8rem, 3.5vw, 3.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: clamp(1.8rem, 3vw, 3rem);
}

.stat-box {
    border: 1.5px solid rgba(23,185,126,0.4);
    border-radius: 12px;
    padding: clamp(1rem, 1.8vw, 1.8rem) clamp(1.2rem, 2vw, 2rem);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: all 0.3s;
    background: rgba(23,185,126,0.03);
}

.stat-box:hover { 
    border-color: #17b97e; 
    background: rgba(23,185,126,0.08); 
    transform: translateY(-3px); 
}

.stat-box .stat-num {
    font-size: clamp(1.5rem, 2.2vw, 2.4rem);
    font-weight: 800;
    color: #ffffff;
}

.stat-box .stat-label {
    font-size: clamp(0.9rem, 1.2vw, 1.25rem);
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

.stat-box-total {
    border: 1.5px solid rgba(23,185,126,0.5);
    border-radius: 12px;
    padding: clamp(1.1rem, 1.8vw, 1.8rem) clamp(1.5rem, 2.5vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(23,185,126,0.05);
}

.stat-box-total .stat-label {
    color: #17b97e;
    font-weight: 700;
    font-size: clamp(1rem, 1.4vw, 1.45rem);
}

.stat-box-total .stat-num {
    font-size: clamp(1.8rem, 2.6vw, 2.8rem);
    font-weight: 800;
}

/* ── About Section ── */
.about-section { background: #1a1f2e; padding: clamp(2.5rem, 5vw, 6rem) 0 clamp(3rem, 6vw, 7rem); }

.about-card {
    background: linear-gradient(135deg, #17b97e 0%, #0f7a53 100%);
    border-radius: 16px;
    padding: clamp(2rem, 4vw, 4rem);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: ''; 
    position: absolute; 
    top: -50px; 
    left: -50px; 
    width: 200px; 
    height: 200px;
    background: rgba(255,255,255,0.05); 
    border-radius: 50%;
}

.about-card h3 {
    font-size: clamp(1.5rem, 2.4vw, 2.5rem);
    font-weight: 800;
}

.about-card p {
    font-size: clamp(1rem, 1.4vw, 1.4rem);
    line-height: 1.9;
    opacity: 0.9;
}

/* ── How It Works ── */
.how-section { background: #1a1f2e; padding: clamp(2.5rem, 5vw, 6rem) 0 clamp(3rem, 6vw, 7rem); }

.step-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(23,185,126,0.15);
    border-radius: 16px;
    padding: clamp(1.8rem, 3vw, 2.8rem) clamp(1.2rem, 2vw, 2rem);
    text-align: center;
    transition: all 0.3s;
    height: 100%;
}

.step-card:hover { 
    border-color: #17b97e; 
    background: rgba(23,185,126,0.06); 
    transform: translateY(-5px); 
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(50px, 4vw, 64px);
    height: clamp(50px, 4vw, 64px);
    background: #17b97e;
    color: #fff;
    border-radius: 50%;
    font-size: clamp(1.3rem, 1.8vw, 1.7rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.step-icon {
    font-size: clamp(2.2rem, 3vw, 3.4rem);
    color: #17b97e;
    margin-bottom: 0.5rem;
}

.step-card h5 {
    font-weight: 700;
    font-size: clamp(1.1rem, 1.5vw, 1.5rem);
    margin-bottom: 0.5rem;
}

.step-card p {
    color: rgba(255,255,255,0.6);
    font-size: clamp(0.9rem, 1.1vw, 1.15rem);
}

/* ── Projects Section ── */
.projects-section {
    background: #1e2333;
    padding: clamp(3rem, 6vw, 7rem) 0;
}

.project-card {
    background: #1a1f2e;
    border: 1px solid rgba(23,185,126,0.12);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
}

.project-card:hover { 
    border-color: rgba(23,185,126,0.4); 
    transform: translateY(-4px); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.3); 
}

.project-card .card-body { 
    padding: 1.5rem; 
}

.project-card .card-footer { 
    padding: 1rem 1.5rem; 
    background: rgba(0,0,0,0.15); 
    border-top: 1px solid rgba(23,185,126,0.1); 
}

.project-card h5 {
    color: #ffffff;
}

.project-card .project-desc {
    color: rgba(255,255,255,0.5);
}

.project-card .project-date {
    color: rgba(255,255,255,0.35);
}

/* ── Contact Section ── */
.contact-section { background: #1a1f2e; padding: 4rem 0; }

.contact-card {
    background: rgba(255,255,255,0.02);
    border: 1.5px solid rgba(23,185,126,0.3);
    border-radius: 16px;
    padding: 3rem;
    max-width: 750px;
    margin: 0 auto;
}

.contact-card .form-control {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    border-radius: 0;
    color: #fff;
    padding: 0.8rem 0;
    font-size: 1rem;
}

.contact-card .form-control::placeholder { 
    color: rgba(255,255,255,0.4); 
}

.contact-card .form-control:focus { 
    box-shadow: none; 
    border-bottom-color: #17b97e; 
    background: transparent; 
    color: #fff; 
}

.contact-card textarea.form-control { 
    min-height: 80px; 
    resize: vertical; 
}

.btn-send { 
    background: linear-gradient(135deg, #17b97e, #14a76c); 
    border: none; 
    border-radius: 12px; 
    padding: 0.9rem; 
    font-size: 1.1rem; 
    font-weight: 700; 
    width: 100%; 
    color: #fff; 
    transition: all 0.3s; 
}

.btn-send:hover { 
    background: linear-gradient(135deg, #14a76c, #0f7a53); 
    transform: translateY(-2px); 
    box-shadow: 0 10px 30px rgba(23,185,126,0.3); 
    color: #fff; 
}

/* ── Footer ── */
.riyada-footer { 
    background: #151927; 
    padding: 1.5rem 0; 
    border-top: 1px solid rgba(23,185,126,0.1); 
}

.footer-copyright {
    color: rgba(255,255,255,0.5);
}

.social-icon { 
    width: 38px; 
    height: 38px; 
    border-radius: 50%; 
    background: rgba(23,185,126,0.15); 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    color: #17b97e; 
    transition: all 0.3s; 
    margin: 0 0.3rem; 
}

.social-icon:hover { 
    background: #17b97e; 
    color: #fff; 
}

/* ── Dropdown ── */
.dropdown-menu { 
    background: #242a3d; 
    border: 1px solid rgba(23,185,126,0.2); 
    border-radius: 12px; 
}

.dropdown-item { 
    color: rgba(255,255,255,0.8); 
    padding: 0.6rem 1.2rem; 
}

.dropdown-item:hover { 
    background: rgba(23,185,126,0.1); 
    color: #17b97e; 
}

/* ══════════════════════════════════════════════════════════════════
   LIGHT THEME
   ══════════════════════════════════════════════════════════════════ */

[data-theme="light"] body { 
    background-color: #f0f2f5; 
    color: #1a1f2e; 
}

[data-theme="light"] .riyada-nav { 
    background: #ffffff; 
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); 
}

[data-theme="light"] .riyada-nav.scrolled {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .riyada-nav .nav-link { 
    color: rgba(0,0,0,0.6); 
}

[data-theme="light"] .riyada-nav .nav-link:hover, 
[data-theme="light"] .riyada-nav .nav-link.active { 
    color: #17b97e; 
}

[data-theme="light"] .riyada-nav .brand-text { 
    color: #1a1f2e; 
}

[data-theme="light"] .hero-riyada { 
    background: #f0f2f5; 
}

[data-theme="light"] .hero-title { 
    color: #17b97e; 
}

[data-theme="light"] .hero-subtitle { 
    color: #1a1f2e; 
}

[data-theme="light"] .hero-riyada::before, 
[data-theme="light"] .hero-riyada::after { 
    border-color: rgba(23,185,126,0.15); 
}

[data-theme="light"] .geo-diamond { 
    border-color: rgba(23,185,126,0.08); 
}

[data-theme="light"] .stats-section { 
    background: #f0f2f5; 
}

[data-theme="light"] .stats-title { 
    color: #1a1f2e; 
}

[data-theme="light"] .stat-box { 
    background: #fff; 
    border-color: rgba(23,185,126,0.25); 
}

[data-theme="light"] .stat-box:hover { 
    background: rgba(23,185,126,0.04); 
}

[data-theme="light"] .stat-box .stat-num { 
    color: #1a1f2e; 
}

[data-theme="light"] .stat-box .stat-label { 
    color: rgba(0,0,0,0.55); 
}

[data-theme="light"] .stat-box-total { 
    background: rgba(23,185,126,0.03); 
}

[data-theme="light"] .stat-box-total .stat-num { 
    color: #1a1f2e; 
}

[data-theme="light"] .about-section { 
    background: #f0f2f5; 
}

[data-theme="light"] .how-section { 
    background: #f0f2f5; 
}

[data-theme="light"] .step-card { 
    background: #fff; 
    border-color: rgba(23,185,126,0.1); 
}

[data-theme="light"] .step-card:hover { 
    background: rgba(23,185,126,0.03); 
}

[data-theme="light"] .step-card h5 { 
    color: #1a1f2e; 
}

[data-theme="light"] .step-card p { 
    color: rgba(0,0,0,0.5); 
}

[data-theme="light"] .projects-section { 
    background: #e8eaed; 
}

[data-theme="light"] .project-card { 
    background: #ffffff; 
    border-color: rgba(0,0,0,0.06); 
}

[data-theme="light"] .project-card:hover { 
    border-color: rgba(23,185,126,0.3); 
    box-shadow: 0 12px 35px rgba(0,0,0,0.08); 
}

[data-theme="light"] .project-card h5, 
[data-theme="light"] .project-card h6 { 
    color: #1a1f2e; 
}

[data-theme="light"] .project-card .project-desc {
    color: rgba(0,0,0,0.5);
}

[data-theme="light"] .project-card .project-date {
    color: rgba(0,0,0,0.4);
}

[data-theme="light"] .project-card .card-footer { 
    background: rgba(0,0,0,0.02); 
    border-top-color: rgba(0,0,0,0.06); 
}

[data-theme="light"] .contact-section { 
    background: #f0f2f5; 
}

[data-theme="light"] .contact-card { 
    background: #ffffff; 
    border-color: rgba(23,185,126,0.2); 
    box-shadow: 0 8px 30px rgba(0,0,0,0.06); 
}

[data-theme="light"] .contact-card h3 { 
    color: #1a1f2e; 
}

[data-theme="light"] .contact-card .form-control { 
    color: #1a1f2e; 
    border-bottom-color: rgba(0,0,0,0.15); 
}

[data-theme="light"] .contact-card .form-control::placeholder { 
    color: rgba(0,0,0,0.35); 
}

[data-theme="light"] .contact-card .form-control:focus { 
    color: #1a1f2e; 
    border-bottom-color: #17b97e; 
}

[data-theme="light"] .riyada-footer { 
    background: #ffffff; 
    box-shadow: 0 -1px 8px rgba(0,0,0,0.04); 
}

[data-theme="light"] .riyada-footer span,
[data-theme="light"] .footer-copyright {
    color: #1a1f2e !important;
}

[data-theme="light"] .social-icon { 
    background: rgba(23,185,126,0.08); 
}

[data-theme="light"] .dropdown-menu { 
    background: #fff; 
    box-shadow: 0 8px 30px rgba(0,0,0,0.12); 
}

[data-theme="light"] .dropdown-item { 
    color: rgba(0,0,0,0.7); 
}

[data-theme="light"] .dropdown-item:hover { 
    background: rgba(23,185,126,0.06); 
    color: #17b97e; 
}

[data-theme="light"] .float-icon { 
    color: rgba(0,0,0,0.04); 
}

[data-theme="light"] .chevrons { 
    color: rgba(0,0,0,0.1); 
}

[data-theme="light"] #homeThemeIcon {
    color: #f39c12;
}

[data-theme="light"] .btn-link.text-white {
    color: #1a1f2e !important;
}

[data-theme="light"] .mobile-menu-btn {
    color: #1a1f2e !important;
}

/* ══════════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════════ */

@keyframes fadeUp { 
    from { opacity:0; transform:translateY(30px); } 
    to { opacity:1; transform:translateY(0); } 
}

.fade-up { 
    animation: fadeUp 0.7s ease-out forwards; 
}

.fade-up-d1 { 
    animation-delay: 0.15s; 
    opacity: 0; 
}

.fade-up-d2 { 
    animation-delay: 0.3s; 
    opacity: 0; 
}

/* ── Scroll Animations ── */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(80px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-80px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.scroll-animate {
    opacity: 0;
    transition: none;
}

.scroll-animate.animated-right {
    animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animate.animated-left {
    animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animate.animated-fade {
    animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

/* Font sizes scale fluidly via clamp(); only layout-specific tweaks remain */
@media (max-width: 768px) {
    .hero-riyada {
        min-height: 65vh;
    }
}

/* ── Large screens: widen the content container so it scales with the
   viewport instead of staying locked in a narrow 1320px column ── */
@media (min-width: 1600px) {
    .container {
        max-width: 1480px;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1660px;
    }
}