/* ========================================
   NOOR INDUSTRIAL LIMITED - DESIGN SYSTEM
   Professional Premium Branding & Components
   ======================================== */

/* ===== ROOT: BRAND COLOR VARIABLES ===== */
:root {
    /* Brand Palette (from Logo) - Red & Blue */
    --brand-primary: #C41E3A;
    --brand-primary-dark: #A01830;
    --brand-primary-light: #E85A6E;
    --brand-secondary: #003DA5;
    --brand-secondary-dark: #002A7A;
    --brand-secondary-light: #1A5FCD;
    --brand-accent: #F39C12;
    --brand-accent-light: #F5B041;
    --brand-accent-dark: #D68910;
    --brand-cream: #f5f5f5;
    --brand-dark: #1a1a1a;
    
    /* Aliases for backward compatibility */
    --brand-green: #C41E3A;
    --brand-green-dark: #A01830;
    --brand-green-light: #E85A6E;
    --brand-gold: #003DA5;
    --brand-gold-light: #1A5FCD;
    --brand-gold-dark: #002A7A;
    
    /* Neutrals */
    --white: #ffffff;
    --text-dark: #1e2a2a;
    --text-muted: #5b6472;
    --border-light: rgba(0, 0, 0, 0.03);
    
    /* Shadows */
    --shadow-sm: 0 8px 28px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 48px rgba(31, 94, 58, 0.12);
    --shadow-hover: 0 20px 44px rgba(31, 94, 58, 0.15);
    --shadow-xl: 0 28px 56px rgba(0, 0, 0, 0.15);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-2xl: 2.5rem;
    --radius-full: 999px;
    
    /* Transitions */
    --transition-sm: 0.15s ease;
    --transition-md: 0.25s ease;
    --transition-lg: 0.35s ease;
}

/* ===== GLOBAL RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--brand-cream);
    color: var(--text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1rem;
}

/* ===== LAYOUT SPACING ===== */
.container {
    padding-left: clamp(1rem, 2.2vw, 2rem);
    padding-right: clamp(1rem, 2.2vw, 2rem);
}

.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.navbar {
    padding-left: clamp(1rem, 2.2vw, 2rem) !important;
    padding-right: clamp(1rem, 2.2vw, 2rem) !important;
}

.section-shell {
    padding-top: clamp(3rem, 6vw, 5rem) !important;
    padding-bottom: clamp(3rem, 6vw, 5rem) !important;
}

.section-shell-sm {
    padding-top: clamp(2rem, 4vw, 3rem) !important;
    padding-bottom: clamp(2rem, 4vw, 3rem) !important;
}

.service-item {
    padding: 1.25rem 1rem !important;
}

@media (min-width: 768px) {
    .service-item {
        padding: 1.5rem 1.25rem !important;
    }
}

@media (max-width: 767.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .section-shell,
    .section-shell-sm {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--brand-dark);
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.5rem; font-weight: 700; }
h3 { font-size: 2rem; font-weight: 700; }
h4 { font-size: 1.5rem; font-weight: 600; }
h5 { font-size: 1.25rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

p.lead {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 500;
}

a {
    color: var(--brand-green);
    text-decoration: none;
    transition: color var(--transition-md);
}

a:hover {
    color: var(--brand-gold);
}

strong {
    font-weight: 600;
    color: var(--brand-dark);
}

/* ===== SECTION TITLE ===== */
.section-title {
    color: var(--brand-green);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.85rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--brand-gold);
    border-radius: 4px;
    transition: width var(--transition-md);
}

/* ===== COLOR UTILITIES ===== */
.text-primary {
    color: var(--brand-green) !important;
}

.text-secondary {
    color: var(--brand-gold) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-white {
    color: var(--white) !important;
}

.bg-light {
    background-color: var(--brand-cream) !important;
}

.bg-white {
    background: var(--white) !important;
}

.bg-primary {
    background-color: var(--brand-green) !important;
}

.bg-secondary {
    background-color: var(--brand-gold) !important;
}

.bg-dark {
    background-color: var(--brand-dark) !important;
}

/* ===== BUTTONS ===== */
.btn {
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all var(--transition-md);
    border-radius: var(--radius-full);
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn:focus-visible {
    outline: 3px solid var(--brand-gold);
    outline-offset: 2px;
}

/* Primary Button */
.btn-primary {
    background-color: var(--brand-green);
    border-color: var(--brand-green);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(31, 94, 58, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-green-dark);
    border-color: var(--brand-green-dark);
    color: var(--white);
    box-shadow: 0 8px 24px rgba(31, 94, 58, 0.3);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(31, 94, 58, 0.2);
}

/* Secondary Button */
.btn-secondary {
    background-color: var(--brand-gold);
    border-color: var(--brand-gold);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(201, 160, 80, 0.2);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--brand-gold-dark);
    border-color: var(--brand-gold-dark);
    color: var(--white);
    box-shadow: 0 8px 24px rgba(201, 160, 80, 0.3);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(201, 160, 80, 0.2);
}

/* Outline Light Button */
.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: var(--white);
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: all var(--transition-md);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: var(--white);
    transform: translateY(-2px);
}

/* Button Sizes */
.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(201, 160, 80, 0.15);
    padding: 0.6rem 0;
}

.navbar-brand img {
    max-height: 76px !important;
    width: auto;
    object-fit: contain;
    transition: all var(--transition-md);
}

.navbar-brand img:hover {
    transform: scale(1.02);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    transition: all var(--transition-md);
    padding: 0.5rem 1.1rem !important;
    border-radius: var(--radius-full);
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--brand-green) !important;
    background: rgba(31, 94, 58, 0.07);
}

.nav-link.active {
    font-weight: 700 !important;
    background: rgba(31, 94, 58, 0.09) !important;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.75rem;
    transition: all var(--transition-md);
}

.navbar-toggler:focus {
    outline: 2px solid var(--brand-green);
    outline-offset: 2px;
}

/* ===== CAROUSEL ===== */
.carousel-header {
    position: relative;
}

.carousel-item img {
    object-fit: cover;
    height: 88vh;
    width: 100%;
    background: var(--brand-dark);
}

.carousel-caption-1-content,
.carousel-caption-2-content {
    background: rgba(10, 20, 16, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 2.5rem 3rem;
    border-radius: 3rem;
    border-left: 10px solid var(--brand-gold);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
    max-width: 900px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background: var(--brand-gold);
    border-radius: 50%;
    padding: 1.2rem;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-md);
}

.carousel-control-prev-icon i,
.carousel-control-next-icon i {
    font-size: 2rem;
    color: var(--white);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background: var(--brand-green);
    transform: scale(1.1);
}

.carousel-indicators [data-bs-target] {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-gold);
    border: 2px solid transparent;
    opacity: 0.5;
    transition: all var(--transition-md);
}

.carousel-indicators .active {
    background: var(--brand-green);
    opacity: 1;
    border-color: var(--white);
    transform: scale(1.2);
}

/* ===== CARDS ===== */
.hero-card,
.product-item,
.service-item,
.blog-item,
.info-card,
.about-item,
.contact-item {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--white);
    transition: all var(--transition-md);
    border: 1px solid var(--border-light);
}

.hero-card:hover,
.product-item:hover,
.service-item:hover,
.blog-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px);
}

/* Product Cards */
.product-item {
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-item:hover {
    border-color: var(--brand-gold);
    transform: translateY(-10px);
}

.product-item img {
    height: 240px;
    object-fit: cover;
    width: 100%;
    transition: transform var(--transition-md);
}

.product-item:hover img {
    transform: scale(1.05);
}

/* Service Cards */
.service-item {
    border-left: 8px solid var(--brand-green);
    border-radius: var(--radius-lg);
}

.service-item:hover {
    border-left-color: var(--brand-gold);
}

/* Blog Cards */
.blog-item {
    border-bottom: 6px solid var(--brand-gold);
    border-radius: var(--radius-lg);
}

.blog-item:hover {
    border-bottom-color: var(--brand-green);
}

/* Info Cards */
.info-card {
    border-left: 6px solid var(--brand-gold);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: var(--white);
}

.info-card:hover {
    border-left-color: var(--brand-green);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--brand-dark);
    border-top: 4px solid var(--brand-gold);
    color: #d0dbe8;
    padding: 3rem 0 1rem;
}

.footer h4,
.footer h5,
.footer h6 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer a {
    color: #d0dbe8;
    text-decoration: none;
    transition: all var(--transition-md);
    padding: 0.25rem 0;
    display: inline-block;
}

.footer a:hover {
    color: var(--brand-gold-light);
    padding-left: 0.5rem;
    transform: translateX(4px);
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.copyright {
    background: #0b130e;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    color: #e2e8f0;
    padding: 1.5rem 0;
    text-align: center;
}

.copyright p {
    color: #e2e8f0;
    margin: 0;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    background: var(--brand-gold);
    border: none;
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--brand-green);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(31, 94, 58, 0.3);
}

/* ===== SPINNER ===== */
#spinner {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(4px);
    z-index: 9999;
}

.spinner-border {
    border-color: var(--brand-gold);
    border-right-color: transparent;
}

.spinner-border.text-primary {
    color: var(--brand-green) !important;
    border-color: rgba(31, 94, 58, 0.2);
    border-right-color: var(--brand-green) !important;
}

/* ===== FORM ELEMENTS ===== */
.form-control,
.form-select {
    border: 2px solid rgba(201, 160, 80, 0.15);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all var(--transition-md);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(31, 94, 58, 0.1);
}

.form-label {
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-dark);
    transition: color var(--transition-md);
}

.breadcrumb-item a:hover {
    color: var(--brand-green);
}

.breadcrumb-item.active {
    color: var(--brand-gold);
    font-weight: 600;
}

/* ===== BADGE ===== */
.badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-primary {
    background-color: var(--brand-green);
    color: var(--white);
}

.badge-secondary {
    background-color: var(--brand-gold);
    color: var(--white);
}

.badge-light {
    background-color: var(--brand-cream);
    color: var(--brand-dark);
}

/* ===== LIST STYLES ===== */
ul.list-unstyled li {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    transition: all var(--transition-md);
}

ul.list-unstyled li:hover {
    color: var(--brand-green);
    padding-left: 0.5rem;
}

ul.list-unstyled li i {
    color: var(--brand-green);
    margin-right: 0.75rem;
    transition: all var(--transition-md);
}

ul.list-unstyled li:hover i {
    color: var(--brand-gold);
    transform: scale(1.2);
}

/* ===== IFRAME & EMBEDDED CONTENT ===== */
iframe {
    border: 0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    width: 100%;
    height: 100%;
}

/* ===== ACCESSIBILITY & FOCUS STATES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--brand-gold);
    outline-offset: 2px;
}

/* ===== UTILITIES ===== */
.gap-3 {
    gap: 1rem !important;
}

.display-2 {
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 3.5rem;
}

.display-4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.display-5 {
    font-weight: 600;
    font-size: 2.5rem;
}

/* Selection Style */
::selection {
    background-color: var(--brand-green);
    color: var(--white);
}

::-moz-selection {
    background-color: var(--brand-green);
    color: var(--white);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .display-2 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .carousel-item img {
        height: 70vh;
    }
    
    .carousel-caption-1-content,
    .carousel-caption-2-content {
        padding: 1.5rem;
        border-radius: 2rem;
        margin: 0 0.5rem;
    }
    
    .display-2 {
        font-size: 2.2rem;
    }
    
    .navbar .navbar-brand img {
        max-height: 60px !important;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .carousel-item img {
        height: 60vh;
    }
    
    .display-2 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 0.75rem;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        padding: 0.8rem;
        width: 3rem;
        height: 3rem;
    }
    
    .carousel-control-prev-icon i,
    .carousel-control-next-icon i {
        font-size: 1.5rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.6s ease-out;
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .footer,
    .back-to-top {
        display: none !important;
    }
    
    body {
        background: var(--white);
    }
    
    a {
        color: var(--brand-green);
        text-decoration: underline;
    }
}
