/*
 * case-studies-2.css
 * Premium Shared Stylesheet for Cybrosys Case Study pages.
 * EXACT ORIGINAL STYLE RESTORED — Wider Container & Footer Right Alignment Added.
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES
============================================================ */
:root {
    --red:        #B22126;
    --red-dark:   #8e1a1f;
    --red-light:  #f9e8e8;
    --text-dark:  #1a1a2e;
    --text-mid:   #4b5563; 
    --text-light: #6b7280;
    --bg-white:   #ffffff;
    --bg-off:     #f9fafb;
    --border:     #e5e7eb;
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.05);
    --shadow-md:  0 10px 30px rgba(0,0,0,0.08); 
    --shadow-red: 0 10px 25px rgba(178,33,38,0.12);
    --radius:     14px;
    --radius-sm:  10px;
}

/* ============================================================
   GLOBAL RESET & BASE
============================================================ */
html { scroll-behavior: smooth; }

body { 
    padding-top: 110px; 
    width: 100%; 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-white);
}

#form1 { width: 100%; }

.cs-hero,
.cs-section,
.cs-page {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.85; 
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.cs-page {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.cs-page *,
.cs-page *::before,
.cs-page *::after {
    box-sizing: border-box;
}

.cs-page img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
    border-radius: var(--radius-sm);
}

/* ============================================================
   WRAPPERS
============================================================ */
.cs-wrap {
    max-width: 1300px; /* INCREASED TO REDUCE LEFT/RIGHT GAPS */
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ============================================================
   HERO SECTION — High Impact
============================================================ */
.cs-hero {
    background: linear-gradient(145deg, #ffffff 0%, #fef4f4 50%, #ffffff 100%);
    padding: 80px 0 100px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.cs-hero-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    position: relative;
    z-index: 5;
}

.cs-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--red-light);
    color: var(--red);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(178,33,38,0.1);
}

.cs-hero h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(38px, 6vw, 56px); 
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.cs-hero h1 span { color: var(--red); }

.cs-hero .cs-hero-sub {
    font-size: 20px; 
    color: var(--text-mid);
    margin-bottom: 16px;
    font-weight: 500;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cs-hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
}

.cs-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cs-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.cs-badge-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--red); }

/* ============================================================
   TYPOGRAPHY
============================================================ */
.cs-body-text {
    max-width: 900px;
    margin: 0 auto 32px;
    font-size: 16.5px; 
    color: var(--text-mid);
    line-height: 1.9;
}

.cs-sec-head {
    text-align: center;
    margin-bottom: 56px;
}

.cs-sec-head h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.cs-sec-head h2::after {
    content: '';
    display: block;
    width: 60px; height: 5px;
    background: var(--red);
    border-radius: 10px;
    margin: 12px auto 0;
}

.cs-sec-head p {
    font-size: 16px;
    color: var(--text-light);
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.8;
}

.cs-sub-heading {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 48px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ============================================================
   SECTION VARIANTS
============================================================ */
.cs-section        { padding: 80px 0; }
.cs-section--alt   { background: var(--bg-off); }
.cs-section--red   { background: var(--red); }

.cs-section--red .cs-sec-head h2 { color: #fff; }
.cs-section--red .cs-sec-head h2::after { background: rgba(255,255,255,0.5); }
.cs-section--red .cs-sec-head p { color: rgba(255,255,255,0.8); }

/* ============================================================
   HIGHLIGHT BOX
============================================================ */
.cs-highlight {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-left: 5px solid var(--red);
    border-radius: var(--radius);
    padding: 32px;
    margin: 40px 0;
    box-shadow: var(--shadow-sm);
}

.cs-highlight h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cs-highlight h4 svg { color: var(--red); }

.cs-highlight ul { list-style: none; margin: 0; padding: 0; }

.cs-highlight li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    font-size: 16.5px; 
    color: var(--text-mid);
    border-bottom: 1px solid #f1f5f9;
}

.cs-highlight li:last-child { border-bottom: none; }

.cs-highlight li::before {
    content: '';
    flex-shrink: 0;
    width: 20px; height: 20px;
    margin-top: 3px;
    background: var(--red);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

.cs-highlight li strong { color: var(--text-dark); font-weight: 700; }

/* ============================================================
   GRID SYSTEM
============================================================ */
.cs-grid {
    display: grid;
    gap: 24px;
    margin: 32px 0;
}

.cs-grid--4 { grid-template-columns: repeat(4, 1fr); }
.cs-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cs-grid--2 { grid-template-columns: repeat(2, 1fr); }

/* Standard Cards */
.cs-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cs-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #f7dada; }

.cs-card-icon {
    width: 50px; height: 50px;
    background: var(--red-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--red);
}

.cs-card-icon svg,
.cs-card-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.cs-card h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.cs-card ul { list-style: none; margin: 0; padding: 0; }

.cs-card li {
    font-size: 15px; 
    color: var(--text-mid);
    padding: 7px 0;
    border-bottom: 1px dotted #e5e7eb;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.6;
}

.cs-card li:last-child { border-bottom: none; }
.cs-card li::before {
    content: '•'; color: var(--red); font-weight: 900; font-size: 20px; line-height: 1; margin-top: -2px;
}

/* Module specialized card */
.cs-module {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-top: 4px solid var(--red);
    border-radius: var(--radius-sm);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.cs-module-icon {
    width: 44px; height: 44px;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.cs-module-icon svg,
.cs-module-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.cs-module h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 17px; 
    font-weight: 700;
    margin-bottom: 12px;
}

.cs-module li { font-size: 16px; color: var(--text-mid); margin-bottom: 8px; }

/* ============================================================
   BULLET LIST
============================================================ */
.cs-bullet-list { list-style: none; margin: 24px 0; padding: 0; }

.cs-bullet-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    font-size: 16.5px;
    color: var(--text-mid);
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.8;
}

.cs-bullet-list li:last-child { border-bottom: none; }

.cs-bullet-list li::before {
    content: '';
    flex-shrink: 0;
    width: 8px; height: 8px;
    background: var(--red);
    border-radius: 50%;
    margin-top: 10px;
}

.cs-bullet-list li strong { color: var(--text-dark); font-weight: 700; }

/* ============================================================
   TIMELINE
============================================================ */
.cs-timeline {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    padding: 20px 0;
}

.cs-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--red) 0%, #e5e7eb 100%);
}

.cs-tl-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    position: relative;
}

.cs-tl-num {
    flex-shrink: 0;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(178,33,38,0.25);
    z-index: 2;
}

.cs-tl-body {
    flex: 1;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 30px;
    box-shadow: var(--shadow-sm);
    margin-top: 10px;
}

.cs-tl-body h4 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.cs-tl-body p {
    font-size: 16px;
    color: var(--text-mid);
    line-height: 1.7;
}

.cs-tl-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--red);
    background: var(--red-light);
    padding: 3px 10px;
    border-radius: 5px;
    margin-bottom: 8px;
}

/* ============================================================
   METRICS SECTION
============================================================ */
.cs-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 40px 0;
    box-shadow: var(--shadow-sm);
}

.cs-metric {
    padding: 40px 20px;
    text-align: center;
    border-right: 1px solid var(--border);
}

.cs-metric:last-child { border-right: none; }

.cs-metric-num {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 46px;
    font-weight: 800;
    color: var(--red);
    margin-bottom: 8px;
    line-height: 1;
}

.cs-metric-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

/* ============================================================
   TABLES — Robust & Responsive
============================================================ */
.cs-table-wrap {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin: 32px 0;
}

.cs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 15px;
}

.cs-table th {
    background: #f8fafc;
    color: var(--text-dark);
    font-weight: 700;
    text-align: left;
    padding: 16px 20px;
    border-bottom: 2px solid var(--border);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.03em;
}

.cs-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-mid);
    line-height: 1.6;
}

.cs-table tr:hover { background: #fbfbfc; }

/* ============================================================
   CTA BUTTONS
============================================================ */
.cs-cta-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.cs-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    border: none;
}

.cs-btn--white { background: #fff; color: var(--red); }
.cs-btn--white:hover {
    background: #fdf2f2;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.cs-btn--outline { 
    background: transparent; 
    color: #fff; 
    border: 2.5px solid rgba(255,255,255,0.6); 
}
.cs-btn--outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px);
}

/* ============================================================
   FOOTER OVERRIDES — FIXED & GUARANTEED
============================================================ */
#form1 .home-contact-wrapper *,
#form1 .home-footer * { box-sizing: border-box; }

#form1 #contactform > .row {
    display: flex !important; flex-wrap: wrap; align-items: stretch; margin: 0 !important;
}

#form1 .home-contact-details {
    display: flex !important; flex-wrap: wrap; align-items: flex-start; padding: 0 !important;
}

#form1 .home-contact-details .address-wrap {
    width: 50% !important; float: none !important; height: auto !important; padding: 4% 4% !important;
}

#form1 .home-contact-details p.address-head,
#form1 .home-contact-details .address-wrap h5 {
    margin: 0.5em 0 0.4em !important; font-family: Montserrat, sans-serif !important;
    font-size: 18px !important; color: #fff !important; font-weight: 700 !important;
}

#form1 .home-contact-details .address-wrap > p:not(.address-head) {
    height: auto !important; min-height: unset !important; font-family: 'Helvetica Neue', Arial !important;
    font-size: 14.5px !important; color: #9ca3af !important; line-height: 1.75 !important;
}

#form1 ~ .home-footer > div:first-child,
.home-footer > div:first-child { display: flex !important; flex-wrap: wrap; width: 100%; margin: 0 !important; }

.home-footer > div:first-child > .col-lg-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
.home-footer > div:first-child > .col-lg-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }

/* SAFE DESKTOP FIX: Puts the contact form on the right side */
@media (min-width: 992px) {
    #form1 .home-contact-wrapper .container > .row {
        display: flex !important;
        justify-content: space-between !important;
    }
    #form1 .home-contact-details {
        width: 50% !important;
        flex: 0 0 50% !important;
    }
    #form1 .ajax-contact-form,
    #form1 #contactform {
        width: 45% !important;
        flex: 0 0 45% !important;
        margin-left: auto !important; /* Pushes the form to the right */
    }
}

/* ============================================================
   RESPONSIVE DESIGN
============================================================ */

/* Laptop / Large Tablet (1024px) */
@media (max-width: 1024px) {
    .cs-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .cs-wrap { max-width: 940px; }
    .home-footer > div:first-child > .col-md-2 { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .home-footer > div:first-child > .col-md-4 { flex: 0 0 100%; max-width: 100%; margin-top: 20px; }
}

/* Tablet (768px) */
@media (max-width: 768px) {
    body { padding-top: 100px; }
    .cs-hero { padding: 60px 0 80px; }
    .cs-grid--3, .cs-grid--2 { grid-template-columns: 1fr; }
    .cs-metrics { grid-template-columns: repeat(2, 1fr); }
    .cs-metric:nth-child(2) { border-right: none; }
    .cs-metric:nth-child(1), .cs-metric:nth-child(2) { border-bottom: 1px solid var(--border); }
    
    #form1 .home-contact-details .address-wrap { width: 50% !important; }
}

/* Mobile (600px) */
@media (max-width: 600px) {
    .cs-hero h1 { font-size: 32px; }
    .cs-sec-head h2 { font-size: 26px; }
    .cs-sub-heading { font-size: 20px; }
    .cs-metrics { grid-template-columns: 1fr; }
    .cs-metric { border-right: none; border-bottom: 1px solid var(--border); }
    .cs-metric-num { font-size: 38px; }
    
    .cs-grid--4, .cs-grid--3, .cs-grid--2, .cs-grid { grid-template-columns: 1fr !important; }
    
    .cs-cta-row { flex-direction: column; }
    .cs-btn { width: 100%; justify-content: center; }
    
    #form1 .home-contact-details .address-wrap { width: 100% !important; padding: 20px !important; }
}

/* Small Mobile (380px) */
@media (max-width: 380px) {
    .cs-hero h1 { font-size: 26px; }
    .cs-wrap { padding: 0 16px; }
    .cs-badge { width: 100%; justify-content: center; }
}