/* --- CSS Variables for Theming --- */
:root {
    --color-primary: #004b99; /* Dark Blue */
    --color-secondary: #007bff; /* Bright Blue */
    --color-text: #333;
    --color-background: #f4f7f6;
    --color-card-bg: #dfdfdf;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;
    --spacing-lg: 3rem;
    --spacing-md: 1.5rem;
    --border-radius: 8px;
}

/* --- Base & Typography Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    overflow-x: hidden; /* Prevents horizontal scroll from absolute positioning */
}

h1, h2, h3 {
    font-family: var(--font-heading);
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

main {
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Hero Section & Intro Text (Flexbox for alignment) --- */
.hero-section {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden; /* Contains the absolute carousel */
    background: var(--color-primary);
    padding-bottom: var(--spacing-lg); /* Space under the carousel */
}

.hero-intro-text {
    z-index: 10; /* Ensures text is on top of carousel */
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.95); /* Semi-transparent white background */
    margin: var(--spacing-md) auto;
    max-width: 90%;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-50%); /* Pulls the text up over the carousel */
}

.hero-intro-text h1 {
    color: var(--color-primary);
    font-size: 2.5rem;
}

.hero-intro-text p {
    font-weight: 300;
}
 



/* --- Site Highlights (CSS Grid for Layout) --- */
.site-highlights {
    padding: var(--spacing-lg) var(--spacing-md);
    margin-top: -50px; /* Adjust based on hero-intro-text transform */
}

.site-highlights h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 2rem;
}

.card-grid {
    display: grid;
    /* Responsive Grid: 
       Min column size of 300px, auto-fit columns */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    align-items: stretch;
}

/* --- Highlight Card Styling --- */
.highlight-card {
    display: flex;
    flex-direction: column;
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-card:hover {
    transform: translateY(-5px); /* Subtle hover lift effect */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    padding-top: 60%; /* Aspect ratio 5:3 (400x250) */
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid var(--color-secondary);
}

.card-content {
    padding: var(--spacing-md);
    flex-grow: 1; /* Ensures content fills remaining space */
}

.card-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: var(--color-primary);
}

 




/* --- Highlight Card Styling (MODIFIED) --- */
.highlight-card {
    /* ... existing styles ... */
    display: flex; /* Keep this */
    flex-direction: column; /* Keep this */
    /* ... existing styles ... */
}

/* FIX: Convert .card-content to Flexbox */
.card-content {
    padding: var(--spacing-md);
    /* Make this a flex container to manage its children */
    display: flex; 
    /* Stack children vertically (h3, p, span) */
    flex-direction: column; 
    /* This is the key: it ensures the content area fills all available space */
    flex-grow: 1; 
}

/* FIX: Push the tag to the bottom by creating space above it */
.card-content p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    /* The critical change: pushes everything after the paragraph to the end */
    margin-top: auto; 
}

/* Optional: To ensure the h3 and p always start at the top */
.card-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: var(--color-primary);
}

/* Ensure the card-tag has its own space */
 
.card-tag {
	margin-top: 0;
    display: inline-block;
	align-items: bottom;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    background-color: var(--color-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}


/* --- Media Queries for Responsiveness --- */
@media (max-width: 768px) {
    .hero-intro-text {
        max-width: 95%;
        padding: 1rem;
        transform: translateY(-25%); /* Less aggressive lift on small screens */
    }

    .hero-intro-text h1 {
        font-size: 2rem;
    }

    .site-highlights {
        padding: var(--spacing-md);
    }

    .card-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
}