/* General Styling */
body {
    /* Using a modern, highly readable font */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9; /* Consistent background from your app */
    color: #4a5568; /* Consistent text color */
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: #ffffff;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* UPDATED LOGO CSS */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 55px; /* Sets the height of the logo area */
}

.logo svg {
    height: 100%; /* Forces SVG to fit the height defined above */
    width: auto;  /* Maintains aspect ratio */
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 80px 0;
    background-color: #ffffff;
}

.hero h1 {
    font-size: 3.5rem;
    color: #1a202c;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero .subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: #718096;
}

.cta-button {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px 35px;
    border-radius: 8px;
    text-decoration: none;
    background-color: #3182ce; /* Primary blue from your app */
    color: white;
    transition: background-color 0.2s, transform 0.2s;
    display: inline-block;
}

.cta-button:hover {
    background-color: #2b6cb0;
    transform: translateY(-2px);
}

/* --- Tools Section --- */
.tools-section {
    padding: 80px 0;
}

.tools-section h2 {
    font-size: 2.5rem;
    color: #1a202c;
    text-align: center;
    margin-top: 0;
    margin-bottom: 50px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.tool-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* Text Headings in cards */
.tool-card h3 {
    font-size: 1.8rem;
    color: #1a202c;
    margin-top: 0;
    margin-bottom: 10px;
}

/* UPDATED: Rule for SVGs inside tool cards (BoostMaths & MathsGuide) */
.tool-card svg {
    max-width: 100%;    /* Ensures logo fits in card width */
    height: auto;       /* Maintains aspect ratio */
    margin-bottom: 15px; /* Adds space below the logo */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    transform-origin: left center; /* Scales from the left to align with text */
    cursor: pointer;
}

/* Hover effect specifically for the logos */
.tool-card svg:hover {
    transform: scale(1.05);
}

.tool-card .tool-description {
    color: #718096;
    flex-grow: 1; /* Ensures cards in the same row have equal height */
    margin-bottom: 25px;
}

.tool-card .tool-link {
    font-size: 1rem;
    font-weight: 600;
    color: #3182ce;
    text-decoration: none;
    align-self: flex-start;
}

.tool-card .tool-link:hover {
    text-decoration: underline;
}

/* Placeholder card style */
.tool-card.placeholder {
    background-color: #f7fafc;
    border-style: dashed;
}

.tool-card.placeholder h3,
.tool-card.placeholder .tool-description {
    color: #a0aec0;
}


/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #e2e8f0;
    color: #718096;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero, .tools-section {
        padding: 60px 0;
    }
    /* Optional: Make logo slightly smaller on mobile if needed */
    .logo {
        height: 45px;
    }
}
