/* PREMIUM DESIGN SYSTEM - ANANNT 2026 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:wght@700&display=swap');

:root {
    --primary: #002395;       /* Royal Blue */
    --accent: #D4AF37;        /* Metallic Gold */
    --dark: #0a0a0a;
    --light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #Fdfdfd;
    color: var(--dark);
    margin: 0; padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* HEADER */
header {
    background: var(--white);
    padding: 25px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.03);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}

/* HERO TEXT */
.hero-section {
    text-align: center; padding: 80px 20px 40px;
    max-width: 800px; margin: 0 auto;
}
h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem; color: var(--primary); margin: 0 0 20px;
    line-height: 1.1;
}
h1 span { color: var(--accent); font-style: italic; }
.subtitle { font-size: 1.2rem; color: #666; line-height: 1.6; }

/* SECTIONS */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem; text-align: center; color: var(--primary);
    margin: 80px 0 40px;
}

/* THE CARD GRID - STRICT LAYOUT */
.grid-container {
    display: grid;
    /* This ensures cards never get too wide or too narrow */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* THE PREMIUM CARD - THE GUARDRAIL */
.card {
    background: var(--white);
    border-radius: var(--radius);
    
    /* CRITICAL: This acts as the fence. Nothing can escape this box. */
    overflow: hidden; 
    
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    
    /* CRITICAL: Ensures the card itself never stretches wider than the grid */
    max-width: 100%; 
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 35, 149, 0.15);
}

/* THE IMAGE - SMART CROPPER */
.card-image {
    /* Force width to match the card exactly */
    width: 100%; 
    
    /* Force a fixed height. All images will look identical in size. */
    height: 220px; 
    
    /* This magic property zooms/crops the image to fill the space without distortion */
    object-fit: cover; 
    
    /* Centers the image focus */
    object-position: center; 
    
    display: block;
    background-color: #eee; /* Placeholder color while loading */
}

/* CARD CONTENT */
.card-body { 
    padding: 30px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}

.card-tag {
    font-size: 0.75rem; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; color: var(--accent);
    margin-bottom: 10px; display: block;
}

.card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem; margin: 0 0 15px; color: var(--primary);
}

.card p { 
    color: #666; font-size: 0.95rem; line-height: 1.6; 
    margin-bottom: 25px; flex-grow: 1; 
}

/* BUTTONS */
.btn {
    display: inline-block; width: 100%;
    padding: 16px; border: none; border-radius: 8px;
    background: var(--primary); color: white;
    font-weight: 600; font-size: 1rem; cursor: pointer;
    transition: all 0.2s; text-align: center;
}
.btn:hover { background: #001870; opacity: 0.95; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

/* MODAL (Glassmorphism) */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 35, 149, 0.4); backdrop-filter: blur(8px);
    z-index: 1000; align-items: center; justify-content: center;
}
.modal-content {
    background: white; width: 90%; max-width: 450px;
    padding: 40px; border-radius: 20px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.2);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* FORM ELEMENTS */
input {
    width: 100%; padding: 15px; margin-bottom: 15px;
    border: 1px solid #e1e1e1; border-radius: 8px;
    font-family: 'Inter', sans-serif; font-size: 1rem;
    transition: border 0.2s; box-sizing: border-box;
}
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,35,149,0.1); }


/* AUTO-GENERATED COVER (Fallback) */
.card-placeholder {
    width: 100%;
    height: 220px;
    /* Premium Gradient: Brand Blue to Darker Blue */
    background: linear-gradient(135deg, var(--primary) 0%, #001040 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
    text-align: center;
}

.card-placeholder span {
    color: var(--white);
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    /* Add a subtle gold underline for style */
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
}

/* --- UNIFORM CARD FIX (TEXT CLAMPING) --- */

/* 1. Limit the Title to 2 lines max */
.card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.2rem; /* Keeps titles aligned even if one is short */
}

/* 2. Limit the Description to 3 lines max */
.card-body p:last-of-type {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 20px;
}