/* --- CSS VARIABLES & BASIC SETUP --- */
:root {
    --color-primary: #E87A33;
    --color-secondary: #8db98c;
    --color-text: #333333;
    --color-text-light: #555555;
    --color-background: #FFFFFF;
    --color-background-dots: #F1F1F1;
    --color-border: #E0E0E0;
    --font-family-main: 'Inter', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { font-size: 100%; }

body {
    font-family: var(--font-family-main);
    color: var(--color-text);
    background-color: var(--color-background-dots);
    line-height: 1.7;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); color: var(--color-text); }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); color: var(--color-text); margin-bottom: 2rem; }
h3 { font-size: 1.1rem; }
p { color: var(--color-text-light); }

/* --- UTILITY & CONTAINER --- */
.content-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.6em 1.5em;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-background);
    border: 1px solid var(--color-primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #d16c2a;
    transform: translateY(-2px);
}

/* --- HEADER & NAVIGATION --- */
.main-header {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-background);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo__icon {
    height: 40px;
    width: auto;
    object-fit: contain;
}
.logo__text { display: none; }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.profile-link svg { display: block; }

.nav-toggle-checkbox { display: none; }
.nav-toggle { display: block; cursor: pointer; z-index: 1001; color: var(--color-text); }

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--color-background);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    padding-top: 5rem;
}

#nav-toggle-checkbox:checked ~ .main-nav { transform: translateX(0); }

.main-nav ul { display: flex; flex-direction: column; }
.main-nav ul a {
    display: block; padding: 1rem 1.5rem; font-weight: 600;
    transition: background-color 0.2s;
}
.main-nav ul a:hover, .main-nav ul a.active {
    background-color: #f8f8f8; color: var(--color-primary);
}

/* --- MAIN CONTENT SECTIONS --- */
.main-content { padding-top: 3rem; background-color: var(--color-background); }
.hero-story {
    background-image: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.3)), url('../images/black.jpg');
    background-size: cover; background-position: center;
    color: var(--color-background); text-align: center;
    padding: 6rem 1.5rem; margin-bottom: 3rem;
}
.hero-content { max-width: 700px; margin: 0 auto; }
.hero-content h1 { margin-bottom: 1rem; color: var(--color-background); }
.hero-content p { color: rgba(255, 255, 255, 0.9); }

.team-section, .partners-section {
    padding: 3rem 0;
    text-align: center;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    justify-items: center;
    align-items: start;
}

.team-member {
    max-width: 200px;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem auto;
    border: 4px solid var(--color-background-dots);
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}

.team-member h3 {
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.team-member p {
    font-size: 0.9rem;
    margin: 0;
}

@media(max-width: 899px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 599px) {
    .team-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* --- PARTNER SECTION ENHANCEMENTS --- */

/* General Body Styling for better font rendering and base spacing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0; /* Remove default body margin */
    /* Add padding to the body for content not to touch the screen edges */
    padding: 0 1rem; /* Base padding for smaller screens */
}

/* Global section spacing - Apply this to a container that wraps your sections */
/* For example, if each major section of your page is a <section> tag or has a class like .page-section */
.page-section {
    padding-top: clamp(3rem, 8vw, 6rem); /* Top padding for sections */
    padding-bottom: clamp(3rem, 8vw, 6rem); /* Bottom padding for sections */
    /* Add horizontal padding if your .partner-grid doesn't already handle it for the section */
    padding-left: clamp(1rem, 4vw, 2rem);
    padding-right: clamp(1rem, 4vw, 2rem);
    box-sizing: border-box; /* Include padding in element's total width/height */
}

/* --- PARTNER SECTION SPECIFIC STYLES --- */

.partner-grid {
    display: grid;
    /* Adjusted clamp for smaller screens: min 200px, ideal 45vw, max 380px */
    /* This allows cards to become smaller on very small screens, accommodating more columns if needed,
       or ensuring one column on very narrow devices. */
    grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 45vw, 380px), 1fr));
    gap: clamp(1.25rem, 4vw, 2.5rem); /* Increased and more responsive gap between cards */
    justify-content: center;
    align-items: stretch;
    max-width: 1400px; /* Max width for the grid */
    margin: 0 auto; /* Center the grid */
    /* Removed padding from .partner-grid itself to rely more on .page-section padding,
       or keep a smaller internal padding if preferred.
       If .partner-grid is directly under <body> and not in a .page-section, keep some padding here: */
    /* padding: clamp(2rem, 5vw, 4rem) 0; /* Keep vertical padding if not using .page-section */
}

.partner-card {
    background: linear-gradient(145deg, #ffffff, #f7f9fc);
    border-radius: 1.25rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: clamp(1.5rem, 4vw, 2.5rem); /* Responsive padding within the card */
    width: 100%;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    will-change: transform, box-shadow;
    /* Minimum height for cards to ensure some consistency,
       useful if content varies wildly. Can be removed if not needed. */
    min-height: 280px; /* Ensures a minimum height for visual consistency */
}

.partner-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    background: linear-gradient(145deg, #f7f9fc, #ffffff);
}

.partner-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: clamp(0.75rem, 2vw, 1.5rem);
    flex-shrink: 0;
}

.partner-logo img {
    width: clamp(55px, 12vw, 90px); /* Slightly smaller min width for very small screens */
    height: auto;
    border-radius: 0.75rem;
    margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.partner-card:hover .partner-logo img {
    transform: scale(1.15) rotate(2deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.partner-logo p {
    font-weight: 700;
    font-size: clamp(0.95rem, 2.8vw, 1.25rem); /* Adjusted min font size */
    color: #1a202c;
    margin: 0.2rem 0;
    line-height: 1.3;
}

.partner-logo span {
    background: #e0e7ff;
    color: #4338ca;
    font-size: clamp(0.6rem, 1.8vw, 0.85rem); /* Adjusted min font size */
    padding: clamp(0.3rem, 1vw, 0.5rem) clamp(0.7rem, 2vw, 1.1rem);
    border-radius: 999px;
    margin-top: 0.4rem;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
}

.partner-card h3 {
    font-size: clamp(1rem, 3.2vw, 1.4rem); /* Adjusted min font size for better scaling */
    color: #2d3748;
    margin: clamp(0.8rem, 2vw, 1.2rem) 0 clamp(0.4rem, 1vw, 0.7rem);
    line-height: 1.4;
    font-weight: 700;
}

.partner-card p {
    font-size: clamp(0.8rem, 2.2vw, 1rem); /* Adjusted min font size for better scaling */
    color: #64748b;
    line-height: 1.7;
    margin: 0 auto;
    max-width: 320px;
    flex-grow: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Accessibility and Additional Enhancements (Optional but Recommended) --- */

.partner-card:focus-within {
    outline: 3px solid #6366f1;
    outline-offset: 4px;
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.2);
}

/* For better font rendering */
html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}
body {
    font-family: 'Inter', sans-serif; /* Example: Use a modern sans-serif font */
}

/* Optional: Add a section heading if you have one */
.partner-section-heading {
    text-align: center;
    font-size: clamp(2.2rem, 6vw, 3.8rem); /* Larger, more impactful responsive heading */
    color: #1a202c;
    margin-bottom: clamp(2rem, 5vw, 4rem); /* More spacing below the heading */
    font-weight: 800;
    line-height: 1.2;
}

/* A container to center content within a max-width, if not already handled by .partner-grid */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem); /* Responsive horizontal padding */
    box-sizing: border-box;
}

/* Example of how your HTML might look to use .page-section and .container */
/*
<section class="page-section">
    <div class="container">
        <h2 class="partner-section-heading">Our Valued Partners</h2>
        <div class="partner-grid">
            </div>
    </div>
</section>
*/

/* --- FOOTER --- */
.site-footer {
    background-color: var(--background-white);
    color: #f0f0f0;
    padding: 30px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    border-top: 1px solid #fff;
}

.footer-wrapper {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link svg {
    width: 28px;
    height: 28px;
    fill: #ddd;
    transition: fill 0.3s ease;
    cursor: pointer;
}

.social-link:hover svg,
.social-link:focus svg {
    fill: #1da1f2;
    outline: none;
}

.social-link[aria-label="Facebook"]:hover svg {
    fill: #1877F2;
}

.social-link[aria-label="Instagram"]:hover svg {
    fill: #E4405F;
}

.social-link:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.site-footer p {
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* --- DESKTOP & TABLET STYLES --- */
@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 992px) {
    .nav-toggle { display: none; }
    .logo__text { display: block; }
    .header-container { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; }

    .main-nav {
        position: static;
        transform: none;
        height: auto;
        width: auto;
        background: none;
        box-shadow: none;
        padding: 0;
        justify-self: center;
    }

    .main-nav ul {
        display: flex;
        flex-direction: row;
        gap: 1.5rem;
        justify-content: center;
        align-items: center;
        white-space: nowrap;
    }

    .main-nav ul a {
        padding: 0.25rem 0;
        position: relative;
    }

    .main-nav ul a:hover,
    .main-nav ul a.active {
        background-color: transparent;
        color: var(--color-primary);
    }

    .main-nav ul a::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--color-primary);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .main-nav ul a:hover::after,
    .main-nav ul a.active::after {
        transform: scaleX(1);
    }

    .team-grid, .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- GOOGLE FONT IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
