/*!
 * Start Bootstrap - Clean Blog (adapted for ASP.NET Core - RTL Arabic)
 * Based on: https://startbootstrap.com/theme/clean-blog
 * License: MIT
 */

/* =========================================
   TYPOGRAPHY - Google Fonts Import
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Changa:wght@400;500;600;700;800&family=Almarai:wght@300;400;700;800&display=swap');

/* =========================================
   VARIABLES / COLORS
   ========================================= */
:root {
    --cb-primary:     #0085A1;
    --cb-white:       #fff;
    --cb-gray-100:    #f8f9fa;
    --cb-gray-200:    #e9ecef;
    --cb-gray-300:    #dee2e6;
    --cb-gray-600:    #6c757d;
    --cb-gray-800:    #343a40;
    --cb-gray-900:    #212529;
    --cb-font-base:   'Almarai', serif;
    --cb-font-head:   'Changa', sans-serif;
}

/* =========================================
   GLOBAL STYLES
   ========================================= */
body {
    font-size: 20px;
    color: var(--cb-gray-900);
    font-family: var(--cb-font-base);
}

p {
    line-height: 1.5;
    margin: 30px 0;
}

p a {
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    font-family: var(--cb-font-head);
}

a {
    color: var(--cb-gray-900);
    transition: color 0.2s;
}

a:focus,
a:hover {
    color: var(--cb-primary);
}

blockquote {
    font-style: italic;
    color: var(--cb-gray-600);
}

.section-heading {
    font-size: 36px;
    font-weight: 700;
    margin-top: 60px;
}

.caption {
    font-size: 14px;
    font-style: italic;
    display: block;
    margin: 0;
    padding: 10px;
    text-align: center;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
}

::selection {
    color: var(--cb-white);
    background: var(--cb-primary);
    text-shadow: none;
}

img::selection {
    color: var(--cb-white);
    background: transparent;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    font-size: 14px;
    font-weight: 800;
    padding: 15px 25px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 0;
    font-family: var(--cb-font-head);
    transition: all 0.2s;
}

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

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    color: var(--cb-white);
    background-color: #006a81 !important;
    border-color: #006a81 !important;
}

.btn-lg {
    font-size: 16px;
    padding: 25px 35px;
}

/* =========================================
   NAVBAR - #mainNav
   ========================================= */
#mainNav {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    background-color: white;
    font-family: var(--cb-font-head);
    transition: background-color 0.2s;
}

#mainNav .navbar-brand {
    font-weight: 800;
    color: var(--cb-gray-800);
    font-family: var(--cb-font-head);
}

#mainNav .navbar-toggler {
    font-size: 12px;
    font-weight: 800;
    padding: 13px;
    text-transform: uppercase;
    color: var(--cb-gray-800);
}

#mainNav .navbar-nav > li.nav-item > a {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@media (min-width: 992px) {
    #mainNav {
        border-bottom: 1px solid transparent;
        background: transparent;
    }

    #mainNav .navbar-brand {
        padding: 10px 20px;
        color: var(--cb-white);
    }

    #mainNav .navbar-brand:focus,
    #mainNav .navbar-brand:hover {
        color: rgba(255, 255, 255, 0.8);
    }

    #mainNav .navbar-nav > li.nav-item > a {
        padding: 10px 20px;
        color: var(--cb-white);
    }

    #mainNav .navbar-nav > li.nav-item > a:focus,
    #mainNav .navbar-nav > li.nav-item > a:hover {
        color: rgba(255, 255, 255, 0.8);
    }

    /* Transition effect */
    #mainNav {
        -webkit-transition: background-color 0.2s;
        -moz-transition: background-color 0.2s;
        transition: background-color 0.2s;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    /* Fixed (scrolling down) */
    #mainNav.is-fixed {
        position: fixed;
        top: -72px;
        -webkit-transition: -webkit-transform 0.2s;
        transition: transform 0.2s;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        background-color: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(8px);
    }

    #mainNav.is-fixed .navbar-brand {
        color: var(--cb-gray-900);
    }

    #mainNav.is-fixed .navbar-brand:focus,
    #mainNav.is-fixed .navbar-brand:hover {
        color: var(--cb-primary);
    }

    #mainNav.is-fixed .navbar-nav > li.nav-item > a {
        color: var(--cb-gray-900);
    }

    #mainNav.is-fixed .navbar-nav > li.nav-item > a:focus,
    #mainNav.is-fixed .navbar-nav > li.nav-item > a:hover {
        color: var(--cb-primary);
    }

    /* Visible (scrolling up) */
    #mainNav.is-visible {
        -webkit-transform: translate3d(0, 100%, 0);
        transform: translate3d(0, 100%, 0);
    }
}

/* =========================================
   MASTHEAD - Hero Header
   ========================================= */
header.masthead {
    margin-bottom: 50px;
    background: no-repeat center center;
    background-color: var(--cb-gray-600);
    background-attachment: scroll;
    position: relative;
    background-size: cover;
}

header.masthead .overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--cb-gray-900);
    opacity: 0.5;
}

header.masthead .page-heading,
header.masthead .post-heading,
header.masthead .site-heading {
    padding: 200px 0 150px;
    color: white;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    header.masthead .page-heading,
    header.masthead .post-heading,
    header.masthead .site-heading {
        padding: 200px 0;
    }
}

header.masthead .page-heading,
header.masthead .site-heading {
    text-align: center;
}

header.masthead .page-heading h1,
header.masthead .site-heading h1 {
    font-size: 50px;
    margin-top: 0;
}

header.masthead .page-heading .subheading,
header.masthead .site-heading .subheading {
    font-size: 24px;
    font-weight: 300;
    line-height: 1.1;
    display: block;
    margin: 10px 0 0;
    font-family: var(--cb-font-head);
}

@media (min-width: 768px) {
    header.masthead .page-heading h1,
    header.masthead .site-heading h1 {
        font-size: 80px;
    }
}

header.masthead .post-heading h1 {
    font-size: 35px;
}

header.masthead .post-heading .meta,
header.masthead .post-heading .subheading {
    line-height: 1.1;
    display: block;
}

header.masthead .post-heading .subheading {
    font-size: 24px;
    font-weight: 600;
    margin: 10px 0 30px;
    font-family: var(--cb-font-head);
}

header.masthead .post-heading .meta {
    font-size: 20px;
    font-weight: 300;
    font-style: italic;
    font-family: var(--cb-font-base);
}

header.masthead .post-heading .meta a {
    color: white;
}

@media (min-width: 768px) {
    header.masthead .post-heading h1 {
        font-size: 55px;
    }

    header.masthead .post-heading .subheading {
        font-size: 30px;
    }
}

/* =========================================
   POST STYLES
   ========================================= */
.post-preview > a {
    color: var(--cb-gray-900);
    text-decoration: none;
}

.post-preview > a:focus,
.post-preview > a:hover {
    color: var(--cb-primary);
    text-decoration: none;
}

.post-preview > a > .post-title {
    font-size: 30px;
    margin-top: 30px;
    margin-bottom: 10px;
}

.post-preview > a > .post-subtitle {
    font-weight: 300;
    margin: 0;
    margin-bottom: 10px;
}

.post-preview > .post-meta {
    color: var(--cb-gray-600);
    font-size: 18px;
    font-style: italic;
    margin-top: 0;
}

.post-preview > .post-meta > a {
    text-decoration: none;
    color: var(--cb-gray-900);
}

.post-preview > .post-meta > a:focus,
.post-preview > .post-meta > a:hover {
    color: var(--cb-primary);
    text-decoration: underline;
}

@media (min-width: 768px) {
    .post-preview > a > .post-title {
        font-size: 36px;
    }
}

/* =========================================
   FOOTER
   ========================================= */
footer.site-footer {
    padding: 50px 0 65px;
    background-color: var(--cb-gray-900);
    color: var(--cb-white);
}

footer.site-footer .list-inline {
    margin: 0;
    padding: 0;
}

footer.site-footer .copyright {
    font-size: 14px;
    margin-bottom: 0;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

footer.site-footer a {
    color: var(--cb-white);
}

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

/* =========================================
   CONTACT FORM - Floating Labels
   ========================================= */
.floating-label-form-group {
    font-size: 14px;
    position: relative;
    margin-bottom: 0;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--cb-gray-300);
}

.floating-label-form-group input,
.floating-label-form-group textarea {
    font-size: 1.5em;
    position: relative;
    z-index: 1;
    padding: 0;
    resize: none;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none !important;
}

.floating-label-form-group input::-webkit-input-placeholder,
.floating-label-form-group textarea::-webkit-input-placeholder {
    color: var(--cb-gray-600);
}

.floating-label-form-group label {
    font-size: 0.85em;
    line-height: 1.764705882em;
    position: relative;
    z-index: 0;
    top: 2em;
    display: block;
    margin: 0;
    -webkit-transition: top 0.3s ease, opacity 0.3s ease;
    transition: top 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.floating-label-form-group .help-block {
    margin: 15px 0;
}

.floating-label-form-group-with-value label {
    top: 0;
    opacity: 1;
}

.floating-label-form-group-with-focus label {
    color: var(--cb-primary);
}

form .form-group:first-child .floating-label-form-group {
    border-top: 1px solid var(--cb-gray-300);
}

/* =========================================
   SECTION DIVIDERS
   ========================================= */
hr.small {
    max-width: 100px;
    margin: 15px auto;
    border-width: 4px;
    border-color: inherit;
    border-radius: 3px;
}

/* =========================================
   RTL ADAPTATIONS (Arabic)
   ========================================= */
[dir="rtl"] #mainNav .navbar-nav {
    margin-right: auto;
    margin-left: 0;
}

[dir="rtl"] header.masthead .page-heading,
[dir="rtl"] header.masthead .site-heading {
    text-align: center;
}

[dir="rtl"] .post-preview > a > .post-title {
    text-align: right;
}

[dir="rtl"] .post-preview > .post-meta {
    text-align: right;
}

[dir="rtl"] footer.site-footer {
    text-align: center;
}

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

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

.cb-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}
