/**
 * ==========================================================================
 * THEME ADAPTER CSS
 * ==========================================================================
 * 
 * This file bridges the iStudio Bootstrap template with custom-branding.css.
 * It uses CSS specificity with !important to force the template to adopt
 * the branding variables without modifying the original template files.
 * 
 * Load Order:
 * 1. bootstrap.min.css (template core)
 * 2. style.css (iStudio template styles)
 * 3. custom-branding.css (branding variables & base rules)
 * 4. theme-adapter.css (THIS FILE - the bridge)
 */

/* ==========================================================================
   1. TYPOGRAPHY OVERRIDES
   ========================================================================== */

/* Force font-family on body */
body {
    font-family: var(--font-body) !important;
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg) !important;
}

/* Force heading fonts across all heading elements */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading) !important;
    color: var(--bs-secondary) !important;
}

/* Display headings */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-heading) !important;
    color: var(--bs-secondary) !important;
}

/* Paragraph styling */
p {
    font-family: var(--font-body) !important;
    line-height: 1.7 !important;
}

/* ==========================================================================
   2. BUTTON OVERRIDES
   ========================================================================== */

/* Primary Button */
.btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    border-radius: var(--bs-border-radius-sm) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--bs-primary-hover) !important;
    border-color: var(--bs-primary-hover) !important;
}

/* Outline Primary Button */
.btn-outline-primary {
    color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    border-radius: var(--bs-border-radius-sm) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #FFFFFF !important;
}

/* Square buttons - override any 0 border radius from template */
.btn-square,
.btn-sm-square,
.btn-lg-square {
    border-radius: var(--bs-border-radius-sm) !important;
}

/* All buttons default styling */
.btn {
    font-family: var(--font-body) !important;
    border-radius: var(--bs-border-radius-sm) !important;
}

/* ==========================================================================
   3. NAVBAR OVERRIDES
   ========================================================================== */

/* Navbar container - Frosted Glass Effect */
.container-fluid.sticky-top {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(246, 149, 17, 0.1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05) !important;
}

/* Navbar brand */
.navbar-brand h1 {
    font-family: var(--font-heading) !important;
    color: var(--bs-secondary) !important;
}

/* Navigation links */
.navbar .navbar-nav .nav-link {
    font-family: var(--font-body) !important;
    color: var(--bs-secondary) !important;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-primary) !important;
}

/* Dropdown menu */
.navbar .dropdown-menu {
    background-color: #FFFFFF !important;
    border: none !important;
    border-radius: var(--bs-border-radius) !important;
    box-shadow: var(--shadow-lg) !important;
}

.navbar .dropdown-menu .dropdown-item {
    font-family: var(--font-body) !important;
    border-radius: var(--bs-border-radius-sm) !important;
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item.active {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-light)) !important;
    color: #FFFFFF !important;
}

/* Language Selector */
.navbar .nav-item.dropdown .dropdown-toggle {
    padding: 0.5rem 0.75rem !important;
    border: 1px solid rgba(31, 41, 55, 0.2) !important;
    border-radius: var(--bs-border-radius-sm) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}

.navbar .nav-item.dropdown .dropdown-toggle:hover {
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
}

.navbar .lang-option {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
}

.navbar .lang-option.active {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-light)) !important;
    color: #FFFFFF !important;
}

/* ==========================================================================
   4. HERO SECTION OVERRIDES
   ========================================================================== */

/* Hero header background */
.hero-header {
    background: linear-gradient(135deg, var(--bs-light) 0%, #FFFFFF 100%) !important;
}

.hero-header.bg-light {
    background: linear-gradient(135deg, var(--bs-light) 0%, #FFFFFF 100%) !important;
}

/* Hero text primary styling */
.hero-header .text-primary {
    color: var(--bs-primary) !important;
}

/* Header carousel */
.header-carousel::before {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-light)) !important;
}

/* ==========================================================================
   5. SERVICE ITEMS OVERRIDES
   ========================================================================== */

.service-item {
    border-radius: var(--bs-border-radius-lg) !important;
}

.service-item.bg-primary {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-light)) !important;
}

.service-item.bg-light {
    background-color: var(--bs-light) !important;
}

.service-item img {
    border-radius: var(--bs-border-radius) !important;
}

/* ==========================================================================
   6. PROJECT ITEMS OVERRIDES
   ========================================================================== */

.project-item {
    border-radius: var(--bs-border-radius-lg) !important;
    overflow: hidden !important;
}

.project-overlay {
    background: linear-gradient(
        180deg,
        rgba(246, 149, 17, 0) 0%,
        rgba(246, 149, 17, 0.3) 50%,
        rgba(17, 24, 39, 0.95) 100%
    ) !important;
}

/* ==========================================================================
   7. TEAM ITEMS OVERRIDES
   ========================================================================== */

.team-item {
    border-radius: var(--bs-border-radius-lg) !important;
    overflow: hidden !important;
}

.team-overlay {
    background: linear-gradient(
        180deg,
        rgba(246, 149, 17, 0) 0%,
        rgba(246, 149, 17, 0.2) 40%,
        rgba(17, 24, 39, 0.95) 100%
    ) !important;
}

.team-overlay small {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-light)) !important;
    border-radius: var(--bs-border-radius-pill) !important;
}

/* ==========================================================================
   8. TESTIMONIAL OVERRIDES
   ========================================================================== */

.testimonial-img::before {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-light)) !important;
}

.testimonial-img img {
    border-radius: var(--bs-border-radius-lg) !important;
}

.testimonial-carousel .owl-dot {
    border-color: var(--bs-primary) !important;
    border-radius: var(--bs-border-radius-sm) !important;
}

.testimonial-carousel .owl-dot.active {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-light)) !important;
}

/* ==========================================================================
   9. NEWSLETTER OVERRIDES
   ========================================================================== */

.newsletter.bg-primary {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-light)) !important;
}

.newsletter .form-control {
    border-radius: var(--bs-border-radius) !important;
    font-family: var(--font-body) !important;
}

.newsletter .text-primary {
    color: var(--bs-primary) !important;
}

/* ==========================================================================
   10. FOOTER OVERRIDES
   ========================================================================== */

.footer {
    background-color: var(--bs-dark) !important;
}

.footer h1,
.footer h5 {
    color: #FFFFFF !important;
    font-family: var(--font-heading) !important;
}

.footer .btn.btn-link {
    font-family: var(--font-body) !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

.footer .btn.btn-link:hover {
    color: var(--bs-primary-light) !important;
}

.footer .btn-outline-primary {
    border-color: rgba(246, 149, 17, 0.5) !important;
    color: var(--bs-primary-light) !important;
    border-radius: var(--bs-border-radius-sm) !important;
}

.footer .btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-light)) !important;
    border-color: var(--bs-primary) !important;
}

.footer .copyright a {
    color: rgba(255, 255, 255, 0.6) !important;
}

.footer .copyright a:hover {
    color: var(--bs-primary-light) !important;
}

.footer-menu a {
    font-family: var(--font-body) !important;
}

/* ==========================================================================
   11. BACK TO TOP BUTTON
   ========================================================================== */

.back-to-top {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-light)) !important;
    border: none !important;
    border-radius: var(--bs-border-radius) !important;
}

/* ==========================================================================
   12. BACKGROUND COLOR OVERRIDES
   ========================================================================== */

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.bg-secondary {
    background-color: var(--bs-secondary) !important;
}

.bg-light {
    background-color: var(--bs-light) !important;
}

.bg-dark {
    background-color: var(--bs-dark) !important;
}

/* ==========================================================================
   13. TEXT COLOR OVERRIDES
   ========================================================================== */

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

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

/* ==========================================================================
   14. SPINNER OVERRIDE
   ========================================================================== */

#spinner .spinner-grow {
    background-color: var(--bs-primary) !important;
}

.spinner-grow.text-primary {
    color: var(--bs-primary) !important;
}

/* ==========================================================================
   15. FORM CONTROLS
   ========================================================================== */

.form-control {
    border-radius: var(--bs-border-radius) !important;
    font-family: var(--font-body) !important;
}

.form-control:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(246, 149, 17, 0.15) !important;
}

/* ==========================================================================
   16. CARDS & GENERAL COMPONENTS
   ========================================================================== */

.card {
    border: none !important;
    border-radius: var(--bs-border-radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
}

/* Icons with text-primary */
.fa.text-primary,
.fas.text-primary,
.far.text-primary,
.fab.text-primary,
.bi.text-primary {
    color: var(--bs-primary) !important;
}

/* Award banner in About section */
.h-25.bg-primary {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-light)) !important;
    border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius) !important;
}

/* Text highlight backgrounds */
.text-uppercase.text-primary.bg-light,
.text-uppercase.text-primary.bg-white {
    padding: 0.25rem 0.75rem !important;
    border-radius: var(--bs-border-radius-sm) !important;
}

/* ==========================================================================
   17. FEATURE SECTION ICON OVERRIDES
   ========================================================================== */

.fa-5x.text-primary,
.fa-4x.text-primary,
.fa-3x.text-primary,
.fa-2x.text-primary {
    color: var(--bs-primary) !important;
}

/* Icon boxes / btn-square styling */
.btn-square.border {
    border-color: var(--bs-primary) !important;
    border-radius: var(--bs-border-radius-sm) !important;
}

/* ==========================================================================
   18. LINK OVERRIDES
   ========================================================================== */

a {
    color: var(--bs-link-color) !important;
}

a:hover {
    color: var(--bs-link-hover-color) !important;
}

/* Exclude buttons and nav items from generic link styling */
.btn,
.nav-link,
.btn-link,
.dropdown-item {
    color: inherit !important;
}

/* Re-apply specific colors */
.btn-primary {
    color: #FFFFFF !important;
}

.btn-outline-primary {
    color: var(--bs-primary) !important;
}

.btn-outline-primary:hover {
    color: #FFFFFF !important;
}
