@font-face {
    font-family: 'Poppins';
    src: url('/fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
    font-family: 'Poppins', sans-serif;
    background-color: #f8fafb;
    color: #333;
    line-height: 1.6;
}

.hero-section {
    background: linear-gradient(135deg, rgba(44, 82, 130, 0.9), rgba(49, 151, 149, 0.8)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect width="1200" height="400" fill="%23f0f9ff"/><circle cx="200" cy="100" r="60" fill="%234fd1c7" opacity="0.1"/><circle cx="800" cy="300" r="80" fill="%23319795" opacity="0.1"/><circle cx="1000" cy="150" r="50" fill="%232c5282" opacity="0.1"/><path d="M0,200 Q300,100 600,200 T1200,200 V400 H0 Z" fill="%234fd1c7" opacity="0.05"/></svg>') center/cover;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(79, 209, 199, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(49, 151, 149, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.blog-header {
    text-align: center;
    margin-bottom: 60px;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.blog-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #2c5282;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.blog-header p {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.blog-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
    justify-content: center;
    /* This centers the cards when there's only one */
}

.blog-card {
    flex: 1 1 calc(33.333% - 30px);
    /* Default 3 columns */
    min-width: 300px;
    /* Minimum card width */
    max-width: 400px;
    /* Maximum card width */
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

/* When there's only one card */
.blog-grid:has(> .blog-card:only-child) {
    justify-content: flex-start;
    /* Align single card to start */
}

.blog-grid:has(> .blog-card:only-child) .blog-card {
    flex: 0 0 calc(33.333% - 30px);
    /* Force 1/3 width */
    max-width: calc(33.333% - 30px);
    /* Force 1/3 width */
}

@media (max-width: 992px) {
    .blog-card {
        flex: 1 1 calc(50% - 30px);
        /* 2 columns on medium screens */
    }

    .blog-grid.single-card .blog-card,
    .blog-grid:has(> .blog-card:only-child) .blog-card {
        flex: 0 0 calc(50% - 30px) !important;
        max-width: calc(50% - 30px) !important;
    }
}

@media (max-width: 768px) {
    .blog-card {
        flex: 1 1 100%;
        /* 1 column on small screens */
    }

    .blog-grid.single-card .blog-card,
    .blog-grid:has(> .blog-card:only-child) .blog-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

.blog-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #4fd1c7 0%, #319795 100%);
}

.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: linear-gradient(135deg, #4fd1c7 0%, #319795 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.blog-content {
    padding: 25px;
}

.blog-date {
    color: #4fd1c7;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c5282;
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-excerpt {
    color: #718096;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more-btn {
    display: inline-block;
    background: linear-gradient(135deg, #4fd1c7 0%, #319795 100%);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.read-more-btn:hover {
    background: linear-gradient(135deg, #319795 0%, #2c7a7b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 209, 199, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        height: 300px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .blog-container {
        padding: 40px 15px;
    }

    .blog-header h1 {
        font-size: 2.2rem;
    }

    .blog-header p {
        font-size: 1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .blog-card {
        margin: 0 auto;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .blog-header h1 {
        font-size: 1.8rem;
    }

    .blog-content {
        padding: 20px;
    }

    .blog-title {
        font-size: 1.2rem;
    }
}

/* Special styling for different blog categories */
.blog-card:nth-child(1) .blog-image-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card:nth-child(2) .blog-image-container {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.blog-card:nth-child(3) .blog-image-container {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.blog-card:nth-child(4) .blog-image-container {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.blog-card:nth-child(5) .blog-image-container {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.blog-card:nth-child(6) .blog-image-container {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}


.blog-header-container {
    /* max-width: 1200px; */
    margin: 0 auto 60px;
    padding: 0 20px;
}

.blog-header-row {
    display: flex;
    flex-wrap: wrap;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.blog-header-image-col {
    flex: 0 0 25%;
    max-width: 25%;
}

.blog-header-content-col {
    flex: 0 0 75%;
    max-width: 75%;
    padding: 40px;
}

.blog-header-image {
    height: 100%;
    min-height: 300px;
    background: linear-gradient(135deg, #4fd1c7 0%, #319795 100%);
}

.blog-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-header-date {
    color: #4fd1c7;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-header-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c5282;
    margin-bottom: 20px;
    line-height: 1.3;
}

.blog-header-description {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.7;
    /* Add these properties to fix wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    /* Ensure it doesn't overflow container */
    hyphens: auto;
    /* Optional: for better word breaking */
}


.blog-header-content {
    /* Add to parent container if needed */
    overflow: hidden;
    word-break: break-word;
}

/* Optional: Add ellipsis for very long content with max height */
.blog-header-description.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Number of lines to show */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-header-description {
    /* Force break on any character when needed */
    word-break: break-all;
    /* Or more elegantly */
    word-break: break-word;
}

.blog-header-btn {
    display: inline-block;
    background: linear-gradient(135deg, #4fd1c7 0%, #319795 100%);
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.blog-header-btn:hover {
    background: linear-gradient(135deg, #319795 0%, #2c7a7b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 209, 199, 0.3);
}

/* Responsive adjustments */
@media (max-width: 992px) {

    .blog-header-image-col,
    .blog-header-content-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .blog-header-image {
        min-height: 200px;
    }

    .blog-header-content-col {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .blog-header-title {
        font-size: 1.6rem;
    }

    .blog-header-description {
        font-size: 1rem;
    }

    .blog-header-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}
