/* Base / Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Ensure anchors in-page account for fixed nav */
section {
    scroll-margin-top: 110px;
}

/* Make paragraph text fully justified (left and right) */
p {
    text-align: justify;
    text-justify: inter-word;
    text-align-last: left;
}

/* Keep small decorative text centered where appropriate */
.motto,
.section-subtitle,
.form-note {
    text-align: center !important;
}

/* Navbar */
.navbar {
    background: #003087; /* Deep blue */
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
}

/* keep hover styles unchanged */
.nav-menu a:hover, .nav-menu a.active {
    color: #ffd700;
}

.register-btn {
    background: #ffd700;
    color: #003087 !important;
    padding: 10px 20px !important;
    border-radius: 5px;
}

/* NAV CONTACT phones in gold */
.nav-contact {
    color: #ffd700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-icons a {
    color: white;
    margin: 0 8px;
    font-size: 18px;
    transition: 0.3s;
}

.social-icons a:hover {
    color: #ffd700;
    transform: scale(1.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 4px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    margin-top: 90px;
    text-align: center;
    position: relative;
}

.hero-content {
    padding: 40px 20px 80px 20px; /* extended bottom padding so blue box goes a bit below the slides */
    background: linear-gradient(rgba(0, 48, 135, 0.85), rgba(0, 48, 135, 0.9));
    color: white;
}

/* Title */
.hero-title-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px;
}

.hero-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 44px;
    color: #ffd700;
    text-shadow: 0 2px 6px rgba(0,0,0,0.2);
    line-height: 1.05;
}

/* inline logo placed before the title 'K' */
.title-inline-logo-before {
    height: 1.15em; /* roughly the same height as the letter K, slightly bigger */
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

/* separate styles for the 'K' to ensure proportion */
.title-k {
    font-weight: 800;
    letter-spacing: 0;
}

/* rest of the title text */
.title-rest {
    font-weight: 700;
}

/* motto */
.motto {
    font-size: 18px;
    font-style: italic;
    opacity: 0.95;
    color: #fff;
    margin-top: 6px;
}

/* hero intro */
.hero-intro {
    max-width: 1000px;
    margin: 18px auto 0 auto;
    color: #f1f5fb;
    font-size: 16px;
    line-height: 1.6;
}

/* Slideshow constrained to align with paragraph width */
.slideshow-container {
    max-width: 1000px; /* align with paragraph width */
    position: relative;
    margin: 20px auto 0 auto;
}

.slides {
    display: none;
    position: relative; /* needed for caption positioned inside */
    min-height: 320px; /* provide baseline so caption stays centered even if image loading is delayed */
    border-radius: 12px;     /* round the slide container */
    overflow: hidden;        /* ensure rounded corners clip the image and caption */
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.slides img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
    /* ensure the image itself obeys the rounded corners (defensive) */
    border-radius: 12px;
}

/* Slide caption overlay — centered in the image using flexbox (robust) */
.slide-caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0); /* keep background transparent so only inner box shows backdrop */
    pointer-events: none;
    padding: 0 12px;
}

.slide-caption > * {
    pointer-events: auto; /* allow selection/copy if needed for inner element */
}

/* inner caption box */
.slide-caption div, .slide-caption p, .slide-caption span {
    background: rgba(0,0,0,0.45);
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 20px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
    line-height: 1.2;
    letter-spacing: 0.2px;
}

/* make caption responsive */
@media (max-width: 720px) {
    .slide-caption div, .slide-caption p, .slide-caption span {
        font-size: 15px;
        padding: 8px 12px;
        border-radius: 8px;
    }
}

.fade {
    animation: fade 1.5s;
}

@keyframes fade {
    from {opacity: 0.4}
    to {opacity: 1}
}

.dots {
    text-align: center;
    padding: 20px;
}

.dot {
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.6s ease;
    border: none;
}

.dot.active, .dot:hover {
    background-color: #003087;
}

/* Mobile Responsive Menu */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 90px;
        flex-direction: column;
        background-color: #003087;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-contact {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        font-size: 13px;
    }

    .hamburger {
        display: flex;
    }

    .hero-content {
        padding: 30px 12px 60px 12px;
    }

    .hero-title {
        font-size: 30px;
    }

    .hero-intro {
        padding: 0 12px;
        font-size: 15px;
    }

    .slideshow-container {
        max-width: 100%;
        padding: 0 12px;
        box-sizing: border-box;
        margin: 16px auto 0 auto;
    }

    .title-inline-logo-before {
        height: 1em;
        margin-right: 8px;
    }
}

/* PROGRAMMES SECTION */
.programmes {
    padding: 80px 20px;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 38px;
    color: #003087;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: #555;
    margin-bottom: 20px;
    font-style: italic;
}

/* programmes intro paragraph */
.programmes-intro {
    max-width: 1000px;
    margin: 0 auto 28px auto;
    color: #444;
    font-size: 16px;
    line-height: 1.6;
    text-align: justify;
}

/* Programmes Grid */
.programmes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Programme card layout: use flex column so Read more button can sit at bottom when collapsed */
.programme-card {
    background: white;
    padding: 40px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 420px; /* ensure consistent card height so buttons align across cards */
}

/* hover lift */
.programme-card:hover {
    transform: translateY(-10px);
}

.card-icon {
    font-size: 50px;
    color: #003087;
    margin-bottom: 20px;
}

.programme-card h3 {
    font-size: 24px;
    color: #003087;
    margin-bottom: 18px;
}

/* List inside card */
.programme-card ul {
    text-align: left;
    list-style: none;
    flex: 0 0 auto;
    margin-bottom: 12px;
}

.programme-card ul li {
    padding: 8px 0;
    font-size: 16px;
    color: #444;
    position: relative;
    padding-left: 25px;
}

.programme-card ul li:before {
    content: '✓';
    color: #ffd700;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Read-more button styling */
.read-more-btn {
    background: #06357a; /* deep blue */
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    border: 2px solid rgba(0,0,0,0.06);
    cursor: pointer;
    font-size: 15px;
    margin-top: auto; /* push to bottom when collapsed */
    align-self: center; /* center horizontally */
    transition: background 0.15s, transform 0.12s;
    box-shadow: 0 6px 16px rgba(0,48,135,0.12);
}

.read-more-btn:hover {
    background: #032e6d;
    transform: translateY(-2px);
}

/* Expanded content block */
.more-content {
    margin-top: 16px;
    text-align: left;
    color: #333;
    line-height: 1.6;
    /* When visible it just flows below the button (button stays above the content) */
}

/* When hidden keep space minimal */
.more-content[hidden] {
    display: none;
}

/* Ensure cards have consistent spacing for smaller devices */
@media (max-width: 720px) {
    .programme-card { min-height: 360px; padding: 24px; }
    .read-more-btn { padding: 8px 14px; }
}

/* REGISTRATION FORM STYLES */
.registration {
    padding: 60px 20px;
    background: #fff;
    border-top: 6px solid rgba(0,48,135,0.05);
}

.registration .container {
    text-align: left;
}

/* Center the registration title specifically */
.registration .section-title {
    text-align: center;
    margin-bottom: 8px;
}

.registration-form {
    margin: 0 auto;
    max-width: 720px;
    background: #fdfdfd;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.form-row {
    margin-bottom: 18px;
}

.form-row label {
    display: block;
    font-weight: 600;
    color: #003087;
    margin-bottom: 8px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d3d7db;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row input:focus, .form-row textarea:focus {
    border-color: #003087;
    box-shadow: 0 0 0 3px rgba(0,48,135,0.07);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.required {
    color: #c0392b;
    margin-left: 4px;
    font-weight: bold;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.btn-submit {
    background: #003087;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    transition: transform 0.15s, background 0.15s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    background: #00205f;
}

.form-message {
    margin-top: 12px;
    font-weight: 600;
    color: #003087;
}

/* ABOUT SECTION */
.about {
    padding: 60px 20px;
    background: #f7fafc;
}

.about-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 30px;
    align-items: stretch; /* ensure both columns match height */
    max-width: 1200px;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* Make the about text vertically balanced with the image.
   Use flex column so the paragraph can center/space as needed. */
.about-text {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertically center the text relative to the image */
}

.about .section-title {
    text-align: left;
    margin-bottom: 12px;
}

.about-paragraph {
    color: #333;
    font-size: 16px;
    margin-bottom: 14px;
    line-height: 1.7;
}

/* CONTACT SECTION */
.contact {
    padding: 60px 20px;
    background: #fff;
    border-top: 6px solid rgba(0,48,135,0.04);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 30px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.map-wrapper {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.map-frame {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
}

/* Contact details - use per-item grid to align labels and content reliably */
.contact-details {
    padding: 20px;
    background: #fdfdfd;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.contact-info-list {
    display: block;
    margin-top: 25px;
    font-size: 16px;
}

/* Each item is a grid row with two columns: label and content.
   Using per-item grid ensures consistent behavior across hosts/browsers. */
.contact-info-item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 10px 20px;
    align-items: center;
    margin-bottom: 14px;
}

.contact-info-list dt {
    font-weight: 700;
    color: #003087;
    text-align: right;
    padding-right: 8px;
    line-height: 1.5;
}

.contact-info-list dd {
    margin: 0;
    color: #333;
    line-height: 1.6;
    text-align: left; /* ensure actual details are left aligned */
    font-weight: 400; /* normal weight */
}

/* Mobile responsive – stack vertically */
@media (max-width: 768px) {
    .contact-info-item {
        grid-template-columns: 1fr;
    }

    .contact-info-list dt {
        text-align: left;
        font-weight: 600;
        color: #003087;
    }
}

/* FOOTER */
.site-footer {
    background: #003087;
    color: #ffd700; /* footer paragraph text remains gold where used */
    padding: 22px 0;
    margin-top: 30px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-left p {
    margin-bottom: 6px;
    color: #ffd700;
}

.footer-left .small {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* footer social removed from HTML; ensure any leftover links show gold */
.footer-social a {
    color: #ffd700;
    margin-left: 8px;
    font-size: 18px;
    text-decoration: none;
}

/* Footer nav: default white, turn gold on hover/active/focus */
.footer-nav a {
    color: #ffffff; /* white by default */
    text-decoration: none;
    margin-left: 12px;
    font-weight: 600;
    transition: color 0.15s;
}

.footer-nav a:hover,
.footer-nav a:focus,
.footer-nav a:active {
    color: #ffd700; /* gold on hover/click/focus */
}

/* Responsive tweaks */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about .section-title {
        text-align: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .map-frame {
        min-height: 260px;
    }

    .footer-grid {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .footer-nav a {
        margin-left: 8px;
    }
}