/* =========================================
   1. VARIABLES & THEME
   ========================================= */
:root {
    /* Colors */
    --primary: #4F46E5;
    /* Indigo 600 */
    --primary-hover: #4338CA;
    /* Indigo 700 */
    --accent: #06B6D4;
    /* Cyan 500 */

    --bg-body: #F8FAFC;
    /* Slate 50 */
    --bg-surface: #FFFFFF;

    --text-main: #1E293B;
    /* Slate 800 */
    --text-muted: #64748B;
    /* Slate 500 */
    --text-light: #94A3B8;
    /* Slate 400 */

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   2. RESET & BASE
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   3. UTILITIES & LAYOUT
   ========================================= */
.center,
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* =========================================
   4. HEADER & NAVBAR
   ========================================= */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Navbar Search Form */
.nav-search {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 99px;
    padding: 0.4rem 1rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-search:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.nav-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-main);
    width: 180px;
}

.nav-search button {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: 0.5rem;
}

/* =========================================
   5. HERO & SECTIONS
   ========================================= */
main {
    flex: 1;
}

.page-content {
    padding: 4rem 0;
}

.hero-section {
    position: relative;
    text-align: center;
    padding: 8rem 0 6rem;
    width: 100%;
    margin: 0;
    max-width: 100%;
    background: url("../images/hero_bg.6a08203c9339.png") no-repeat center center;
    background-size: cover;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.8) 100%);
    z-index: 1;
}

.hero-section>* {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.hero-text {
    font-size: 1.25rem;
    color: #cbd5e1;
    /* Slate 300 */
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* =========================================
   6. CARDS & GRID
   ========================================= */
.blog-posts {
    padding: 2rem 0 6rem;
}

.blog-posts h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    display: inline-block;
}

.blog-posts h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #e2e8f0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card h3,
.card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* Read More Link styling if needed later, 
   but for now card link wraps title */

/* =========================================
   7. SINGLE POST
   ========================================= */
.blog-post {
    max-width: 800px;
    margin: 3rem auto;
    background: var(--bg-surface);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.post-header {
    margin-bottom: 3rem;
    text-align: center;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.post-intro {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.post-body {
    font-size: 1.125rem;
    color: var(--text-main);
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body img {
    border-radius: var(--radius-sm);
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

/* Gallery */
.post-gallery {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item img {
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.gallery-item img:hover {
    transform: scale(1.02);
}

/* =========================================
   8. FOOTER
   ========================================= */
.footer {
    background-color: #0f172a;
    /* Slate 900 */
    color: #e2e8f0;
    /* Slate 200 */
    padding: 3rem 0;
    margin-top: auto;
    text-align: center;
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* =========================================
   9. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-search {
        width: 100%;
        margin-top: 0.5rem;
    }

    .nav-search input {
        width: 100%;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .blog-post {
        padding: 1.5rem;
        margin: 1.5rem auto;
        width: 95%;
    }
}