/* ===================================
   ADDSUB INNOVATIVE SOLUTIONS - Custom Styles
   =================================== */

:root {
    --primary-color: #3A3A3A;
    --text-color: #5a6268;
    --success-color: #00A651;
    --info-color: #1E3A8A;
    --warning-color: #ffc107;
    --warning-hover: #ffb700;
    --danger-color: #E31E24;
    --danger-hover: #c41a1f;
    --dark-color: #2A2A2A;
    --light-color: #e9ecef;
    --grey-bg: #f5f5f5;
    --grey-card: #fafafa;
    --white: #ffffff;
    --red-accent: #E31E24;
    --blue-accent: #1E3A8A;
    --blue-hover: #172e6b;
    --green-accent: #00A651;
    --green-hover: #008a44;

    /* Shadow colors */
    --shadow-black-light: rgba(0, 0, 0, 0.08);
    --shadow-black-medium: rgba(0, 0, 0, 0.1);
    --shadow-black-strong: rgba(0, 0, 0, 0.15);

    /* Glow colors for icons */
    --glow-red: rgba(227, 30, 36, 0.4);
    --glow-blue: rgba(30, 58, 138, 0.4);
    --glow-green: rgba(0, 166, 81, 0.4);
    --glow-yellow: rgba(255, 193, 7, 0.4);
    --glow-grey: rgba(58, 58, 58, 0.4);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6,
.brand-line-1,
.brand-line-2 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    color: var(--text-color);
}

/* White headings on dark backgrounds */
.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4,
.bg-dark h5,
.bg-dark h6,
.bg-dark .display-1,
.bg-dark .display-2,
.bg-dark .display-3,
.bg-dark .display-4,
.bg-dark .display-5,
.bg-dark .display-6,
.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.text-white h5,
.text-white h6,
.page-header h1,
.page-header h2,
.page-header h3,
footer h1,
footer h2,
footer h3,
footer h4,
footer h5,
footer h6 {
    color: white !important;
}

html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar.bg-dark {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFFFF 3%, #2A2A2A 100%) !important;
}


.brand-text {
    line-height: 1.2;
    text-align: center;
}

.brand-line-1 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.brand-line-2 {
    font-size: 1.3rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.5px;
}

.navbar-logo {
    height: 115px;
    width: auto;
    max-width: 450px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--red-accent);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: calc(100% - 2rem);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 50vh;
    background: url('../images/hero-bg1.jpeg') no-repeat center center,
        linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
    background-size: cover;
    background-attachment: scroll;
    /* Changed from fixed */
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Hero Typography */
.hero-brand-name {
    letter-spacing: 0.05em;
    font-size: 4rem;
    color: white !important;
}

.hero-company-name {
    letter-spacing: 0.4em;
    font-size: 1.5rem;
    color: white !important;
}

.hero-tagline-text {
    letter-spacing: 0.15em;
    color: white !important;
}

.hero-section .lead {
    color: white !important;
}

.hero-tagline-line {
    width: 80px;
    height: 2px;
    opacity: 0.5;
    border: 0;
    background-color: white;
    margin: 0;
    flex-shrink: 0;
}

/* Industrial pattern overlay */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg, rgba(58, 58, 58, 0.1) 0%, rgba(42, 42, 42, 0.15) 100%),
        repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.01) 10px,
            rgba(255, 255, 255, 0.01) 20px);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.min-vh-75 {
    min-height: 50vh;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: white;
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.min-vh-50 {
    min-height: 50vh;
}

/* Cards */
.card {
    transition: all 0.3s ease;
    border-radius: 10px;
}

.card-title {
    color: var(--text-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

/* Feature Icons */
.feature-icon {
    width: 85px;
    height: 85px;
    font-size: 2.2rem;
    transition: all 0.4s ease;
}

/* Capabilities Section */
.capabilities-section {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
}

.capabilities-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(45deg,
            transparent,
            transparent 20px,
            rgba(0, 0, 0, 0.02) 20px,
            rgba(0, 0, 0, 0.02) 40px),
        repeating-linear-gradient(-45deg,
            transparent,
            transparent 20px,
            rgba(0, 0, 0, 0.02) 20px,
            rgba(0, 0, 0, 0.02) 40px);
    opacity: 0.5;
    z-index: 0;
}

.capabilities-section .container {
    position: relative;
    z-index: 1;
}

/* Capability Cards */
.capability-card {
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
}

.capability-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.capability-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Capability Icon Colors */
.capability-icon-red {
    background: var(--red-accent);
}

.capability-card:hover .capability-icon-red {
    background: var(--danger-hover);
    box-shadow: 0 8px 20px var(--glow-red);
}

.capability-icon-blue {
    background: var(--blue-accent);
}

.capability-card:hover .capability-icon-blue {
    background: var(--blue-hover);
    box-shadow: 0 8px 20px var(--glow-blue);
}

.capability-icon-green {
    background: var(--green-accent);
}

.capability-card:hover .capability-icon-green {
    background: var(--green-hover);
    box-shadow: 0 8px 20px var(--glow-green);
}

.capability-icon-dark {
    background: var(--dark-color);
}

.capability-card:hover .capability-icon-dark {
    background: var(--primary-color);
    box-shadow: 0 8px 20px var(--glow-grey);
}

/* ADDSUB Meaning Section Icons */
.addsub-icon {
    font-size: 4rem;
    color: var(--text-color);
}

/* Client Box */
.client-box {
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--grey-card) !important;
}

.client-box:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
    background-color: var(--white) !important;
}

.client-logo {
    max-width: 100%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Avatar */
.avatar {
    width: 100px;
    height: 100px;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 50px;
}

.btn-lg {
    padding: 1rem 2.5rem;
}

/* Common button styles */
.btn-primary,
.btn-success,
.btn-info,
.btn-warning {
    border: none;
}

.btn-primary,
.btn-success,
.btn-info {
    color: white;
}

.btn-primary:hover,
.btn-success:hover,
.btn-info:hover,
.btn-warning:hover {
    transform: translateY(-2px);
}

/* Individual button colors */
.btn-primary {
    background: var(--red-accent);
}

.btn-primary:hover {
    background: var(--danger-hover);
    box-shadow: 0 5px 20px var(--glow-red);
}

.btn-success {
    background: var(--green-accent);
}

.btn-success:hover {
    background: var(--green-hover);
    box-shadow: 0 5px 20px var(--glow-green);
}

.btn-info {
    background: var(--blue-accent);
}

.btn-info:hover {
    background: var(--blue-hover);
    box-shadow: 0 5px 20px var(--glow-blue);
}

.btn-warning {
    background: var(--warning-color);
    color: #000;
}

.btn-warning:hover {
    background: var(--warning-hover);
    box-shadow: 0 5px 20px var(--glow-yellow);
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Tables */
.table-responsive {
    border-radius: 0 0 10px 10px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Stat Box */
.stat-box {
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-box h3 {
    font-size: 2rem;
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, .125);
}

/* Form Elements */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(58, 58, 58, 0.15);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

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

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Shadows */
.shadow-sm {
    box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .08) !important;
}

.shadow {
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .12) !important;
}

/* CTA Section */
.cta-section {
    position: relative;
    background: url('../images/1.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    overflow: hidden;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 58, 138, 0.5);
    z-index: 1;
}

.cta-section .container {
    z-index: 2;
}

.cta-section h1,
.cta-section h2,
.cta-section h3,
.cta-section h4,
.cta-section h5,
.cta-section h6 {
    color: white !important;
}

.cta-section p,
.cta-section .lead {
    color: white !important;
}

/* Footer */
footer {
    background: var(--dark-color);
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--warning-color) !important;
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 991.98px) {
    .brand-line-1 {
        font-size: 1.7rem;
    }

    .brand-line-2 {
        font-size: 1.1rem;
    }

    .navbar-logo {
        height: 90px;
    }

    .hero-section {
        min-height: 45vh;
    }

    .hero-brand-name {
        font-size: 3rem;
        color: white !important;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .display-6 {
        font-size: 1.5rem;
    }

    /* Hero responsive */
    .hero-company-name {
        letter-spacing: 0.3em;
        font-size: 1.3rem;
        color: white !important;
    }

    .hero-tagline-line {
        width: 60px;
    }
}

@media (max-width: 767.98px) {
    .brand-text {
        margin-left: 0.5rem !important;
    }

    .brand-line-1 {
        font-size: 1.5rem;
    }

    .brand-line-2 {
        font-size: 1rem;
    }

    .navbar-logo {
        height: 75px;
    }

    /* Hide red line indicator on mobile */
    .navbar-nav .nav-link::after {
        display: none !important;
    }

    /* Align menu items to the right on mobile */
    .navbar-nav {
        align-items: flex-end;
    }

    .navbar-nav .nav-link {
        text-align: right;
    }

    .hero-section {
        min-height: 40vh;
    }

    .display-3 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.6rem 1.5rem;
    }

    .btn-lg {
        padding: 0.75rem 2rem;
    }

    .feature-icon {
        width: 75px;
        height: 75px;
        font-size: 2rem;
    }

    /* Hero responsive mobile */
    .hero-brand-name {
        letter-spacing: 0.03em;
        font-size: 2.5rem;
        color: white !important;
    }

    .hero-company-name {
        letter-spacing: 0.2em;
        font-size: 1.2rem;
        color: white !important;
    }

    .hero-tagline-line {
        width: 40px;
    }

    .hero-tagline-text {
        font-size: 0.85rem;
    }

    .hero-section .d-flex.gap-3 {
        gap: 0.75rem !important;
    }
}

/* Utilities */

/* Grey Background Override */
.bg-light {
    background-color: var(--grey-bg) !important;
}

/* Card Backgrounds */
.card {
    background-color: var(--grey-card);
}

/* Print Styles */
@media print {

    .navbar,
    footer,
    .btn {
        display: none !important;
    }

    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #E31E24;
    outline-offset: 2px;
}

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

::-moz-selection {
    background: var(--red-accent);
    color: white;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--red-accent);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow-black-medium);
}

.back-to-top:hover {
    background: var(--danger-hover);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--glow-red);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 767.98px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}