/*
 * Custom CSS for TTMK Blog Page (blog.css)
 * This file complements Tailwind CSS for specific styling needs.
 */

/* 1. Global Page Structure & Background */
body {
    /* Font family is typically set in the main style.css or header for consistency */
    /* background-color can be inherited from Tailwind classes in body tag */
}

/* Main content area padding and background for readability */
main {
    padding-top: 5rem; /* pt-20 for fixed header clearance */
    background-color: #f3f4f6; /* Light gray background for the overall main area */
}

/* 2. Carousel Specific Styling */
#blog-carousel {
    height: 400px; /* Fixed height for the carousel */
    position: relative;
    overflow: hidden;
}

#blog-carousel .flex {
    height: 100%; /* Ensure flex container takes full height */
}

#blog-carousel .flex-shrink-0 {
    height: 100%;
}

#blog-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images cover the area without distortion */
    object-position: center;
}

#blog-carousel .carousel-caption {
    background: rgba(0, 0, 0, 0.6); /* Slightly darker overlay for better text contrast */
    padding: 1.5rem;
    border-radius: 0.75rem; /* rounded-xl for consistency */
    max-width: 90%; /* Limit width on smaller screens */
}

#blog-carousel .carousel-caption h2 {
    font-size: 2.5rem; /* Adjusted for better fit on carousel */
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

#blog-carousel .carousel-caption small {
    white-space: nowrap; /* Prevents text wrap for small items */
}

/* Carousel navigation buttons */
#blog-carousel button {
    z-index: 10;
    font-size: 1.5rem; /* Larger arrows */
    width: 48px; /* Fixed width */
    height: 48px; /* Fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7; /* Slightly transparent */
}

#blog-carousel button:hover {
    opacity: 1; /* Fully opaque on hover */
}


/* 3. Blog List Items (Cards) Styling */
.blog-list-container {
    background-color: #ffffff;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    padding: 2rem; /* py-8 px-4 equivalent */
}

.blog-list-container h1 {
    color: #1f2937; /* Darker gray for section title */
    margin-bottom: 2.5rem;
}

.blog-list-container .flex-col { /* Individual blog items */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-list-container .flex-col:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05); /* Stronger shadow */
}

.blog-list-container img {
    border-top-left-radius: 0.75rem; /* Match card radius */
    border-top-right-radius: 0.75rem;
}

.blog-list-container h3 {
    color: #2563eb; /* Brand blue for post titles */
}

.blog-list-container a.text-blue-600 { /* "Read More" links */
    text-decoration: none;
    font-weight: 600;
}

.blog-list-container a.text-blue-600:hover {
    text-decoration: underline;
}

/* 4. Subscribe Section Styling */
.subscribe-section {
    background: linear-gradient(to right, #2563eb, #4f46e5); /* bg-gradient-to-r from-blue-600 to-indigo-700 */
    color: #ffffff;
    padding: 3rem 2rem;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    margin-top: 2rem; /* mt-8 */
    text-align: center;
}

.subscribe-section h1 {
    font-size: 2.25rem; /* text-3xl md:text-4xl */
    font-weight: 700;
    margin-bottom: 1rem;
}

.subscribe-section p {
    font-size: 1.125rem; /* text-lg */
    margin-bottom: 1.5rem;
}

.subscribe-section input[type="email"] {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 9999px; /* rounded-full */
    color: #1f2937; /* text-gray-900 */
    flex-grow: 1;
    min-width: 200px; /* Ensure input is not too small on mobile */
}

.subscribe-section input[type="email"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px #93c5fd; /* focus:ring-2 focus:ring-blue-300 */
}

.subscribe-section button {
    background-color: #ffffff;
    color: #1d4ed8; /* text-blue-700 */
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 9999px; /* rounded-full */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* shadow-md */
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.subscribe-section button:hover {
    background-color: #f9fafb; /* hover:bg-gray-100 */
    transform: translateY(-2px); /* Slight lift on hover */
}

/* Responsive adjustments */
@media (max-width: 768px) { /* md breakpoint for Tailwind */
    #blog-carousel {
        height: 250px; /* Smaller height for mobile carousel */
    }
    #blog-carousel .carousel-caption h2 {
        font-size: 1.75rem; /* Smaller heading on mobile */
    }
    .blog-list-container {
        padding: 1.5rem;
        box-shadow: none; /* Lighter shadow on mobile for performance/cleaner look */
    }
    .blog-list-container .flex-col:hover {
        transform: none; /* Disable lift effect on mobile for touch devices */
        box-shadow: none;
    }
    .subscribe-section {
        padding: 2rem 1rem;
    }
    .subscribe-section h1 {
        font-size: 2rem;
    }
}
