/* ======================== GLOBAL STYLES / RESET ======================== */
/* COMMON TECHNIQUE: Box-sizing reset for predictable layout */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Define CSS Variables for easy theme adaptation */
    --primary-color: #007bff; /* Bright blue for accents */
    --secondary-color: #333;
    --background-color: #f4f4f9; /* Light background */
    --text-color: #1a1a1a;
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    /* EXTENSION: To implement a dark mode, you would change these variables based on a class applied to the body (e.g., body.dark-theme) */
}

/* COMMON TECHNIQUE: Utility class for container width */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ======================== HEADER / NAVIGATION ======================== */
.main-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    /* COMMON TECHNIQUE: Flexbox for alignment */
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: sticky; /* COMMON TECHNIQUE: Sticky navigation */
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.main-nav ul {
    list-style: none;
    display: flex; /* Flexbox for horizontal list */
}

.main-nav ul li a {
    text-decoration: none;
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    display: block;
    transition: color 0.3s, background-color 0.3s;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
    background-color: #e9ecef;
}

/* ======================== HERO SECTION ======================== */
.hero {
    /* ADAPTATION: Use a high-resolution, modern, abstract image here */
    background: url('hero-bg.jpg') no-repeat center center/cover;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    color: #fff;
}

/* COMMON TECHNIQUE: Overlay for better text readability */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
    z-index: 1;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.8rem 1.5rem;
    margin-top: 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #0056b3;
}

/* ======================== BLOG SECTION PREVIEW ======================== */
.blog-preview, .image-gallery {
    padding: 4rem 10%;
    text-align: center;
}

.blog-grid {
    /* COMMON TECHNIQUE: CSS Grid for responsive card layout */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-post {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.blog-post img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* COMMON TECHNIQUE: Ensures images fill the space */
}

.blog-post h3, .blog-post p, .blog-post .read-more {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
}

/* ======================== IMAGE GALLERY SECTION ======================== */
.gallery-grid {
    /* COMMON TECHNIQUE: CSS Grid for a masonry-like/dynamic gallery */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    /* EXTENSION: Use a 'transform: scale()' or 'filter: grayscale()' effect on hover. */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.gallery-item figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0; /* Starts hidden */
    transition: opacity 0.3s;
}

.gallery-item:hover figcaption {
    opacity: 1; /* Appears on hover */
}

/* ======================== MODAL STYLING ======================== */
.modal {
    /* COMMON TECHNIQUE: Fixed position to cover the entire screen */
    display: none; /* Hidden by default (controlled by JS) */
    position: fixed;
    z-index: 2000;
    padding-top: 60px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 700px;
}

/* COMMON TECHNIQUE: Close button styling */
.close-button {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

/* ======================== FOOTER ======================== */
.main-footer {
    background: var(--secondary-color);
    color: #fff;
    padding: 2rem 10%;
    text-align: center;
}

.footer-content {
    /* Using Flexbox here for a simple row layout */
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.social-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.social-links a:hover {
    opacity: 1;
}

/* ======================== RESPONSIVENESS (COMMON TECHNIQUE) ======================== */
@media (max-width: 768px) {
    /* ADAPTATION: Mobile-first approach for navigation */
    .main-header {
        flex-direction: column;
    }
    .main-nav ul {
        flex-direction: column;
        text-align: center;
        width: 100%;
        padding-top: 1rem;
    }
    .main-nav ul li {
        margin: 0.5rem 0;
    }
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}