/* B3 Software - Global Styles */

/* ===== CSS Custom Properties ===== */
:root {
    --primary-blue: #2EA3F2;
    --primary-blue-dark: #2589d0;
    --primary-blue-light: #e8f4fd;
    --text-dark: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-white: #fff;
    --bg-light: #f7f9fc;
    --bg-dark: #2d3748;
    --bg-darker: #1a202c;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --max-width: 1200px;
    --transition: 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition);
}

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

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }

p {
    margin-bottom: 1em;
    color: var(--text-light);
}

ul, ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

li {
    margin-bottom: 0.35em;
    color: var(--text-light);
}

/* ===== Layout ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section--light {
    background: var(--bg-light);
}

.section--dark {
    background: var(--bg-dark);
    color: #fff;
}

.section--dark h2,
.section--dark h3,
.section--dark p {
    color: #fff;
}

.section--dark p {
    color: rgba(255,255,255,0.85);
}

/* ===== Header / Nav ===== */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo img {
    height: 55px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-blue);
    background: var(--primary-blue-light);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a::after {
    content: ' ▾';
    font-size: 0.7em;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    min-width: 220px;
    padding: 8px 0;
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 8px 20px;
    font-size: 0.85rem;
    border-radius: 0;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-light);
}

/* Mobile menu */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    color: var(--text-dark);
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e3a5f 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 0.6em;
}

.hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2em;
}

.hero--image {
    position: relative;
    text-align: left;
    overflow: hidden;
}

.hero--image .hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero--image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    font-family: inherit;
    line-height: 1.4;
}

.btn--primary {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}

.btn--primary:hover {
    background: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
    color: #fff;
}

.btn--outline {
    background: transparent;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn--outline:hover {
    background: var(--primary-blue);
    color: #fff;
}

.btn--white {
    background: #fff;
    color: var(--primary-blue);
    border-color: #fff;
}

.btn--white:hover {
    background: rgba(255,255,255,0.9);
    color: var(--primary-blue-dark);
}

.btn--sm {
    padding: 10px 22px;
    font-size: 0.9rem;
}

.btn--lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-group--center {
    justify-content: center;
}

/* ===== Grid ===== */
.grid {
    display: grid;
    gap: 30px;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.grid--2-1 { grid-template-columns: 2fr 1fr; }
.grid--1-2 { grid-template-columns: 1fr 2fr; }
.grid--1-1 { grid-template-columns: 1fr 1fr; }

/* ===== Cards ===== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card__icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--primary-blue);
}

.card__title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5em;
}

.card__text {
    color: var(--text-light);
    font-size: 0.95rem;
}

.card--bordered {
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.card--bordered:hover {
    border-color: var(--primary-blue);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: border-color var(--transition);
    background: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(46,163,242,0.15);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-message {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
}

.form-message--success {
    background: #e6f9ed;
    color: #1a7a3a;
    border: 1px solid #b3e6c7;
}

.form-message--error {
    background: #fde8e8;
    color: #c53030;
    border: 1px solid #f5b3b3;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--bg-darker);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-top: 16px;
}

.footer-brand img {
    height: 45px;
}

.site-footer h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-blue); }
.text-muted { color: var(--text-muted); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-narrow { max-width: 700px; }
.max-w-medium { max-width: 900px; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.align-center {
    display: flex;
    align-items: center;
}

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.section-header h2 {
    margin-bottom: 0.4em;
}

.section-header p {
    font-size: 1.1rem;
}

/* ===== Two-column content ===== */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.split--reverse {
    direction: rtl;
}

.split--reverse > * {
    direction: ltr;
}

.split__image img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* ===== Testimonials ===== */
.testimonial {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-blue);
}

.testimonial__text {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.testimonial__author {
    font-weight: 600;
    color: var(--text-dark);
}

.testimonial__role {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Stats ===== */
.stat {
    text-align: center;
}

.stat__number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
    margin-bottom: 8px;
}

.stat__label {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== FAQ Accordion ===== */
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: var(--bg-white);
    border: none;
    padding: 20px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    text-align: left;
    transition: background var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--primary-blue);
    transition: transform var(--transition);
}

.faq-item.active .faq-question::after {
    content: '−';
}

.faq-answer {
    display: none;
    padding: 0 24px 20px;
    color: var(--text-light);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    display: block;
}

/* ===== Case Study Cards ===== */
.case-study-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    background: var(--bg-white);
}

.case-study-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.case-study-card__image {
    height: 200px;
    overflow: hidden;
}

.case-study-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-study-card__body {
    padding: 24px;
}

.case-study-card__tag {
    display: inline-block;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ===== Calculator Styles ===== */
.calculator {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.calculator__title {
    text-align: center;
    margin-bottom: 30px;
}

.calculator__result {
    background: var(--primary-blue-light);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    margin-top: 30px;
}

.calculator__result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.calculator__result-label {
    color: var(--text-light);
    margin-top: 4px;
}

.range-input {
    width: 100%;
    margin: 8px 0;
}

.range-value {
    text-align: right;
    font-weight: 600;
    color: var(--primary-blue);
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }

    .hero { padding: 70px 0; }
    .hero h1 { font-size: 2.2rem; }
    .section { padding: 60px 0; }

    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; gap: 30px; }
    .split--reverse { direction: ltr; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner { height: 65px; }
    .logo img { height: 42px; }

    .main-nav {
        display: none;
        position: absolute;
        top: 65px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        box-shadow: var(--shadow-md);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav a {
        width: 100%;
        padding: 12px 16px;
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 16px;
        display: none;
    }

    .nav-dropdown.active .nav-dropdown-menu {
        display: block;
    }

    .mobile-toggle {
        display: block;
    }

    .grid--2 { grid-template-columns: 1fr; }
    .grid--3 { grid-template-columns: 1fr; }
    .grid--4 { grid-template-columns: 1fr; }

    .btn-group {
        flex-direction: column;
        align-items: stretch;
    }

    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .calculator { padding: 24px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .section { padding: 40px 0; }
    .hero { padding: 50px 0; }
    .hero h1 { font-size: 1.5rem; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
}
