* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* This hides the horizontal scrollbar */
}
/* --- 1. General Setup & Typography --- */
body {
    margin: 0;
    /* Clean, professional sans-serif stack */
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa; /* Slightly softer white */
    color: #4a4a4a; /* Easier to read than pure black */
    line-height: 1.6;
}

h1, h2, h3 {
    color: #2c3e50; /* Deep Academic Navy */
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
}

/* --- 2. Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: #5895d1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;       /* Allows links to move to a new line instead of being cut off */
    justify-content: center; /* Keeps everything centered on the screen */
    gap: 15px;             /* Reduced slightly from 25px to save space */
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: opacity 0.3s;
    white-space: nowrap;   /* Ensures your button text doesn't break onto two lines */
    padding: 5px 0;        /* Makes the "tap" area a bit bigger for fingers */
}

/* Mobile Tweak: When the screen is narrower than 600px */
@media (max-width: 600px) {
    .nav-links {
        gap: 10px;         /* Tightens the space further on phones */
    }
    
    .nav-links a {
        font-size: 0.9rem; /* Slightly smaller font to help everything fit */
    }
}

.nav-links a:hover {
    opacity: 0.8;
}

/* --- 3. The Hero Section --- */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50vh;
    background-image: url('CABC hero-bg.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: white;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.hero-container {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: flex-end; /* Keeps text in that top-right gap */
    padding: 0 20px 250px 0;  /* Change the 3rd number (bottom) to push text up */
    /* Original was likely: padding: 0 20px; */
}

.hero-content {
    text-align: right;
    max-width: 450px;
}

.hero-content h1 {
    font-size: 2.8rem;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.2rem;
    color: #555;
    font-style: italic;
}

/* --- 4. The Professional Module Cards --- */
.features {
    display: flex;
    flex-direction: row; /*This forces them to sit side by side*/
    justify-content: center;
    align-items: flex-start; 
    flex-wrap: wrap; /* Allows cards to wrap on smaller screens */
    gap: 30px;
    padding: 60px 20px;
    max-width: 100%; /*Limits how wide the 'row'can get. was 1200px*/
    margin: 0 auto;   /*Centre the whole row on the screen*/
    background-color: #ffffff;
}

.module-card {
    background: #ffffff;
    flex: 1;  /* Tells cards to grow and fill the space */
    min-width: 300px; /*Prevents them getting too thin*/
    max-width: 350px; /*Prevents them getting too fat.*/
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    border-left: 6px solid #007bff; /* Clinical Blue Accent */
    width: 300px;
    text-align: left; /* Switched to left-aligned for readability */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

/* --- 5. Buttons & Accents --- */
.cta-button {
    background-color: #007bff;
    color: white !important;
    padding: 14px 28px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin-top: 15px;
    transition: background 0.3s;
}

.cta-button:hover {
    background-color: #0056b3;
}

.badge {
    display: inline-block;
    background-color: #eef6ff;
    color: #007bff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* --- 6. Footer --- */
.site-footer {
    background-color: #2c3e50;
    color: #bdc3c7;
    text-align: center;
    padding: 50px 20px;
    font-size: 0.9rem;
}

.site-footer p { margin-bottom: 10px; }

.social-links a {
    color: #5895d1;
    margin: 0 12px;
    text-decoration: none;
    font-weight: bold;
}

.social-links a:hover {
    text-decoration: underline;
}

/* Fix for anchor links landing too high */
[id] {
    scroll-margin-top: 100px;
}
/* --- GALLERY GRID STYLES --- */
.gallery-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.image-grid {
    display: grid;
    /* This creates the 'small pictures' look by making 4 columns on desktop */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.image-grid img {
    width: 100%;
    height: 150px; 
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    /* This ensures the zoom is smooth, not a jump */
    transition: transform 0.4s ease-in-out; 
    /* Important: this keeps the image 'contained' until we hover */
    position: relative; 
    z-index: 1;
}

.image-grid img:hover {
    /* Enlarges the image to 3x the size */
    transform: scale(3); 
    /* Pulls the zooming image to the very front */
    z-index: 100; 
    /* Adds a shadow to make the zoomed image 'pop' off the page */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 2px solid white;
}

/* --- THE MODAL (Pop-up Image) STYLES --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    padding-top: 50px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.9); 
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 100%; /*700px*/
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
/* Keep your existing .cta-button as it is, and add this below it */
.cta-button.secondary {
    background-color: #6c757d; /* Professional Gray */
}

.cta-button.secondary:hover {
    background-color: #5a6268;
}
/* 1. Make the card a relative container */
.module-card {
    position: relative; /* This is the 'anchor' for the stretched link */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* Makes the whole card show the pointer hand */
}

/* 2. Create the 'Stretched Link' effect */
.module-card a::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1; /* Spreads the link over the whole card area */
}
/* Styling for the specific Contact button in the Nav */
.nav-contact-btn {
    background-color: transparent;
    border: 2px solid white;
    padding: 8px 18px;
    border-radius: 5px;
    transition: all 0.3s ease !important;
}

.nav-contact-btn:hover {
    background-color: white;
    color: #5895d1 !important; /* Matches your navbar blue */
    opacity: 1 !important;
}
/* LEARNING OBJECTIVES BOX */
.learning-objectives {
    background-color: #f9fbfd; /* Clean, professional off-white/blue */
    border-left: 6px solid #2c3e50; /* Strong dark blue accent */
    padding: 30px;
    margin: 40px auto;
    max-width: 100%; /*was 900px*/
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: left;
}

.learning-objectives h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.6rem;
    border-bottom: 2px solid #eef2f7;
    padding-bottom: 10px;
}

.learning-objectives ul {
    list-style-type: none;
    padding: 0;
}

.learning-objectives li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
    line-height: 1.6;
    color: #333;
}

/* Custom Bullet Point: A small blue arrow or dot */
.learning-objectives li::before {
    content: "→";
    color: #5895d1;
    font-weight: bold;
    position: absolute;
    left: 5px;
    font-size: 1.2rem;
}
/* Styling the inner box to "pop" against the gray background */
.learning-objectives {
    background-color: #ffffff; /* White background */
    padding: 20px 25px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #2c3e50; /* Darker blue accent to differentiate from the light blue outer border */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* Subtle shadow so it looks 'lifted' */
}

.learning-objectives h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-top: 0;
}

.learning-objectives ul {
    list-style-type: none; /* Removes standard bullets */
    padding-left: 0;
}

.learning-objectives li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    line-height: 1.5;
    color: #333;
}

/* Custom Arrow Bullet */
.learning-objectives li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #007bff; /* Matches your outer border color */
    font-weight: bold;
}
@media (max-width: 768px) {
    /* 1. Adjust the Hero Container */
    .hero-container {
        display: flex;
        justify-content: flex-start; /* Aligns content to the top */
        align-items: flex-end;      /* Aligns content to the right (if using column-reverse) */
        padding: 20px;               /* Adds a margin from the edge. Was 20px */
        min-height: 20vh;           /* Makes the hero shorter on phones.*/
        background-position: center; /* Keeps the main part of the photo visible */
    }

    /* 2. Style the Hero Text Box */
    .hero-content {
        max-width: 48%;             /* Makes the box smaller so it doesn't fill the screen. was 70% */
        margin-left: auto;          /* Pulls the box to the right side */
        margin-right: 5px;          /* Tucks it into the corner */
        margin-top: 10px;           /* Pulls it toward the top. Was 10px */
        padding: 10px 15px;         /* was 15px*/
        background: rgba(0, 0, 0, 0.4); /* Slightly more transparent to see the photo through it */
    }

    /* 3. Shrink the Title and Text */
    .hero-content h1 {
        font-size: 0.7rem;          /* Much smaller title to fit the 40% box */
        word-wrap: break-word;  /* Forces the word to break if it absolutely has to */
         overflow-wrap: break-word;
         max-width: 100%;        /* Ensures it stays within the grey box */
        display: block;
        margin: 0;color: rgb(163, 33, 33);               /* Ensure it stays bright against the dark tint */
        margin-bottom: 4px;
        line-height: 1.1;           /* Slightly tighter than default */
        text-align: left;
    }

    .hero-content p {
        font-size: 0.7rem;          /* Smaller description */
        line-height: 1.2;           /* 0.75 was likely too tight; 1.2 is readable */
        margin-bottom: 0;
        color: #f0f0f0;             /* Light grey/white for readability */
    }

    /* 4. Shrink the Button */
    .hero-content .btn {
        display: inline-block;
        padding: 4px 8px;
        font-size: 0.6rem;          /* 0.3rem is likely invisible; 0.6rem is tiny but tapable */
        margin-top: 6px;
        line-height: 1;
    }
}