
/* Case studies */

.header-section h2{
    color: var(--text);
} 

section {
    margin: 0 auto;
    padding: 0 2rem ;
}

[id] {
  scroll-margin-top: var(--header-height); 
  /*The selector [id] targets any element with an id attribute 
    This ensures that when the browser scrolls to an anchor, 
    it leaves room above the element. */
}


/* LAYOUT WRAPPER */
.layout-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-areas: "sidebar case-studies-section";
    min-height: 86vh;
    border: 1px solid #ccc;
}


.sidebar {
    background-color: var(--accent-50);
    grid-area: sidebar;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 2rem 1rem;
    border-right: 1px solid #ccc;
}

.case-studies-section{
    grid-area: case-studies-section;
    overflow-y: auto;
    padding-top: 2rem;
}

/* Responsive layout */
@media (max-width: 768px) {
    .layout-wrapper {
        grid-template-areas: 
            "case-studies-section"
            "sidebar";
        grid-template-columns: 1fr;
    }

    .sidebar{
        position: static;
        height: auto;
        border-right: none;
        border-top: 1px solid #ccc;        
    }
}


/* Sidebar components */
.sidebar {
    padding-top:var(--header-height);
    color: var(--text-100);
}

.sidebar-section h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #ccc;
}

.testimonial-list {
    list-style: none;
}

.testimonial-list li {
    padding: 0.5rem;
} 
 
.testimonial-list a {
    color: var(--text-100);
    text-decoration: none;
    padding: 6px 0;
    display: block;
    transition: color 0.3s ease;
}
 
.testimonial-list a:hover {
    color: var(--primary-500);
}


.case-studies {
    text-align: justify;
    line-height: 1.6;
}

.info h3 {
    text-decoration: underline;
    font-weight: 500;
    margin-top: 1rem;
    color: var(--primary-500);
}

.info strong {
    font-weight: 500;
}

/* CASE STUDIES */
 h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  gap: 1rem; /* spacing between lines and title */
  margin-top: 3rem;
}

.Company-Information h3 {
    text-align: center;
    font-size: 1.4rem;
}

/* ADDING Lines in title using pseudo elements */
 h2::before,
 h2::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--primary-200); /* solid line */
  height: 0; /* avoid affecting vertical spacing */
}




/* TABLES */
.tables{
    background-color: var(--background);
}

table{
    margin: auto;
     @media only screen and (min-width: 720px){
            width:80%;
    }
    align-items: center;
    justify-content: center;
}
table caption {
    font-weight: bold;
    text-decoration: underline;
    padding-bottom:1rem;
}

table, th, td {
    border: 1px solid rgb(133, 133, 133);
    border-collapse:collapse ;
    padding: 0.3rem;
}

thead {
    background-color: #e0e0e0;
}

tr:nth-child(even) {
  background-color: #f5f5f5;
}


/* ROI Section */
.roi-section, .customers-say {
    min-height: 40vh;
    display: block;
    margin: 0 auto;
    line-height: 2rem;
}

.roi-section ul {
    padding-left: 2em;
}


/* Responsive design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .navigation {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .layout-wrapper {
        display: grid;
        grid-template-areas: 
            "case-studies-section"
            "sidebar";
    }
    
    .sidebar {
        width: 100%;
        order: 2;           /* Move sidebar below content on mobile */
    }
    
    .main-content {
        order: 1;
        padding: 20px;
    }
}
 
@media (max-width: 480px) {
    .nav-link {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    
    .sidebar {
        padding: 20px 15px;
    }
    
    .main-content {
        padding: 15px;
    }
}