/* wwwroot/css/brand.css */

/* ===========
   Brand Tokens
   =========== */
:root{
    /* Font (replace with your chosen Arabic font) */
    --ebram-font-body: "GE SS Two", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --ebram-font-heading: "GE SS Two", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

    --ebram-font-ar: var(--ebram-font-body);
    --ebram-font-en: var(--ebram-font-body);


    /* Brand colors (replace these) */
    --ebram-primary: #535274;
    --ebram-primary-rgb: 83, 82, 116;
    
    --ebram-primary-dark: #3d3c57;
    --ebram-primary-dark-rgb: 61, 60, 87;

    --ebram-secondary: #7f7fad;
    --ebram-secondary-rgb: 127, 127, 173;
    --ebram-secondary-light: #EBEBF3;

    --ebram-tint: #cfaf7a;
    --ebram-tint-rgb: 207, 175, 122;
    
    --ebram-tint-brite: #e5d2b1;
    --ebram-tint-brite-rgb: 229, 210, 177;
    
    
    /* Gradient */
    --ebram-gradient-secondary: linear-gradient(180deg, var(--ebram-secondary), var(--ebram-primary));
    --ebram-gradient-tint: linear-gradient(180deg, var(--ebram-tint-brite), var(--ebram-tint));

    --ebram-tint-brite-gloss: linear-gradient(135deg, #f5ead8 0%, #e5d2b1 40%, #c9a96e 100%);
    
    /* Card background gradients (light, inspired by primary) */
    --primary-gradient: linear-gradient(145deg, rgba(var(--ebram-primary-rgb), 0.02), rgba(var(--ebram-primary-rgb), 0.06)), #ffffff;
    --primary-gradient-hover: linear-gradient(145deg, rgba(var(--ebram-primary-rgb), 0.04), rgba(var(--ebram-primary-rgb), 0.10)), #ffffff;
    
    /* Card background gradients (dark, using primary-dark) */
    /*--primary-dark-gradient: linear-gradient(145deg, rgba(var(--ebram-primary-rgb), 0.4), rgba(var(--ebram-primary-rgb), 0.9)), #ffffff;
    --primary-dark-gradient-hover: linear-gradient(145deg, rgba(var(--ebram-primary-rgb), 0.04), rgba(var(--ebram-primary-rgb), 0.10)), #ffffff;*/
    --primary-dark-gradient: linear-gradient(145deg, var(--ebram-primary), var(--ebram-primary-dark));
    --primary-dark-gradient-hover: linear-gradient(145deg, var(--ebram-primary-dark), color-mix(in srgb, var(--ebram-primary-dark) 90%, #000));

    /* Neutrals */
    --ebram-body-bg: #ffffff;
    --ebram-body-color: var(--ebram-primary);

    /* Surfaces */
    --ebram-surface: #ffffff;
    --ebram-surface-2: #f8fafc;

    /* Radius & shadows */
    --ebram-radius: 1rem;
    --ebram-radius-sm: .75rem;
    --ebram-shadow: 0 10px 25px rgba(0,0,0,.08);
    --ebram-shadow-sm: 0 6px 16px rgba(0,0,0,.08);

    /* Section spacing */
    --ebram-section-py: 4.5rem;
    
    /* Height */
    --ebram-header-height: 4.375rem; /* 70px */
}

/* =========================
   Bootstrap variable overrides
   ========================= */
:root{
    /* Typography */
    --bs-body-font-family: var(--ebram-font-en);
    --bs-body-bg: var(--ebram-body-bg);
    --bs-body-color: var(--ebram-body-color);
    --bs-heading-color: var(--ebram-body-color);

    /* Primary + links */
    --bs-primary: var(--ebram-primary);
    --bs-primary-rgb: var(--ebram-primary-rgb);
    --bs-link-color: var(--ebram-tint);
    --bs-link-hover-color: color-mix(in srgb, var(--ebram-tint) 85%, #000);

    /* Secondary */
    --bs-secondary: var(--ebram-secondary);
    --bs-secondary-rgb: var(--ebram-secondary-rgb);
    --bs-secondary-color: rgba(var(--ebram-primary-rgb), 0.85);

    /* UI */
    --bs-border-radius: var(--ebram-radius);
    --bs-border-radius-sm: var(--ebram-radius-sm);

    /* Buttons */
    --bs-btn-border-radius: var(--ebram-radius);
    --bs-btn-border-radius-sm: var(--ebram-radius-sm);

    /* Cards */
    --bs-card-border-radius: var(--ebram-radius);
    --bs-card-cap-bg: transparent;
}

/* ===========
   Global polish
   =========== */
body{
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    color: var(--ebram-primary);
}

/* Text utility for primary color */
.text-ebram-primary {
    color: var(--ebram-primary) !important;
}

.text-ebram-secondary {
    color: var(--ebram-secondary) !important;
}

.text-ebram-tint {
    color: var(--ebram-tint) !important;
}

/*h1,h2,h3{
    letter-spacing: -0.02em;
}*/

/* Consistent section spacing */
/*.section{
    padding-block: var(--ebram-section-py);
}
.section--alt{
    background: var(--ebram-surface-2);
}*/

/* Subtle modern feel */
/*.card{
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: none;
}
.card.card--lift{
    box-shadow: var(--ebram-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.card.card--lift:hover{
    transform: translateY(-2px);
    box-shadow: var(--ebram-shadow);
}*/

/* Buttons: clean hover */
.btn{
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}
.btn:hover{
    transform: translateY(-1px);
    cursor: pointer;
}

.btn-primary {
    background: var(--ebram-gradient-tint);
    border: none;
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: var(--ebram-gradient-tint);
    border: none;
    color: #fff;
    box-shadow: 0 10px 22px rgba(var(--ebram-tint-rgb), .22);
}

/* Navbar polish */
.navbar{
    /*border-bottom: 1px solid rgba(0,0,0,.06);*/
}

/* Header modern glass effect */
.site-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 1030;
    transition: background-color 0.3s ease;
}

/* Floating header style */
.site-header--floating {
    margin: 0.5rem;
    border-radius: 100vh;
    border-bottom: none;
}

/* Light header (for dark page content like hero with dark image) */
.site-header--light {
    background: rgba(255, 255, 255, 0.85);
}

.site-header--light .nav-link,
.site-header--light .navbar-toggler-icon {
    color: var(--ebram-primary);
}

/* Dark header (for light page content) */
.site-header--dark {
    background: var(--ebram-primary);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.site-header--dark .nav-link,
.site-header--dark .btn-link {
    color: #ffffff;
}

.site-header--dark .navbar-toggler-icon {
    filter: invert(1);
}

/* Footer */
footer {
    background: linear-gradient(180deg, var(--ebram-primary), var(--ebram-primary-dark));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card styling */
.card--primary-gradient {
    background: var(--primary-gradient);
}

.card--primary-dark-gradient {
    background: var(--primary-dark-gradient);
}

/* Card watermark pattern layer */
.card-watermark {
    position: relative;
}

.card-watermark::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: url('/img/logo/pattern.svg');
    background-size: auto 100%;
    background-repeat: repeat-x;
    background-position: top left;
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 70%);
    mask-image: linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 70%);
}

/* Pattern fading from bottom to top */
.card-watermark--bottom-up {
    position: relative;
    overflow: hidden;
}

.card-watermark--bottom-up::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: url('/img/logo/pattern.svg');
    background-size: auto 40%;
    background-repeat: repeat-x;
    background-position: bottom center;
    opacity: 0.15;
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 50%);
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 50%);
}

/* Optional: a "pill" badge style */
.badge--soft{
    background: color-mix(in srgb, var(--ebram-primary) 12%, #fff);
    color: var(--ebram-primary);
    border: 1px solid color-mix(in srgb, var(--ebram-primary) 18%, #fff);
    border-radius: 999px;
    padding: .45rem .65rem;
    font-weight: 600;
}

/* Language-aware font selection
   - When the document <html> has lang="ar" use the Arabic font stack
   - When the document <html> has lang="en" use the English font stack
   This relies on the server-rendered <html lang="..."> and doesn't require JS. */
html[lang="ar"] {
    --bs-body-font-family: var(--ebram-font-ar);
}

html[lang="en"] {
    --bs-body-font-family: var(--ebram-font-en);
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--ebram-font-heading), sans-serif;
}

/* ======
   Fonts
   ====== */
@font-face {
    font-family: "GE SS Two";
    src: url("../fonts/GE_SS_Two_Light.otf") format("opentype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "GE SS Two";
    src: url("../fonts/GE_SS_Two_Light_Italic.otf") format("opentype");
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "GE SS Two";
    src: url("../fonts/GE_SS_Two_Medium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "GE SS Two";
    src: url("../fonts/GE_SS_Two_Medium_Italic.otf") format("opentype");
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "GE SS Two";
    src: url("../fonts/GE_SS_Two_Bold_New.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Hasan Alquds Unicode";
    src: url("../fonts/HasanAlqudsUnicode-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ====================
   Section Elements
   ==================== */
.section-label {
    font-size: 20px;
    color: var(--ebram-tint);
}

/* ====================
   Section Pattern Background
   ==================== */
.section-pattern-bg {
    position: relative;
    overflow: hidden;
}

.section-pattern-bg::before,
.section-pattern-bg::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 33.33%;
    pointer-events: none;
    background-image: url('/img/logo/pattern.svg');
    background-size: 400px 253px;
    background-repeat: repeat;
    opacity: 0.15;
    z-index: 0;
}

.section-pattern-bg > * {
    position: relative;
    z-index: 1;
}

/* Left edge pattern */
.section-pattern-bg::before {
    left: 0;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

/* Right edge pattern */
.section-pattern-bg::after {
    right: 0;
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

/* Tint-colored pattern variation */
.section-pattern-bg--tint::before,
.section-pattern-bg--tint::after {
    filter: sepia(1) saturate(2) hue-rotate(10deg);
}

/* Left side only pattern */
.section-pattern-bg--left::after {
    display: none;
}

/* Right side only pattern */
.section-pattern-bg--right::before {
    display: none;
}

/* Light section background */
.section-bg--light {
    background-color: var(--ebram-secondary-light);
}

/* Primary section background */
.section-bg--primary {
    background: linear-gradient(180deg, var(--ebram-primary), var(--ebram-primary-dark));
    color: #ffffff;
}

/* Gold shiny card border */
.card-gold-border {
    border-width: 2px;
    border-style: solid;
    border-image-source: linear-gradient(135deg, #d4b87a 0%, #e5d2b1 30%, #f5ead8 50%, #e5d2b1 70%, #d4b87a 100%);
    border-image-slice: 1;
}

/* Gold border wrapper - wrap the card in this container */
.card-gold-border-wrapper {
    padding: 3px;
    border-radius: var(--ebram-radius);
    background: linear-gradient(135deg, #d4b87a 0%, #e5d2b1 30%, #f5ead8 50%, #e5d2b1 70%, #d4b87a 100%);
}

.card-gold-border-wrapper > .card {
    border: none;
    border-radius: calc(var(--ebram-radius) - 2px);
}

/* Rounded gold border using pseudo-element (for rounded corners) */
.card-gold-border-rounded {
    position: relative;
    border: none;
    border-radius: var(--ebram-radius);
    background: linear-gradient(145deg, rgba(var(--ebram-primary-rgb), 0.02), rgba(var(--ebram-primary-rgb), 0.06)), #ffffff;
}

.card-gold-border-rounded::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #d4b87a 0%, #e5d2b1 30%, #f5ead8 50%, #e5d2b1 70%, #d4b87a 100%);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
