/* =============================================
   Hisn Al-Itqan - حصن الاتقان
   Insulation Services Stylesheet
   ============================================= */

/* Global Variables */
:root {
    --primary: #D4AF37;
    --primary-light: #F1D27A;
    --primary-dark: #A67C00;
    --secondary: #0B1F3A;
    --secondary-light: #152b4d;
    --secondary-dark: #050e1a;
    --accent: #F1D27A;
    --accent-light: #f7e4ac;
    --dark-bg: #0B1F3A;
    --darker-bg: #08172b;
    --light-bg: #fdfdfb;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --gold-gradient: linear-gradient(135deg, #D4AF37, #F1D27A, #A67C00);
    --card-shadow: 0 10px 15px -3px rgba(11, 31, 58, 0.1), 0 4px 6px -2px rgba(11, 31, 58, 0.05);
    --hover-shadow: 0 20px 25px -5px rgba(11, 31, 58, 0.15), 0 10px 10px -5px rgba(11, 31, 58, 0.04);
    --transition-base: all 0.3s ease;
}

/* Branding Utilities */
.text-primary-brand { color: var(--primary) !important; }
.text-secondary-brand { color: var(--secondary) !important; }
.bg-primary-brand { background-color: var(--primary) !important; }
.bg-secondary-brand { background-color: var(--secondary) !important; }
.border-primary-brand { border-color: var(--primary) !important; }
.border-secondary-brand { border-color: var(--secondary) !important; }


/* Typography & Reset */
body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    color: var(--text-main);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* Global Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-base);
}

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

/* Navigation Overrides */
.navbar .nav-link {
    transition: var(--transition-base);
    font-size: 1rem;
    padding: 0.5rem 1rem !important;
}

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

/* Section Title Utility */
.section-title .badge {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 16px;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(11, 31, 58, 0.2) !important;
}

.hover-up {
    transition: transform 0.3s ease;
}

.hover-up:hover {
    transform: translateY(-5px);
}

.hover-zoom {
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.6s ease;
}

.hover-zoom:hover img {
    transform: scale(1.08);
}

/* Global Transition Classes */
.transition-all {
    transition: var(--transition-base);
}

/* Blur effects */
.backdrop-blur {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Text and Spacing utilities */
.leading-relaxed {
    line-height: 1.8;
}

.w-fit {
    width: fit-content;
}

.object-fit-cover {
    object-fit: cover;
}

/* Responsive Border Utilities */
@media (min-width: 992px) {
    .border-lg-start {
        border-right: 1px solid rgba(212, 175, 55, 0.2) !important;
    }

    .border-lg-end {
        border-left: 1px solid rgba(212, 175, 55, 0.2) !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-slide-up {
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards;
}

.animate-slide-down {
    opacity: 0;
    animation: slideDown 0.8s ease-out forwards;
}

/* Scroll smooth */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: var(--primary);
    color: white;
}

/* Bootstrap Overrides */
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--secondary) !important;
}

.btn-primary:hover {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}

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

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

/* Gold Gradient Text */
.text-gold-gradient {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gold Gradient backgrounds */
.bg-gold-gradient {
    background: var(--gold-gradient) !important;
}

/* Utility Colors */
.bg-primary-brand { background-color: var(--primary) !important; }
.text-primary-brand { color: var(--primary) !important; }
.bg-dark-brand { background-color: var(--secondary) !important; }

/* Badge / Soft backgrounds */
.bg-primary-soft {
    background-color: rgba(212, 175, 55, 0.12) !important;
    color: var(--primary-dark) !important;
    font-size: 16px;
}

/* Buttons */
.btn-brand {
    background: var(--gold-gradient);
    color: #000;
    border: none;
    font-weight: 700;
    transition: all 0.3s ease;
}
.btn-brand:hover {
    background: linear-gradient(135deg, #E0C55B, #D4AF37);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
}

.btn-outline-brand {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    font-weight: 700;
    transition: all 0.4s ease;
}
.btn-outline-brand:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.btn-gold {
    background: var(--gold-gradient);
    color: #000;
    border: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-outline-gold {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    font-weight: 600;
}
.btn-outline-gold:hover {
    background: var(--primary);
    color: #000;
}

.btn-white {
    background: white !important;
    color: var(--secondary) !important;
    border: none;
    font-weight: 700;
}
.btn-white:hover {
    background: #f8f9fa !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Floating Action Buttons */
.fab-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (max-width: 768px) {
    .fab-container {
        bottom: 20px;
        left: 20px;
        gap: 10px;
    }
}

.fab-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .fab-button {
        width: 50px;
        height: 50px;
    }
}

.fab-button:hover {
    transform: scale(1.1) translateY(-5px);
    color: white;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.fab-whatsapp { background-color: #25D366; }
.fab-phone { background: var(--gold-gradient); color: #000; }
.fab-phone:hover { color: #000; }
.fab-button i { font-size: 28px; }

@media (max-width: 768px) {
    .fab-button i { font-size: 24px; }
}

@keyframes pulse-fab {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.fab-whatsapp.pulse { animation: pulse-fab 2s infinite; }

/* Section divider */
.section-divider {
    width: 80px;
    height: 4px;
    background: var(--gold-gradient);
    border-radius: 2px;
}

/* Fluid Typography */
h1, .display-1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem); line-height: 1.1; }
h2, .display-2 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); line-height: 1.2; }
h3, .display-3 { font-size: clamp(1.75rem, 3vw + 1rem, 2.75rem); }
h4, .display-4 { font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem); }
h5, .display-5 { font-size: clamp(1.25rem, 1.5vw + 1rem, 1.75rem); }
h6, .display-6 { font-size: clamp(1rem, 1vw + 1rem, 1.25rem); }

/* Responsive Spacing Utility */
.section-padding {
    padding-top: clamp(3rem, 8vw, 6rem);
    padding-bottom: clamp(3rem, 8vw, 6rem);
}

/* Container refinement */
@media (min-width: 1400px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        max-width: 1320px;
    }
}

/* Mobile specific overrides */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh !important;
    }
    
    .navbar-brand img {
        height: 50px !important;
    }
    
    .section-divider {
        width: 60px !important;
    }

    .card-body {
        padding: 1.5rem !important;
    }

    /* Fix for touch targets */
    .btn, .nav-link, .footer-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Horizontal Scroll Fix */
.overflow-x-hidden {
    overflow-x: hidden;
}

html,
body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Image scaling */
.img-fluid-custom {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}