/* ================== UI FIXES ================== */

/* General section padding */
.bray-section {
    padding: 100px 0 !important;
}

/* Dark mode eyebrow */
body.dark-mode .section-eyebrow {
    color: #93c5fd !important;
    background: rgba(147, 197, 253, 0.15) !important;
}

/* Stats section */
.bray-stats-section {
    padding: 60px 0 !important;
    background: white;
}

body.dark-mode .bray-stats-section {
    background: #1e293b;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    background: #dcfce7;
    color: #16a34a;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-item p {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
}

body.dark-mode .stat-item p {
    color: #cbd5e1;
}

@media (max-width:968px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width:640px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Process / How We Work */
.process-section {
    padding: 100px 0 !important;
    background: white;
}

body.dark-mode .process-section {
    background: #0f172a;
}

.process-timeline {
    margin-top: 48px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
}

.process-step h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
}

body.dark-mode .process-step h4 {
    color: #f1f5f9;
}

.process-step p {
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

body.dark-mode .process-step p {
    color: #cbd5e1;
}

.support-badge {
    display: inline-block;
    margin-top: 12px;
    background: #dcfce7;
    color: #16a34a;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

body.dark-mode .support-badge {
    background: rgba(22, 163, 74, 0.2);
    color: #86efac;
}

/* Why Choose Us */
.why-choose {
    padding: 100px 0 !important;
    background: #f8fafc;
}

body.dark-mode .why-choose {
    background: #1e293b;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.why-item {
    background: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
}

body.dark-mode .why-item {
    background: #0f172a;
}

.why-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.15);
}

.why-item .icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: white;
}

.why-item h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
}

body.dark-mode .why-item h4 {
    color: #f1f5f9;
}

.why-item p {
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

body.dark-mode .why-item p {
    color: #cbd5e1;
}

@media (max-width:968px) {
    .why-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Industries */
.industries-section {
    padding: 100px 0 !important;
    background: white;
}

body.dark-mode .industries-section {
    background: #0f172a;
}

.industry-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

body.dark-mode .industry-card {
    background: #1e293b;
    border-color: #334155;
}

.industry-card:hover {
    border-color: #4f46e5;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

.industry-icon {
    font-size: 2.5rem;
    color: #4f46e5;
    margin-bottom: 12px;
    display: block;
}

body.dark-mode .industry-icon {
    color: #818cf8;
}

.industry-title {
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
}

body.dark-mode .industry-title {
    color: #f1f5f9;
}

/* Pricing panel */
.pricing-calculator {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

body.dark-mode .pricing-calculator {
    background: #1e293b;
}

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
}

.pricing-header h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0f172a;
}

body.dark-mode .pricing-header h3 {
    color: #f1f5f9;
}

.pricing-header p {
    color: #64748b;
    font-size: 1rem;
}

body.dark-mode .pricing-header p {
    color: #cbd5e1;
}

.timeline-slider {
    margin: 32px 0;
    padding: 24px;
    background: #f8fafc;
    border-radius: 16px;
}

body.dark-mode .timeline-slider {
    background: #0f172a;
}

.timeline-slider label {
    display: block;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

body.dark-mode .timeline-slider label {
    color: #f1f5f9;
}

#timeline-range {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

body.dark-mode #timeline-range {
    background: #334155;
}

#timeline-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

#timeline-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.price-result {
    text-align: center;
    padding: 32px;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-radius: 16px;
    margin-top: 24px;
}

body.dark-mode .price-result {
    background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
}

.price-result p {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 8px;
}

body.dark-mode .price-result p {
    color: #cbd5e1;
}

.price-result h3 {
    font-size: 3rem;
    font-weight: 800;
    color: #4f46e5;
    margin: 0 0 16px;
}

body.dark-mode .price-result h3 {
    color: #a78bfa;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.service-list li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: #64748b;
    line-height: 1.6;
}

body.dark-mode .service-list li {
    color: #cbd5e1;
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
}

/* Hero fixes */
.bray-hero {
    padding: 140px 0 100px !important;
    text-align: center;
}

.hero-highlight {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
}

@media (max-width:640px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Container */
.bray-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width:640px) {
    .bray-container {
        padding: 0 16px;
    }
}

/* Service cards */
.service-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
}

body.dark-mode .service-card {
    background: #1e293b;
    border-color: #334155;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.15);
    border-color: #4f46e5;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
}

body.dark-mode .service-card h3 {
    color: #f1f5f9;
}

.service-card p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 16px;
}

body.dark-mode .service-card p {
    color: #cbd5e1;
}

/* Grid layouts */
.bray-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

@media (max-width:1024px) {
    .bray-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:640px) {
    .bray-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.bray-footer {
    background: #f8fafc;
    color: #1e293b;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

@media (max-width:968px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width:640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.footer-brand h2 {
    color: #0f172a;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.footer-brand p {
    color: #64748b;
    line-height: 1.7;
}

.footer-col h4 {
    color: #0f172a;
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #2563eb;
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}

.footer-bottom p {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
}

body.dark-mode .bray-footer {
    background: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .footer-brand h2,
body.dark-mode .footer-col h4 {
    color: #f1f5f9;
}

body.dark-mode .footer-brand p,
body.dark-mode .footer-links a {
    color: #cbd5e1;
}

body.dark-mode .footer-bottom {
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .footer-bottom p {
    color: #94a3b8;
}

/* Service card option (pricing selector) */
.service-card-option {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex: 0 0 auto;
    width: 160px;
    padding: 24px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.dark-mode .service-card-option {
    background: #1e293b;
    border-color: #334155;
}

.service-card-option:hover {
    border-color: #4f46e5;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

.service-card-option.active {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
}

.service-card-option i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
    color: #4f46e5;
}

.service-card-option.active i {
    color: white;
}

.service-card-option .name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
}

body.dark-mode .service-card-option .name {
    color: #f1f5f9;
}

.service-card-option.active .name {
    color: white;
}

.service-card-option small {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 4px;
    display: block;
    color: #64748b;
}

color: #cbd5e1;
}

/* Grid layouts */
.bray-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

@media (max-width:1024px) {
    .bray-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:640px) {
    .bray-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.bray-footer {
    background: #f8fafc;
    color: #1e293b;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

@media (max-width:968px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width:640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.footer-brand h2 {
    color: #0f172a;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.footer-brand p {
    color: #64748b;
    line-height: 1.7;
}

.footer-col h4 {
    color: #0f172a;
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #2563eb;
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}

.footer-bottom p {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
}

body.dark-mode .bray-footer {
    background: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .footer-brand h2,
body.dark-mode .footer-col h4 {
    color: #f1f5f9;
}

body.dark-mode .footer-brand p,
body.dark-mode .footer-links a {
    color: #cbd5e1;
}

body.dark-mode .footer-bottom {
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .footer-bottom p {
    color: #94a3b8;
}

/* Service card option (pricing selector) */
.service-card-option {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex: 0 0 auto;
    width: 160px;
    padding: 24px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.dark-mode .service-card-option {
    background: #1e293b;
    border-color: #334155;
}

.service-card-option:hover {
    border-color: #4f46e5;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

.service-card-option.active {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
}

.service-card-option i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
    color: #4f46e5;
}

.service-card-option.active i {
    color: white;
}

.service-card-option .name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
}

body.dark-mode .service-card-option .name {
    color: #f1f5f9;
}

.service-card-option.active .name {
    color: white;
}

.service-card-option small {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 4px;
    display: block;
    color: #64748b;
}

body.dark-mode .service-card-option small {
    color: #cbd5e1;
}

.service-card-option.active small {
    color: rgba(255, 255, 255, 0.9);
}

/* ================== TEXT OVERFLOW FIXES ==================  */

/* Global text overflow prevention */
* {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Prevent long words from breaking layout */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
li,
td,
th,
div {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Headings specific */
.section-title,
.hero-title,
h1,
h2,
h3 {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Links */
a {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Paragraphs and text blocks */
p,
.section-lead,
.text-muted {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Service lists */
.service-list li,
.footer-links li {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Cards */
.service-card,
.why-item,
.industry-card,
.testimonial-card,
.blog-card {
    overflow: hidden;
}

.service-card h3,
.service-card p,
.why-item h4,
.why-item p {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Footer */
.footer-brand,
.footer-col {
    overflow: hidden;
}

.footer-brand h2,
.footer-brand p,
.footer-col h4,
.footer-links a {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Navigation */
.bray-nav-links a,
.dropdown-title,
.dropdown-desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 968px) {

    .bray-nav-links a,
    .dropdown-title,
    .dropdown-desc {
        white-space: normal;
        overflow: visible;
    }
}

/* Pricing calculator */
.pricing-header h3,
.pricing-header p,
.price-result p,
.price-result h3 {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Process steps */
.process-step h4,
.process-step p {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Testimonials */
.testimonial-text,
.testimonial-author {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Blog cards */
.blog-content h4,
.blog-content p {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* FAQ */
.faq-question,
.faq-answer {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Portfolio */
.portfolio-content h4,
.portfolio-content p {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Stats */
.stat-item h3,
.stat-item p {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Email and phone links - allow break on special characters */
a[href^="mailto"],
a[href^="tel"] {
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* Container max-width enforcement */
.bray-container {
    max-width: 100%;
    overflow-x: hidden;
}

.bray-section {
    overflow-x: hidden;
}

/* Privacy policy and text-heavy pages */
.privacy-policy-content,
.about-content,
.contact-content {
    max-width: 100%;
}

.privacy-policy-content h2,
.privacy-policy-content h3,
.privacy-policy-content p,
.privacy-policy-content li {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Mobile specific */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    .section-title {
        font-size: 1.75rem !important;
    }

    .hero-title {
        font-size: 2rem !important;
    }
}
/* ================== MOBILE REFINEMENTS ================== */
@media (max-width: 768px) {
    /* Reduce section padding */
    .bray-section {
        padding: 60px 0 !important;
    }
    
    /* Ensure container padding */
    .bray-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    /* Fix Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }
    
    /* Fix Industries Grid */
    .industries-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    
    /* Fix Blog Grid */
    .blog-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Typography Adjustments */
    h2.section-title {
        font-size: 2rem !important;
    }
    
    p.section-lead {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 480px) {
    .industries-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Optimized Logo Styles */
.bray-logo-optimized {
    height: 55px; /* Optimal height for header */
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.bray-logo-optimized:hover {
    transform: scale(1.05);
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .bray-logo-optimized {
        height: 40px;
    }
}

/* Ensure Logo Container doesn't constrain it weirdly */
.logo, .bray-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    border: none !important;
}

/* Hide old text elements if they somehow remain */
.troba-logo-mark, .logo-text {
    display: none !important;
}

/* Logo Fixes */
.bray-logo-optimized {
    height: 45px;
    width: auto;
    display: block;
}
@media (max-width: 768px) {
    .bray-logo-optimized {
        height: 35px;
    }
}
