@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Roboto&display=swap');

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

body {
    background: #FFFFFF;
    color: #1A3C5E;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.5s ease-in-out, color 0.5s ease-in-out;
}

body.dark-mode {
    background: #2C3E50;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1A3C5E;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ECF0F1;
    border-top: 5px solid #F5A623;
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 40px;
    background: rgba(26, 60, 94, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000; /* Ensure navbar stays on top */
    transition: padding 0.3s ease-in-out, background 0.3s ease-in-out;
}

body.dark-mode .navbar {
    background: rgba(44, 62, 80, 0.9);
}

.nav-logo img {
    height: 50px;
    transition: transform 0.3s ease-in-out;
}

.nav-logo img:hover {
    transform: scale(1.1);
}

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

.nav-links a {
    color: #ECF0F1;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    transition: color 0.3s ease-in-out;
}

.nav-links a:hover {
    color: #F5A623;
}

.nav-toggle {
    display: none;
    font-size: 1.5em;
    color: #ECF0F1;
    cursor: pointer;
    transition: color 0.3s ease-in-out;
}

.nav-toggle:hover {
    color: #F5A623;
}

/* About Hero Section */
.about-hero {
    position: relative;
    height: 60vh;
    background: url(./img/MAK\ Media\ BG\ Website02.jpg) center/cover no-repeat;
    background-attachment: scroll;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center; /* Ensure text stays centered */
    color: #ECF0F1;
    margin-bottom: 40px;
    padding-top: 80px;
    padding-bottom: 40px; /* Add padding to prevent text from touching edges */
    overflow: hidden; /* Prevent overflow */
    animation: fadeIn 1s ease-in-out;
    transition: background 0.5s ease-in-out;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 60, 94, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5em;
    padding-top: 20px; /* Add padding to prevent text from touching edges */
    padding-bottom: 5px;
    margin-bottom: 10px;
    margin-top: 0; /* Adjust margin for better spacing */
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5em;
    margin-bottom: 25px;
   padding-bottom: 25px;
}

/* Our Story Section */
.our-story {
    padding: 80px 20px; /* Ensure consistent padding for responsiveness */
    text-align: center;
    background: #F5F7FA;
    animation: slideUp 1s ease-in-out;
    margin-top: 60px;
    color: #1A3C5E;
}

body.dark-mode .our-story {
    background: #34495E;
    color: #ECF0F1;
}

.our-story h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #1A3C5E;
}

body.dark-mode .our-story h2 {
    color: #F5A623;
}

.our-story p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2em;
}

/* Mission, Vision, Values Section */
.mission-vision-values {
    padding: 80px 20px; /* Ensure consistent padding for responsiveness */
    text-align: center;
    background: #FFFFFF;
    animation: slideUp 1.2s ease-in-out;
    margin-top: 60px;
}

body.dark-mode .mission-vision-values {
    background: #2C3E50;
}

.mission-vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.mission-card,
.vision-card,
.values-card {
    background: #ECF0F1;
    padding: 30px;
    border-radius: 15px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    color: #1A3C5E; /* Default text color for light mode */
}

body.dark-mode .mission-card,
body.dark-mode .vision-card,
body.dark-mode .values-card {
    background: #34495E;
    color: #ECF0F1; /* Text color for dark mode */
}

.mission-card:hover,
.vision-card:hover,
.values-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.mission-card h3,
.vision-card h3,
.values-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #1A3C5E;
}

body.dark-mode .mission-card h3,
body.dark-mode .vision-card h3,
body.dark-mode .values-card h3 {
    color: #F5A623;
}

.mission-card p,
.vision-card p {
    font-size: 1.1em;
}

.values-card ul {
    list-style: none;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.values-card ul li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.values-card ul li strong {
    color: #F5A623;
}

/* Team Section */
.team {
    padding: 80px 20px; /* Ensure consistent padding for responsiveness */
    text-align: center;
    background: #F5F7FA;
    animation: slideUp 1.4s ease-in-out;
    margin-top: 60px;
    color: #1A3C5E; /* Default text color for light mode */
}

body.dark-mode .team {
    background: #34495E;
    color: #ECF0F1; /* Text color for dark mode */
}

.team h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #1A3C5E;
}

body.dark-mode .team h2 {
    color: #F5A623;
}

.team > p {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.2em;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.team-member {
    background: #ECF0F1;
    padding: 20px;
    border-radius: 15px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    color: #1A3C5E; /* Default text color for light mode */
}

body.dark-mode .team-member {
    background: #34495E;
    color: #ECF0F1; /* Text color for dark mode */
}

.team-member:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid #1A3C5E;
    transition: border-color 0.3s ease-in-out;
}

body.dark-mode .team-member img {
    border-color: #F5A623;
}

.team-member h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #1A3C5E;
}

body.dark-mode .team-member h3 {
    color: #ECF0F1;
}

.team-member p {
    font-size: 1em;
    color: #1A3C5E;
}

body.dark-mode .team-member p {
    color: #ECF0F1;
}

.team-member .bio {
    margin-top: 10px;
    font-style: italic;
    font-size: 0.95em;
}

/* Call to Action Section */
.cta {
    padding: 80px 20px; /* Ensure consistent padding for responsiveness */
    text-align: center;
    background: #1A3C5E;
    color: #ECF0F1;
    animation: slideUp 1.6s ease-in-out;
    margin-top: 60px;
}

body.dark-mode .cta {
    background: #34495E;
}

.cta h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, #F5A623, #E8B923);
    color: #ECF0F1;
    text-decoration: none;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2em;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(245, 166, 35, 0.6);
}

/* Footer */
footer {
    padding: 40px 20px; /* Ensure consistent padding for responsiveness */
    background: #1A3C5E;
    color: #ECF0F1;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

body.dark-mode footer {
    background: #2C3E50;
}

.footer-content p {
    margin-bottom: 20px;
}

.social-links a {
    color: #ECF0F1;
    margin: 0 15px;
    font-size: 1.5em;
    transition: color 0.3s ease-in-out;
}

.social-links a:hover {
    color: #F5A623;
}

/* Animations */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px; /* Adjust padding for smaller screens */
    }

    .hero-content h1 {
        font-size: 2em; /* Reduce font size for smaller screens */
    }

    .hero-content p {
        font-size: 1.2em; /* Adjust paragraph font size */
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(26, 60, 94, 0.95);
        padding: 20px;
        text-align: center;
        z-index: 999; /* Ensure dropdown menu stays above other content */
    }

    body.dark-mode .nav-links {
        background: rgba(44, 62, 80, 0.95);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    html {
        scroll-behavior: smooth;
      }

    .hero-content h1 {
        font-size: 2em;
    }

    .about-hero {
        height: auto;
        padding-top: 80px; /* Space for navbar */
        padding-bottom: 40px;
    }

    .mission-vision-grid {
        grid-template-columns: 1fr; /* Ensure single-column layout on small screens */
    }

    .team-grid {
        grid-template-columns: 1fr; /* Ensure single-column layout on small screens */
    }

    .team-member img {
        width: 120px; /* Adjust image size for smaller screens */
        height: 120px;
    }

    .cta h2 {
        font-size: 2em; /* Adjust heading size for smaller screens */
    }

    .cta p {
        font-size: 1em; /* Adjust paragraph size for smaller screens */
    }

    .our-story,
    .mission-vision-values,
    .team,
    .cta {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}