/* ============================================
   Concorde SA - Main Stylesheet
   SEO Optimized, Performance Focused
   ============================================ */

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

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --color-primary: #f58a07;
    --color-primary-dark: #d97706;
    --color-primary-light: rgba(245, 138, 7, 0.1);
    --color-secondary: #063255;
    --color-dark: #1d3444;
    --color-text: #394149;
    --color-text-light: #5b5b5b;
    --color-text-muted: rgba(57, 65, 73, 0.5);
    --color-white: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-bg-blue: #dceaf5;
    --color-bg-blue-faint: #edf7ff;
    --border-radius: 16px;
    --transition-base: all 0.3s ease;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

/* ============================================
   Base Styles
   ============================================ */
* {
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.25rem); }

p {
    margin-bottom: 1rem;
}

/* ============================================
   Brand & Logo
   ============================================ */
.brand-logo {
    max-width: 140px;
}

.brand-logo img {
    width: 100%;
    height: auto;
}

/* ============================================
   Background Classes
   ============================================ */
.dark-bg,
.dark-bg a {
    color: var(--color-white);
}

.light-bg h1,
.light-bg h2,
.light-bg h3,
.light-bg h4,
.light-bg h5,
.light-bg h6 {
    color: var(--color-dark);
}

.light-bg p,
.light-bg li {
    color: var(--color-text-light);
}

.light-bg span {
    color: var(--color-text-muted);
}

.light-bg {
    color: var(--color-text);
}

.light-bg a {
    color: var(--color-primary);
}

.bg-brand-primay {
    background: var(--color-primary) !important;
    color: var(--color-white) !important;
}

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

.bg-bluefaint {
    background-color: var(--color-bg-blue-faint) !important;
}

.bg-blue-200 {
    background: rgba(210, 218, 237, 0.17) !important;
}

.bg-bluelight {
    background-color: var(--color-bg-blue);
}

.bg-blueDark {
    background: var(--color-secondary);
}

/* ============================================
   Buttons & Links
   ============================================ */
a {
    text-decoration: none !important;
    transition: var(--transition-base);
}

a.bg-brand-primayfaint:hover {
    color: var(--color-white) !important;
    background-color: var(--color-primary) !important;
}

button.bg-brand-primay:hover,
a.bg-brand-primay:hover {
    background: var(--color-primary-dark) !important;
}

a.cl-blue-900:hover {
    color: #325771 !important;
}

.btn {
    transition: var(--transition-base);
}

.btn-warning {
    --bs-btn-bg: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-bg: var(--color-primary-dark);
    --bs-btn-hover-border-color: var(--color-primary-dark);
}

button.bg-white {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* ============================================
   Utility Classes
   ============================================ */
.fw-smbold {
    font-weight: 600 !important;
}

.b-6 {
    border-radius: var(--border-radius) !important;
}

.cl-white {
    color: var(--color-white) !important;
}

.cl-blue-900 {
    color: var(--color-dark) !important;
}

.cl-primary {
    color: var(--color-primary) !important;
}

.cl-blue-700 {
    color: var(--color-secondary);
}

.fs-7 {
    font-size: 14px !important;
}

/* ============================================
   Images & Media
   ============================================ */
.img-fit-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image lazy loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

img[loading="lazy"].loaded {
    animation: none;
    background: none;
}

/* ============================================
   Decorative Elements
   ============================================ */
.icon {
    color: var(--color-primary);
    font-size: 2rem;
}

.img-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--color-primary);
    mix-blend-mode: multiply;
    width: 20%;
    z-index: 2;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.overlay-img--circle {
    width: 5rem;
}

.overlay-img--cubeLg {
    width: 23%;
    height: 23%;
    background: var(--color-primary);
    mix-blend-mode: multiply;
    right: -0.1%;
    bottom: -0.6%;
}

.overlay-img--cubeSm {
    width: 15%;
    height: 15%;
    background: var(--color-primary);
    mix-blend-mode: multiply;
}

/* Position Classes */
.p-tr { right: -3.6%; top: -5.6%; }
.p-ru { right: -3.6%; top: 10%; }
.p-rc { right: -6.5%; top: 50%; }
.p-br { right: -0.8%; bottom: -4.6%; }
.p-lu { left: -6.5%; top: 10%; }
.p-lc { left: -6.5%; top: 50%; }
.p-ld { left: -6.5%; bottom: 10%; }

/* ============================================
   Team Section
   ============================================ */
.team-post {
    cursor: pointer;
}

.team-post:hover .team-detail {
    transform: translateY(0%);
}

.team-detail {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 70%;
    background: rgba(22, 22, 22, 0.85);
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

/* ============================================
   Cards & Components
   ============================================ */
.card {
    transition: var(--transition-base);
}

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

.person-info span {
    font-size: 14px;
}

/* ============================================
   Forms
   ============================================ */
form label {
    color: #9c9c9c;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem var(--color-primary-light);
}

/* ============================================
   Blog Styles
   ============================================ */
.blog-card {
    transition: var(--transition-base);
}

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

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

.blog-card:hover img {
    transform: scale(1.05);
}

/* Article Content Styles */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary-light);
}

.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--color-text-light);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.article-content a {
    color: var(--color-primary);
    border-bottom: 1px solid transparent;
}

.article-content a:hover {
    border-bottom-color: var(--color-primary);
}

/* Table of Contents */
.toc-wrapper {
    border-left: 3px solid var(--color-primary);
}

.toc-list {
    padding-left: 1.25rem;
}

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    color: var(--color-text);
}

.toc-list a:hover {
    color: var(--color-primary);
}

/* Tags */
.tags-section .badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Related Posts */
.related-post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.related-post-item:last-child {
    border-bottom: none;
}

.related-post-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--color-text-muted);
}

.breadcrumb-item a:hover {
    color: var(--color-primary);
}

.breadcrumb-item.active {
    color: var(--color-text);
}

/* ============================================
   Pagination
   ============================================ */
.pagination .page-link {
    color: var(--color-text);
    border-radius: 8px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.pagination .page-link:hover {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

/* ============================================
   Newsletter Section
   ============================================ */
.newsletter-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem var(--color-primary-light);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media screen and (max-width: 768px) {
    .overlay-img {
        width: 16vw;
        right: -1%;
        top: -0.9%;
    }
    
    .overlay-img--circle {
        width: 16vw;
    }
    
    .overlay-img--ribbon {
        width: 16vw;
        right: -2%;
        top: -1.2%;
    }
    
    .p-br,
    .p-tr {
        right: -2.6%;
    }
    
    .tab {
        font-size: 12px !important;
    }
    
    .article-content {
        font-size: 1rem;
    }
}

@media screen and (max-width: 620px) {
    .p-br,
    .p-tr {
        right: -0.6%;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .navbar,
    footer,
    .share-section,
    .newsletter-cta,
    .related-posts {
        display: none !important;
    }
    
    .article-content {
        font-size: 12pt;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* ============================================
   Performance Optimizations
   ============================================ */
/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #cc6600;
        --color-text: #000000;
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Can be enabled if dark mode is desired */
}
