/* 
   ============================================
   Bootstrap Ready Starter - Complete Utilities
   ============================================
*/

/* ========== 1. CSS Variables ========== */
:root {
    /* =================================
       CERA Theme - Main Color Palette
       ================================= */
    
    /* Primary Brand Colors */
    --primary-color: #8B7355;      /* Warm Brown - Main brand color */
    --primary-hover: #5C4A3A;      /* Dark Brown - Hover state */
    --primary-light: #C4B5A5;      /* Light Tan - Lighter variant */
    
    /* Secondary Colors */
    --secondary-color: #7A7A7A;    /* Text Muted */
    --accent-color: #8B7355;       /* Warm Brown accent */
    
    /* Status Colors */
    --success-color: #6B8E5F;      /* Muted sage green */
    --danger-color: #B85C5C;       /* Muted dusty red */
    --warning-color: #D9A55B;      /* Warm amber */
    --info-color: #6B8B9E;         /* Muted slate blue */
    
    /* Neutrals - CERA Theme */
    --cream: #F5F0EB;              /* Main cream background */
    --warm-beige: #E8DED4;         /* Warm beige for sections */
    --light-tan: #C4B5A5;          /* Light tan for borders/accents */
    --text-dark: #3D3D3D;          /* Primary text */
    --text-muted: #7A7A7A;         /* Muted/secondary text */
    --white: #FFFFFF;              /* Pure white */
    --footer-dark: #2C2825;        /* Dark brown for footer */
    
    /* Legacy Color Aliases (for backward compatibility) */
    --light-color: var(--cream);
    --dark-color: var(--footer-dark);
    
    /* Backgrounds */
    --bg-body: var(--cream);
    --bg-light: var(--warm-beige);
    --bg-dark: var(--footer-dark);
    --bg-white: var(--white);
    
    /* Text */
    --text-primary: var(--text-dark);
    --text-light: var(--white);
    
    /* Borders */
    --border-color: var(--warm-beige);
    --border-light: var(--light-tan);
    
    /* Spacing */
    --spacer-xs: 0.25rem;
    --spacer-sm: 0.5rem;
    --spacer-md: 1rem;
    --spacer-lg: 1.5rem;
    --spacer-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-pill: 50rem;
    
    /* Shadows - Warm tinted */
    --shadow-sm: 0 0.125rem 0.25rem rgba(92, 74, 58, 0.08);
    --shadow-md: 0 0.5rem 1rem rgba(92, 74, 58, 0.12);
    --shadow-lg: 0 1rem 3rem rgba(92, 74, 58, 0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.3s ease-in-out;
}

/* ========== 2. Modern CSS Reset ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-fast);
}

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

ul, ol {
    list-style: none;
}

/* ========== 3. Layout Utilities ========== */

/* Flexbox Helpers */
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-center-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-start {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.flex-end {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 { gap: var(--spacer-xs); }
.gap-2 { gap: var(--spacer-sm); }
.gap-3 { gap: var(--spacer-md); }
.gap-4 { gap: var(--spacer-lg); }
.gap-5 { gap: var(--spacer-xl); }

/* ========== 4. Spacing Utilities ========== */

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

.section-padding-sm {
    padding: 40px 0;
}

/* Margins */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacer-xs); }
.mt-2 { margin-top: var(--spacer-sm); }
.mt-3 { margin-top: var(--spacer-md); }
.mt-4 { margin-top: var(--spacer-lg); }
.mt-5 { margin-top: var(--spacer-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacer-xs); }
.mb-2 { margin-bottom: var(--spacer-sm); }
.mb-3 { margin-bottom: var(--spacer-md); }
.mb-4 { margin-bottom: var(--spacer-lg); }
.mb-5 { margin-bottom: var(--spacer-xl); }

/* ========== 5. Typography Utilities ========== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-dark { color: var(--dark-color); }

.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

.fs-sm { font-size: 0.875rem; }
.fs-base { font-size: 1rem; }
.fs-lg { font-size: 1.25rem; }
.fs-xl { font-size: 1.5rem; }

/* ========== 6. Background Utilities ========== */

.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-success { background-color: var(--success-color); }
.bg-danger { background-color: var(--danger-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-info { background-color: var(--info-color); }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--bg-dark); }
.bg-white { background-color: #ffffff; }

/* ========== 7. Bilingual / Arabic Support ========== */

.arabic-text,
.rtl {
    direction: rtl;
    text-align: right;
}

.ltr {
    direction: ltr;
    text-align: left;
}

/* ========== 8. Ready Snippets ========== */

/* Standard Card */
.ready-card {
    background-color: #fff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: var(--spacer-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

/* Content Container */
.content-narrow {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.content-wide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Divider */
.divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: var(--spacer-lg) 0;
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== 9. Button Extensions ========== */

.btn-rounded {
    border-radius: var(--radius-pill);
}

/* ========== 10. Responsive Adjustments ========== */

@media (max-width: 768px) {
    .section-padding {
        padding: 50px 0;
    }
    
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
