/* About Us Section */
#about {
    background-color: #fff;
    padding: 50px 20px;
    text-align: center;
}

.section-title {
    font-family: "Raleway", serif;
    font-size: 2rem;
    color: #000;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-decoration: underline;
    letter-spacing: 2px;
}

.carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    padding-bottom: 10px;
    z-index: 10;
    position: relative;
    background: transparent;
    height: auto;
}

.indicator {
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
}
.indicator.active {
    background-color: #0487D9;
}


.card {
    flex: 0 0 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    background: white;
    border: 3px solid #0487D9;
    border-radius: 10px;
    overflow: hidden;
    /* Ensure content doesn't overflow */
    word-wrap: break-word;
    /* Prevent long words from overflowing */
}

.cta-text {
    text-align: center !important;
    font-weight: bold;
}

/* Titles */
.card h3 {
    font-family: "Raleway", sans-serif;
    font-size: 1.5rem;
    color: #023859;
    margin-bottom: 10px;
    text-align: center;
}

/* General Rule: Vertically center content for specific cards */
.card:first-child,
.card:nth-child(2),
.card:nth-child(3) {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    /* Allow cards to adjust height dynamically */
    min-height: 400px;
    /* Set a minimum height for consistency */
    padding: 20px;
    /* Consistent padding */
}

/* Company Overview Card: Vertically center the paragraph */
.card:first-child {
    justify-content: flex-start;
    /* Keep the title at the top */
    padding: 20px;
    position: relative;
    /* Enable positioning for paragraph alignment */
}

.card:first-child p {
    margin: auto 0;
    /* Vertically center the paragraph within the card */
    text-align: left;
    font-family: "Roboto", sans-serif;
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    width: 100%;
}

/* Ensure the title (h3) of the Company Overview and Mission Statement cards stays at the top */
.card:first-child h3,
.card:nth-child(2) h3 {
    margin-bottom: 15px;
    /* Space below the title */
    align-self: center;
    /* Keep title centered horizontally */
}

/* Vertically center the Mission Statement paragraph */
.card:nth-child(2) .mission {
    margin: auto 0;
    /* Vertically center the mission paragraph */
    text-align: center;
    font-family: "Raleway", serif;
    font-style: italic;
    font-size: 1.2rem;
    color: #0487D9;
    line-height: 1.6;
    max-width: 70%;
    /* Optional: Reduce width for better visual balance */
    height: auto;
    /* Prevent shrinking */
}

/* Ensure content is vertically centered for the Core Values card */
.card:nth-child(3) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertically center the content (excluding the title) */
    align-items: center;
    /* CHANGED from flex-start to center */
    height: auto;
    min-height: 400px;
    /* Maintain consistent height with other cards */
    padding: 20px;
    /* Maintain consistent padding */
    position: relative;
    /* Enable positioning for the title */
}

/* Paragraphs (p) */
.card p {
    font-family: "Roboto", sans-serif;
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    text-align: left;
    width: 100%;
}

/* Core Values Card: Adjust paragraph alignment */
.card:nth-child(3) p {
    margin: 10px 0;
    /* Add consistent spacing between paragraphs */
    text-align: left;
    /* Align the text to the left */
    line-height: 1.6;
    /* Maintain consistent line height */
    width: 100%;
    /* Span the full width of the card */
}

.card:nth-child(3) h3 {
    position: absolute;
    top: 20px;
    /* Position the title at the top of the card */
    left: 50%;
    /* Center the title horizontally */
    transform: translateX(-50%);
    /* Adjust for exact centering */
    margin-bottom: 15px;
    /* Add space below the title */
    text-align: center;
    /* Center the text within the title */
    width: 100%;
    /* Ensure the title spans the full card width */
}

/* Vertically center the content for the fourth card */
.card:nth-child(4) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertically center the content */
    align-items: center;
    /* Center align the content horizontally if needed */
    height: auto;
    min-height: 400px;
    /* Ensure consistent card height */
    padding: 20px;
    /* Maintain consistent padding */
}

/* Ensure paragraphs in the fourth card are styled appropriately */
.card:nth-child(4) p {
    text-align: left;
    /* Keep the text left-aligned */
    width: 100%;
    /* Ensure paragraphs span the full width of the card */
    line-height: 1.6;
    /* Maintain consistent line height */
    margin: 10px 0;
    /* Add spacing between paragraphs */
}


/* Responsive Adjustments */
@media (max-width: 835px) {
    .card h3 {
        font-size: 1.2rem;
        /* Adjust title size for smaller screens */
    }

    .card p,
    .card:first-child p,
    .card:nth-child(3) p,
    .card:nth-child(4) p {
        font-size: 0.9rem;
        /* Ensure all card paragraphs scale consistently */
    }

    .card:nth-child(2) .mission {
        font-size: 1.1rem;
        /* Slightly reduced mission statement */
    }
}

@media (max-width: 575px) {
    .card {
        padding: 15px;
        /* Reduce padding for smaller screens */
        min-height: auto;
    }

    .card p,
    .card:first-child p,
    .card:nth-child(3) p,
    .card:nth-child(4) p {
        font-size: 0.85rem;
        line-height: 1.4;
        /* Match line height and font size across all cards */
    }

    .card:nth-child(2) .mission {
        font-size: 1rem;
        line-height: 1.4;
    }
}

@media (max-width: 335px) {
    .card:nth-child(2) {
        padding: 15px;
        /* Adjust padding for smaller screens */
    }

    .card:nth-child(2) .mission {
        font-size: 1rem;
        /* Reduce font size */
        max-width: 90%;
        /* Allow more text width */
    }

    .card:nth-child(4) {
        padding: 15px;
        /* Adjust padding for smaller screens */
    }

    .card p,
    .card:first-child p,
    .card:nth-child(3) p,
    .card:nth-child(4) p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}
