/* ============================================
   AFAQ AL-MUTTAHIDA - Custom Styles
   ============================================ */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --dark-color: #1f2937;
    --muted-color: #6b7280;
    --light-color: #f8f9fa;
    --text-color: #1f2937;
    --border-color: #e5e7eb;

    /* Type system. System fonts render instantly; web fonts swap in when
       loaded (font-display: swap), so the page is never blank waiting. */
    --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-arabic: "IBM Plex Sans Arabic", "Plus Jakarta Sans",
        "Segoe UI", Tahoma, sans-serif;
}

/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html, body {
    font-family: var(--font-sans);
    font-size: 17px;          /* up from 16px default for easier reading */
    line-height: 1.65;
    color: var(--text-color);
    font-feature-settings: "ss01", "cv11", "kern";
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ============================================
   Typography scale
   - Modern responsive sizes via clamp()
   - Tight letter-spacing on big headings, looser on UI labels
   - Section headings get a bit more breathing room
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: inherit;
}

h1 { font-size: clamp(1.625rem, 2.6vw, 2rem); }
h2 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.display-4 { font-size: clamp(1.875rem, 3.5vw, 2.5rem); }
.display-5 { font-size: clamp(1.625rem, 2.8vw, 2.125rem); }
.display-6 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }

.lead {
    font-size: 1.125rem;
    line-height: 1.7;
    font-weight: 400;
    color: var(--muted-color);
}

.colorup {
    color: rgba(255, 255, 255, 0.9);
}

p {
    margin-bottom: 1rem;
}

/* Small-caps style helpers used as section eyebrows / overlines */
.eyebrow,
.text-uppercase.small {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Tighten the navbar brand a touch */
.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Buttons get the same modern font */
.btn {
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: 0.005em;
}

/* Cards: bolder titles, calmer body */
.card-title {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card-text {
    color: var(--muted-color);
}

/* ============================================
   Founder avatar (photo or initials fallback)
   ============================================ */
.founder-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    margin-inline: auto;
    box-shadow:
        0 24px 60px rgba(102, 126, 234, 0.30),
        0 0 0 8px rgba(102, 126, 234, 0.08);
}

.founder-avatar--photo {
    object-fit: cover;
}

.founder-avatar--initials {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Soft highlight in the upper-left for depth */
.founder-avatar--initials::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 25%,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
}

/* Subtle ring around the avatar */
.founder-avatar--initials::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.founder-initials {
    position: relative;
    z-index: 1;
    font-family: var(--font-sans);
    font-size: 5.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.04em;
    line-height: 1;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

@media (max-width: 575px) {
    .founder-avatar {
        width: 200px;
        height: 200px;
    }
    .founder-initials {
        font-size: 4rem;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    display: flex;
    align-items: center;
    padding: 96px 0 72px;
    background:
        radial-gradient(ellipse at top right, rgba(255, 255, 255, 0.18), transparent 55%),
        radial-gradient(ellipse at bottom left, rgba(0, 0, 0, 0.25), transparent 60%),
        linear-gradient(135deg, #4f5fd1 0%, #6a3aa6 60%, #3b2466 100%);
    color: #ffffff;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 120px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' fill-opacity='1' d='M0,64L60,69.3C120,75,240,85,360,90.7C480,96,600,96,720,85.3C840,75,960,53,1080,53.3C1200,53,1320,75,1380,85.3L1440,96L1440,120L1380,120C1320,120,1200,120,1080,120C960,120,840,120,720,120C600,120,480,120,360,120C240,120,120,120,60,120L0,120Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom / cover;
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
}

.hero-blob--one {
    width: 380px;
    height: 380px;
    background: #8b5cf6;
    top: -80px;
    left: -100px;
}

.hero-blob--two {
    width: 460px;
    height: 460px;
    background: #4338ca;
    bottom: -160px;
    right: -120px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #ffffff;
    backdrop-filter: blur(8px);
}

.hero-title {
    font-size: clamp(1.875rem, 3.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-lead {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
    max-width: 580px;
}


.hero-section .btn-light {
    color: #4f5fd1;
    background: #ffffff;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.hero-section .btn-light:hover {
    background: #ffffff;
    color: #3b2466;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.hero-section .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.hero-section .btn-outline-light:hover {
    background: #ffffff;
    color: #4f5fd1;
}

.hero-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    aspect-ratio: 1 / 1;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.hero-logo {
    width: 100%;
    height: auto;
    max-width: 320px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.3));
}

.hero-logo-fallback {
    font-size: 180px;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 991px) {
    .hero-section {
        min-height: auto;
        padding: 72px 0 64px;
        text-align: center;
    }

    .hero-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-logo-wrap {
        margin-top: 32px;
        max-width: 320px;
    }

    .hero-section .d-flex {
        justify-content: center;
    }
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    color: white !important;
}

.navbar-brand i {
    margin-right: 8px;
}

.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

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

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

/* Cards */
.card {
    transition: all 0.3s ease;
    border-radius: 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.service-card {
    border-radius: 15px;
}

.service-card i {
    transition: all 0.3s ease;
}

.service-card:hover i {
    transform: scale(1.2) rotate(10deg);
}

.portfolio-card {
    overflow: hidden;
    border-radius: 15px;
}

.portfolio-card img {
    transition: transform 0.3s ease;
}

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

.team-card {
    border-radius: 15px;
    overflow: hidden;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-light:hover {
    background: white;
    transform: translateY(-2px);
}

/* Sections */
.page-header {
    position: relative;
    background: linear-gradient(135deg, var(--dark-color) 0%, #34495e 100%);
    padding: 96px 0 80px;
    overflow: hidden;
}

.page-header::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.page-header h1,
.page-header .display-4 {
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0;
}

.page-header p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    max-width: 640px;
    margin-top: 0.75rem;
}

/* Section heading with a small accent bar underneath. Apply automatically
   to centered section headings; they're the dominant pattern on this site. */
section .text-center > h2,
section .text-center > .display-5,
section .text-center > .display-6 {
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

section .text-center > h2::after,
section .text-center > .display-5::after,
section .text-center > .display-6::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 56px;
    height: 3px;
    border-radius: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Dark sections (hero, page-header, footer): make the accent visible on dark */
.text-white > h2::after,
.text-white > .display-5::after,
.text-white > .display-6::after,
.bg-dark .text-center > h2::after,
.bg-dark .text-center > .display-5::after {
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.4));
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.bg-light {
    background-color: var(--light-color) !important;
}

/* Services Section */
.services-section {
    padding: 80px 0;
}

.service-card {
    text-align: center;
}

.service-card .card-body {
    padding: 30px 20px;
}

/* Portfolio Section */
.portfolio-section {
    padding: 80px 0;
}

/* Team Section */
.team-section {
    padding: 80px 0;
}

.team-card .card-body {
    padding: 20px;
}

/* CTA Section */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #34495e 100%);
    margin-top: auto;
    color: #ecf0f1;
}

footer h5 {
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

footer p,
footer li {
    color: #cfd8dc;
}

footer a {
    color: #cfd8dc;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

footer .text-white-50,
footer .text-muted {
    color: #b0bec5 !important;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.15);
    opacity: 1;
}

footer .social-links .btn {
    margin-right: 6px;
    margin-bottom: 6px;
}

/* Contact Form */
.contact-form .form-control,
.contact-form .form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.contact-form .form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

/* Contact Info */
.contact-info {
    padding: 20px;
    background: var(--light-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-info:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Accordion */
.accordion-button {
    font-weight: 600;
    color: var(--dark-color);
}

.accordion-button:not(.collapsed) {
    background: var(--light-color);
    color: var(--primary-color);
}

.accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* Process Section */
.process-number {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Expertise Cards */
.expertise-card {
    transition: all 0.3s ease;
}

.expertise-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Badges */
.badge {
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.aos-animate {
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
    }

    .page-header {
        padding: 56px 0 48px;
    }

    .services-section,
    .portfolio-section,
    .team-section {
        padding: 40px 0;
    }

    .navbar-collapse {
        margin-top: 20px;
    }

    .nav-link {
        padding: 10px 0;
    }

    .contact-form {
        margin-bottom: 30px;
    }

    .contact-info {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .lead {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .hero-section {
        min-height: 300px;
    }

    .row.g-5 {
        gap: 1.5rem !important;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
