/* ============================== */
/* Importing Google Fonts */
/* ============================== */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&display=swap');

/* ============================== */
/* Root Variables */
/* ============================== */
:root {
    --bs-primary: #310627; /* Dark blue */
    --dark-blue: #003366; /* Dark blue for navbar and footer */
    --accent-yellow: #ffcc00; /* Yellow for buttons and accents */
}

/* ============================== */
/* General Styles */
/* ============================== */
body {
    padding-top: 70px; /* Offset for fixed navbar */
    background-color: #f9f9f9;
    color: #333;
    font-family: 'Ubuntu', sans-serif; /* Updated font-family */
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, p {
    margin: 0;
}

/* ============================== */
/* Navbar */
/* ============================== */
.navbar {
    background-color: #310627;
}

.navbar-logo {
    max-height: 50px;
    width: auto;
}

.navbar-nav .nav-link {
    color: #fff;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-yellow);
}

.navbar-nav .btn-outline-light {
    border: none;
    background: none;
    color: #fff;
}

.navbar-nav .btn-outline-light:hover {
    background: rgba(255, 204, 0, 0.2);
    color: var(--accent-yellow);
}

/* ============================== */
/* Hero Section */
/* ============================== */
.hero {
    background-color: #fff;
    color: #000;
    padding: 40px 0; /* Adds spacing around the section */
}

.hero .row {
    display: flex;
    align-items: stretch; /* Ensures both sides stretch to the same height */
}

.hero .col-lg-6 {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically centers the text content */
}

.hero .col-lg-5 {
    display: flex;
    align-items: center; /* Center image vertically */
    justify-content: center;
}

.hero .col-lg-5 img {
    width: 100%; /* Ensures the image takes the full width */
    max-height: 100%; /* Matches the height to the content */
    border-radius: 8px;
    margin-top: 80px;
}

.hero h2 {
    font-size: 1.7rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.4;
}

.hero p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.hero .btn-yellow {
    background-color: #ffcc00;
    color: #003366;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero .btn-yellow:hover {
    background-color: #e6b800;
    color: #fff;
}

/* ============================== */
/* Our Team Section */
/* ============================== */
#our-team h2 {
    font-size: 2.2rem;
    font-weight: bold;
    color: #0056b3;
    position: relative;
    text-align: center;
}

.our-team .speaker {
    cursor: pointer;
    transition: transform 0.3s;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.our-team .speaker:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.speaker-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--accent-yellow);
}

.our-team h3 {
    font-size: 1.2em;
    margin-bottom: 5px;
}

.our-team p {
    font-size: 0.8em;
    color: gray;
}

.our-team .row {
    row-gap: 40px;
    column-gap: 30px;
}

/* ============================== */
/* Book Catalog Section */
/* ============================== */
.books .book-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
    border-bottom: 2px solid #f0f0f0;
}

.books .card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.books .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.books .card-title {
    font-size: 1.1rem;
    font-weight: bold;
}

.books .card-text {
    font-size: 0.95rem;
    color: #555;
}

/* ============================== */
/* Section - Grey Background */

.benefits-section {
    background-color: #e2e3e5;
    padding: 60px 20px; /* Padding top and bottom */
}

/* Section Spacing */
.section-grey {
    background-color: #e2e3e5;
    padding: 60px 20px; /* Padding top and bottom */
}

.section-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--bs-primary);
    margin-bottom: 20px; /* Space below heading */
}

.section-grey p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px; /* Spacing between paragraphs */
    color: #333;
}

.section-grey a {
    color: var(--bs-primary);
    text-decoration: underline;
    transition: color 0.3s;
}

.section-grey a:hover {
    color: var(--accent-yellow);
    text-decoration: none;
}

/* ============================== */
/* Footer */
/* ============================== */
footer, .footer {
    background-color: #310627;
    color: white;
    text-align: center;
    padding: 1rem 0;
}

footer a, .footer a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover, .footer a:hover {
    color: var(--accent-yellow);
    text-decoration: none;
}

/* ============================== */
/* Modals */
/* ============================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 30px;
    cursor: pointer;
}

.close:hover {
    color: #000;
    text-decoration: none;
}

/* ============================== */
/* Responsive Adjustments */
/* ============================== */

/* Large Tablets and Small Desktops */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2rem;
    }

    .our-team .speaker {
        padding: 15px;
    }

    .books .book-image {
        height: 180px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        padding: 40px 20px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

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

    .speaker-img {
        width: 120px;
        height: 120px;
    }

    .books .book-image {
        height: 160px;
    }

    .icon-section {
        padding: 50px 20px;
    }

    .icon-section .card {
        margin-bottom: 20px;
    }
}

/* Mobile Devices */
@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .speaker-img {
        width: 100px;
        height: 100px;
    }

    .books .book-image {
        height: 140px;
    }

    .icon-section .card-title {
        font-size: 1rem;
    }

    .icon-section .card-text {
        font-size: 0.9rem;
    }

    footer {
        padding: 10px 0;
    }

    .section-grey {
        padding: 40px 20px;
    }
}

/* Add these or update existing styles inside <style> */
@media (max-width: 767.98px) {
    .table th,
    .table td {
        white-space: nowrap;       /* Prevent breaking into multiple lines */
        font-size: 14px;           /* Slightly smaller text */
        padding: 8px !important;   /* More compact padding */
    }
}

/* Custom styles for table responsiveness */
/* Ensure horizontal scrolling without squishing */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
}

/* Remove fixed layout for dynamic table resizing */
.table {
    width: 100%; /* Let it fill available space */
    table-layout: auto; /* Auto layout for flexible column widths */
}

/* Prevent squishing and allow text wrapping inside cells */
.table th, .table td {
    word-wrap: break-word; /* Allow text to break onto next line */
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px;
}

/* Apply a minimum width for columns so they do not shrink too much */
.table th, .table td {
    min-width: 150px; /* You can adjust this depending on your content */
}

/* Optional: Fixed header for scrolling tables */
.table thead th {
    position: sticky;
    top: 0;
    background-color: #310627; /* Sticky header background */
    z-index: 1;
}

/* Remove unnecessary styles for a clean table */
.table th, .table td {
    white-space: normal; /* Allow wrapping inside cells */
    text-align: center;
}
