/*
    ------------------------------------------------------
    Global Styles & Typography
    ------------------------------------------------------
*/
:root {
    --primary-color: #007bff; /* Blue */
    --secondary-color: #6c757d; /* Gray */
    --accent-color: #28a745;   /* Green */
    --bg-color: #f8f9fa;      /* Light Gray */
    --text-color: #343a40;    /* Dark Gray */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Lato', sans-serif;
    --whatsapp-color: #25D366; /* WhatsApp Green */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/*
    Added global container with proper margins to fix narrow pages
*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/*
    ------------------------------------------------------
    Header & Navigation
    ------------------------------------------------------
*/
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

nav .logo img {
    height: 50px;
    transition: transform 0.3s ease;
}

nav .logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    flex-grow: 1; /* Allows the menu to take up available space */
    justify-content: flex-end; /* Pushes menu items to the right */
    align-items: center;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    font-family: var(--heading-font);
    font-size: 1rem;
    color: var(--text-color);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    position: absolute;
    bottom: -5px;
    left: 0;
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-btn {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* New button styles for navigation links */
.nav-button {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    background-color: transparent;
    border: none;
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-button:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.nav-button.cta-btn {
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50px;
}

.nav-button.cta-btn:hover {
    background-color: #0056b3;
}


/*
    Updated Hamburger Menu (Mobile) to align right
*/
.burger {
    display: none;
    cursor: pointer;
    align-self: flex-end; /* Aligns hamburger to the right */
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

.burger.active .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.burger.active .line2 {
    opacity: 0;
}

.burger.active .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/*
    ------------------------------------------------------
    Hero & Sections
    ------------------------------------------------------
*/
#hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../img/hero-bg.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 10rem 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1s ease-in-out;
}

#hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: slideInUp 1s ease-in-out;
}

#hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: slideInUp 1.2s ease-in-out;
}

section {
    padding: 4rem 0;
}

.page-header {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 4rem 0;
}

.page-header h1 {
    font-size: 3rem;
    margin: 0;
}

/*
    ------------------------------------------------------
    Flexbox Layouts for Content
    ------------------------------------------------------
*/
/* Container for multi-column layouts */
.content-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: stretch; /* Ensures blocks have the same height */
    padding: 2rem 0;
}

.content-block, .pillar-item, .program-item {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1 1 calc(33.333% - 1.5rem); /* 3 items per row on large screens */
    max-width: calc(33.333% - 1.5rem);
    display: flex;
    flex-direction: column;
}

.content-block:hover, .pillar-item:hover, .program-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.pillar-item i, .program-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.pillar-item {
    text-align: center;
}

/* Specific layout for the About page mission/vision section */
.mission-vision-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.mission-item {
    flex: 1 1 calc(50% - 2rem);
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.mission-item h3 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

/* Form Styles */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.form-container input, .form-container textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--body-font);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-container input:focus, .form-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.success-message, .error-message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/*
    New styles for Read More feature
*/
.read-more-content {
    display: none;
}

.read-more-toggle {
    display: block;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

/*
    ------------------------------------------------------
    Footer
    ------------------------------------------------------
*/
footer {
    background-color: var(--text-color);
    color: #fff;
    padding: 4rem 1.5rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section {
    flex: 1 1 250px;
}

.footer-section h3 {
    color: #fff;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.social-links a {
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

.social-links .fa-whatsapp {
    color: var(--whatsapp-color);
}

.footer-tech-partners {
    text-align: center;
    padding-top: 2rem;
}

.footer-tech-partners h3 {
    border-bottom: none;
    padding-bottom: 0;
}

.tech-logos {
    display: flex;
    justify-content: center; /* Centers items horizontally */
    align-items: center;     /* Centers items vertically */
    gap: 2rem;               /* Adds space between the logos */
    margin-top: 1rem;
}

.footer-tech-partners .tech-logos img {
    height: 40px;
    filter: brightness(0) invert(1); /* Makes logos white for dark background */
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-tech-partners .tech-logos img:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/*
    ------------------------------------------------------
    Animations
    ------------------------------------------------------
*/
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*
    ------------------------------------------------------
    Responsive Design
    ------------------------------------------------------
*/
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 70px;
        left: 0;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    .burger {
        display: block;
        cursor: pointer;
    }

    .content-flex-container {
        flex-direction: column;
    }

    .content-block, .pillar-item, .program-item {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-section {
        margin-right: 0;
    }
}