/**
 * 911MyWeb — Bootstrap Color Customization
 * 
 * Strategy: Override Bootstrap's own CSS variables so every Bootstrap
 * component (buttons, badges, alerts, links…) automatically uses the
 * brand colors. No parallel custom-variable system needed.
 *
 * Load order: this file loads AFTER bootstrap.min.css so these
 * declarations win the cascade.
 *
 * @package 911myweb
 * @version 5.0.0
 */

/* ============================================================
   BOOTSTRAP COLOR OVERRIDES
   Mirrors the :root, [data-bs-theme=light] block from Bootstrap
   but replaces only the values we want to change.
   ============================================================ */
:root,
[data-bs-theme=light] {

    /* Brand palette - CORRECTED */
    --bs-blue:   #002542;   /* brand navy blue (PRIMARY) */
    --bs-orange: #f47a16;   /* brand orange (SECONDARY) */

    /* Semantic roles - PRIMARY = Navy Blue, SECONDARY = Orange */
    --bs-primary:   #002542;
    --bs-secondary: #f47a16;

    /* RGB counterparts (required by Bootstrap for rgba() utilities) */
    --bs-primary-rgb:   0, 37, 66;
    --bs-secondary-rgb: 244, 122, 22;

    /* Dark should be navy blue, not black */
    --bs-dark:     #002542;
    --bs-dark-rgb: 0, 37, 66;

    /* Info uses navy blue */
    --bs-info:     #002542;
    --bs-info-rgb: 0, 37, 66;

    /* Warning uses orange */
    --bs-warning:     #f47a16;
    --bs-warning-rgb: 244, 122, 22;

    /* Keep Bootstrap defaults for success/danger/light */
    --bs-success:     #198754;
    --bs-success-rgb: 25, 135, 84;
    --bs-danger:      #dc3545;
    --bs-danger-rgb:  220, 53, 69;
    --bs-light:       #f8f9fa;
    --bs-light-rgb:   248, 249, 250;

    /* Emphasis / subtle variants derived from brand */
    --bs-primary-text-emphasis:   #002542;
    --bs-secondary-text-emphasis: #c35f12;

    --bs-primary-bg-subtle:   #ccd5de;
    --bs-secondary-bg-subtle: #ffe8cc;

    --bs-primary-border-subtle:   #809ab0;
    --bs-secondary-border-subtle: #ffb566;

    /* Body */
    --bs-body-font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --bs-body-font-size:   1rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-body-color:       #3a3a3a;
    --bs-body-bg:          #ffffff;
    --bs-body-text-align:  left;

    /* Links - Orange for links, Navy on hover */
    --bs-link-color:           #f47a16;
    --bs-link-color-rgb:       244, 122, 22;
    --bs-link-hover-color:     #002542;
    --bs-link-hover-color-rgb: 0, 37, 66;

    /* Headings - Navy Blue */
    --bs-heading-color:       #002542;
    --bs-headings-font-weight: 500;
    --bs-headings-line-height: 1.2;
    --bs-h1-font-size: 2.5rem;
    --bs-h2-font-size: 2rem;
    --bs-h3-font-size: 1.75rem;
    --bs-h4-font-size: 1.5rem;
    --bs-h5-font-size: 1.25rem;
    --bs-h6-font-size: 1rem;

    /* Borders & radius */
    --bs-border-color:      #e2e8f0;
    --bs-border-width:      1px;
    --bs-border-radius:     0.375rem;
    --bs-border-radius-sm:  0.25rem;
    --bs-border-radius-lg:  0.5rem;
    --bs-border-radius-xl:  1rem;
    --bs-border-radius-xxl: 1.5rem;
    --bs-border-radius-pill: 50rem;

    /* Focus ring uses primary (navy) */
    --bs-focus-ring-color: rgba(0, 37, 66, 0.25);

    /* Spacing */
    --bs-spacer: 1rem;

    /* Primary color scale (orange shades for secondary use) */
    --bs-primary-25:  #fef9f5;
    --bs-primary-50:  #fef3e8;
    --bs-primary-100: #fde7d1;
    --bs-primary-200: #fbcfa3;
    --bs-primary-300: #f9b775;
    --bs-primary-400: #f79f47;
    --bs-primary-600: #e06e0e;
    --bs-primary-700: #b85b0b;
    --bs-primary-800: #904808;
    --bs-primary-900: #682f05;
}

/* ============================================================
   THEME ALIASES
   A small set of semantic aliases used across theme templates.
   All point back to the Bootstrap vars above — no duplication.
   ============================================================ */
:root {
    /* Typography */
    --font-sans:  var(--bs-body-font-family);
    --font-inter: var(--bs-body-font-family);
    --font-mono:  'Fragment Mono', monospace;

    /* Brand shortcuts - CORRECTED */
    --brand-blue:   var(--bs-primary);    /* #002542 navy blue */
    --brand-orange: var(--bs-secondary);  /* #f47a16 orange */
    --brand-accent: var(--bs-primary);    /* navy blue is main accent */

    /* Legacy aliases for compatibility */
    --color-primary:   var(--bs-primary);    /* #002542 */
    --color-secondary: var(--bs-secondary);  /* #f47a16 */

    /* Text */
    --text-body: var(--bs-body-color);
    --text-dark: var(--bs-primary);  /* Navy blue, not black */
    --text-muted: #94a3b8;

    /* Surfaces */
    --color-base:   var(--bs-body-bg);
    --border-soft:  var(--bs-border-color);
    --accent-soft:  #fff7ed;

    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Radius aliases */
    --radius-sm:   var(--bs-border-radius-sm);
    --radius-md:   var(--bs-border-radius);
    --radius-lg:   var(--bs-border-radius-lg);
    --radius-xl:   var(--bs-border-radius-xl);
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px rgba(0,37,66,.08), 0 2px 6px rgba(0,37,66,.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4,0,0.2,1);
    --transition-base: 0.35s cubic-bezier(0.215,0.61,0.355,1);
    --transition-slow: 0.5s cubic-bezier(0.4,0,0.2,1);

    /* Section padding */
    --section-padding:    clamp(3rem, 6vh, 4rem);
    --section-padding-lg: clamp(4rem, 8vh, 6rem);
    --section-padding-sm: clamp(2rem, 4vh, 3rem);

    /* Z-index */
    --z-dropdown:       1000;
    --z-sticky:         1020;
    --z-fixed:          1030;
    --z-modal-backdrop: 1040;
    --z-modal:          1050;
    --z-popover:        1060;
    --z-tooltip:        1070;
}

/* ============================================================
   UTILITY CLASSES (non-Bootstrap)
   ============================================================ */
.section-spacing {
    padding-top:    var(--section-padding);
    padding-bottom: var(--section-padding);
}

.gradient-background {
    background: linear-gradient(300deg, #002542, #003d66, #002542);
    background-size: 180% 180%;
    animation: gradient-animation 18s ease infinite;
}

@keyframes gradient-animation {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .gradient-background { animation-play-state: paused; }
}

/* Card service accent borders */
.card-service {
    border-bottom: 3px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-bottom-color 0.3s ease;
}
.card-service:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    border-bottom-color: var(--bs-secondary);
}
.card-service--blue   { --bs-secondary: #002542; }
.card-service--orange { --bs-secondary: #f47a16; }
.card-service--green  { --bs-secondary: #10b981; }
.card-service--purple { --bs-secondary: #8b5cf6; }
.card-service--red    { --bs-secondary: #ef4444; }
.card-service--teal   { --bs-secondary: #14b8a6; }
.card-service--yellow { --bs-secondary: #f59e0b; }
.card-service--indigo { --bs-secondary: #6366f1; }
