* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #0d0d0d;
    color: white;
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: #111;
    border-bottom: 2px solid #e91e63;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 60px;
    height: 60px;
    margin-right: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    color: #e91e63;
}

/* Dropdown Menu for Services */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #111;
    min-width: 150px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    list-style: none;
    border-bottom: 2px solid #e91e63;
}

.dropdown-menu li {
    padding: 10px 20px;
}

.dropdown-menu a {
    color: white;
    text-decoration: none;
    display: block;
}

.dropdown-menu a:hover {
    color: #e91e63;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.content-section {
    padding: 60px 20px;
    max-width: 1100px;
    margin: auto;
    color: white;
}

.content-section h2 {
    color: #e91e63;
    margin-bottom: 20px;
}

#services h2 {
    color: white;
}

#services h3 {
    color: #e91e63;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 8px;
}

a {
    color: #e91e63;
}

footer {
    text-align: center;
    padding: 20px;
    background: #111;
    border-top: 2px solid #e91e63;
}

.about-image {
    text-align: center;
    margin: 40px 0;
}

.about-image img {
    width: 95%;
    max-width: 500px;
}

.about-image img:hover {
    transform: scale(1.02);
}

/* --- About section split layout --- */
.about-section {
    padding: 80px 20px;
    background: #1a1a1a;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    color: #e91e63;
    font-size: 2em;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.05em;
    line-height: 1.8;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    width: 100%;
    max-width: 450px;
    border-radius: 12px;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.03);
}

/* --- Qualifications text with faded background image (fixed cutoff) --- */
.qualifications-text {
    max-width: 1100px;
    margin: 20px auto 0;
    position: relative; /* For pseudo-element positioning */
    padding: 40px 20px; /* Add padding for content spacing */
    background-image: url('library.jpg');
    background-size: contain; /* Changed to contain to prevent cutoff */
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px; /* Optional: soft edges */
}

.qualifications-text::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 13, 0.75); /* Semi-transparent dark overlay to fade the image and ensure text readability (adjust opacity as needed, e.g., 0.75 for 75% fade) */
    z-index: 1;
}

.qualifications-text > * {
    position: relative; /* Ensure content is above the overlay */
    z-index: 2;
}

.qualifications-text p {
    font-weight: 600;
    margin-bottom: 10px;
    color: #e91e63;
}

/* Services list styling to match qualifications */
.services-list {
    max-width: 1100px;
    margin: 20px auto 0;
    position: relative;
    padding: 40px 20px;
    border-radius: 8px;
    overflow: hidden;
}

.services-list ul {
    list-style-type: disc;
    padding-left: 20px;
}

.services-list li {
    margin-bottom: 8px;
}

.services-list strong {
    color: white;
    font-weight: 600;
}

/* More whitespace in services */
.content-section h3 { 
    margin-bottom: 15px; 
}

/* Read More Button */
.brochure-btn {
    background: #e91e63;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.brochure-btn:hover {
    background: #c2185b;
}

/* Blog Section Styles */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-post {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #e91e63;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.2);
}

.blog-post h3 {
    color: #e91e63;
    font-size: 1.4em;
    margin-bottom: 10px;
}

.blog-meta {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.blog-post p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.blog-link {
    display: inline-block;
    background: #e91e63;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.blog-link:hover {
    background: #c2185b;
}

/* Full Blog Post Styles (for individual post pages) - Integrated */
.blog-full-post {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px 30px;
    background: #1a1a1a url('blog-bg.jpg') no-repeat center/cover; /* Adjust filename/path if your image is named differently */
    border-radius: 8px;
    border-left: 4px solid #e91e63;
    line-height: 1.5; /* Tightened for less spread */
    font-size: 0.95em; /* Slightly smaller fonts */
    position: relative;
    overflow: hidden;
}

/* Overlay for background image readability */
.blog-full-post::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 13, 0.8); /* Dark overlay (tweak opacity if too dark) */
    z-index: 1;
}

.blog-full-post > * {
    position: relative;
    z-index: 2; /* Content above overlay */
}

.blog-full-post h1 {
    color: #e91e63;
    font-size: 2em; /* Smaller than original */
    margin-bottom: 20px;
    text-align: center;
}

.blog-full-post .blog-meta {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 30px;
    text-align: center;
}

.blog-full-post p {
    margin-bottom: 18px; /* Reduced spacing */
    line-height: 1.5;
    text-align: justify;
}

.blog-full-post ol, .blog-full-post ul {
    margin-bottom: 20px; /* Less spread for lists */
    padding-left: 20px;
}

.blog-full-post ol li, .blog-full-post ul li {
    margin-bottom: 8px; /* Tighter list items */
    line-height: 1.4;
    padding-left: 3px;
}

.blog-full-post ol {
    list-style-position: outside;
}

.blog-full-post ul {
    list-style-type: disc;
}

.blog-full-post h2, .blog-full-post h3 {
    color: #e91e63;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.blog-full-post h2 {
    font-size: 1.6em;
    border-bottom: 2px solid #e91e63;
    padding-bottom: 8px;
}

.blog-full-post h3 {
    font-size: 1.3em;
}

/* White headings for specific sections in Blogpost 2 */
.blog-full-post .white-heading {
    color: white !important;
    font-size: 1.2em;
}

.back-link {
    display: inline-block;
    background: #444;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 40px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.back-link:hover {
    background: #e91e63;
}

/* Contact Form Styles */
.contact {
    background: #1a1a1a;
    text-align: center;
}

.contact p {
    margin-bottom: 30px;
    font-size: 1.1em;
}

form {
    max-width: 600px;
    margin: 0 auto 20px;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #e91e63;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #111;
    border: 1px solid #444;
    border-radius: 4px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e91e63;
}

input:focus, textarea:focus {
    box-shadow: 0 0 5px #e91e63;
}

button[type="submit"] {
    background: #e91e63;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    font-weight: 600;
    transition: background 0.3s ease;
    width: 100%;
}

button[type="submit"]:hover {
    background: #c2185b;
}

.contact-info {
    font-size: 0.95em;
    opacity: 0.8;
}

/* Enhanced CTA in contact */
.contact::after {
    content: "Ready to accredit? Start with a free consultation.";
    display: block;
    background: rgba(233, 30, 99, 0.1);
    padding: 15px;
    margin-top: 30px;
    border-left: 4px solid #e91e63;
    text-align: center;
    font-weight: 600;
}

/* Testimonials Slider */
.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 30px auto;
    overflow: visible; /* Changed to visible to debug any clipping */
    border-radius: 8px;
    min-height: 300px; /* Ensure container has height even if slides hidden */
}

.slides-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* smoother fade */
    padding: 20px;
    display: block;
    box-sizing: border-box;
}

.slide.active {
    opacity: 1;
    z-index: 2; /* Bring active slide forward */
}

.testimonial {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(233, 30, 99, 0.1);
    border-left: 4px solid #e91e63;
    text-align: center;
    width: 100%;
}

.testimonial h3 {
    color: #e91e63;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.testimonial blockquote {
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: left;
}

.testimonial cite {
    display: block;
    font-style: normal;
    font-weight: 600;
    color: #e91e63;
    text-align: right;
    font-size: 0.95em;
}

/* Dots Navigation */
.dots {
    text-align: center;
    margin-top: 15px;
    position: relative;
    z-index: 3;
}

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

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

@media (max-width: 768px) {
    header {
        flex-direction: column;
    }
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 10px;
    }

    .logo img {
        width: 50px;
        height: 50px;
    }
    
    form {
        padding: 0 10px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
    }

input:focus, textarea:focus {
  box-shadow: 0 0 5px #e91e63;
}
    
    .slide {
        padding: 10px;
    }
    .testimonial {
        padding: 15px;
    }
    .testimonials-slider {
        min-height: 250px;
    }
    
    /* Mobile About Section Stack Fix - Prevent Cutoff and Add Spacing */
    .about-section {
        padding: 60px 20px; /* Increased side padding for breathing room */
    }
    .about-content {
        flex-direction: column;
        gap: 20px;
        padding: 0 20px; /* Add inner padding for text edges */
        text-align: center;
    }
    .about-text,
    .about-image {
        flex: none;
        width: 100%;
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }
    .about-text h2 {
        font-size: 1.6em;
        text-align: center;
    }
    .about-text p {
        font-size: 0.95em;
        line-height: 1.5;
        hyphens: auto;
        text-align: justify;
        padding: 0 10px; /* Extra side padding for text not hugging edges */
    }
    .about-image img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
        margin: 0 auto;
    }
    
    /* Mobile Qualifications Section (fixed for background) */
    .qualifications-text {
        padding: 30px 15px; /* Adjust padding for mobile */
        background-size: cover; /* Use cover on mobile for better fit */
    }
    .qualifications-text ul {
        padding-left: 20px;
    }
    .qualifications-text li {
        margin-bottom: 6px;
        text-align: left;
    }
    
    /* Mobile Blog */
    .blog-posts {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-post {
        padding: 20px;
    }
    
    .blog-post h3 {
        font-size: 1.2em;
    }
    
    .blog-full-post {
        padding: 30px 20px; /* Reduce padding on mobile but keep readable */
        margin: 40px 10px;
    }
    
    .blog-full-post h1 {
        font-size: 1.8em;
    }
    
    .blog-full-post h2 {
        font-size: 1.5em;
    }
    
    .blog-full-post h3 {
        font-size: 1.2em;
    }
    
    .blog-full-post ol, .blog-full-post ul {
        padding-left: 20px; /* Slightly less indent on small screens */
    }
    
    /* Extra narrow screen fix (e.g., iPhone 12 at 390px) */
    @media (max-width: 400px) {
        .about-section {
            padding: 50px 15px;
        }
        .about-content {
            padding: 0 15px;
            gap: 15px;
        }
        .about-text h2 {
            font-size: 1.4em;
        }
        .about-text p {
            font-size: 0.9em;
            line-height: 1.4;
            padding: 0 5px;
        }
        
        .qualifications-text {
            padding: 20px 10px;
        }
        .qualifications-text li {
            font-size: 0.9em;
        }
        
        .blog-post {
            padding: 15px;
        }
    }

    /* Mobile adjustments for blog posts */
    .blog-full-post {
        padding: 30px 20px;
        margin: 40px 10px;
    }
    .blog-full-post h1 {
        font-size: 1.8em;
    }
    .blog-full-post h2 {
        font-size: 1.5em;
    }
    .blog-full-post h3 {
        font-size: 1.2em;
    }
    .blog-full-post ol, .blog-full-post ul {
        padding-left: 20px;
    }
}