html, body {
  overflow-x: hidden; 
  width: 100%;
  max-width: 100vw; 
  position: relative;
}

* {
  box-sizing: border-box;
}


.blog-container {
    max-width: 1200px;
    margin: 80px auto 40px;
    padding: 0 20px;
    position: relative;
    overflow: hidden;
}

.insights {
    text-align: center;
    margin-top: 1.8rem;
    margin-bottom: 38px;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    background: linear-gradient(45deg, var(--primary-blue), #34a853);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    padding-bottom: 20px;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.insights::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, #000000, green, #ff9900, #ff0000, #000000);
    border-radius: 2px;
}


/* blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 769px) and (min-width: 600px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 599px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

.blog-card {
    position: relative;
    background: white;
    border-radius: 10px;
    border: 2.5px solid #0077b5;  
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.blog-card::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    border: none;
    height: 0;
    background: var(--primary-blue);
    transition: height 0.5s ease;
    z-index: 1;
}

.blog-card:hover::after {
    height: calc(100% + 10px); 
}

.blog-image {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease-out;
}

.blog-card:hover .blog-image img {
    transform: scale(1.08);
}

.blog-date {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(2px);
}

.blog-content {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-content h2 {
    margin: 0 0 12px;
    color: var(--primary-blue);
    font-size: 1.2rem;
    line-height: 1.4;
}

.blog-excerpt {
    color: #5F6C76;
    margin-bottom: 16px;
    line-height: 1.5;
    font-size: 0.9rem;
    flex-grow: 1;
}


/* ===== Read More Button Styles ===== */
/* Desktop - Hover Effect */
.read-more-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
    text-align: center;
    width: 100%;
}

/* Mobile - Static Button */
.read-more-static {
    display: none; /* Hidden by default */
    text-align: center;
    padding: 10px 0;
    margin-top: 15px;
    color: var(--primary-blue);
    font-weight: 600;
}

.read-more-static::after {
    content: ' →';
    display: inline-block;
    margin-left: 5px;
    transition: transform 0.3s;
}

/* Hover effects for desktop */
.blog-card:hover .read-more-overlay {
    opacity: 1;
}

/* Mobile responsive changes */
@media (max-width: 768px) {
    /* Disable hover effects on mobile */
    .blog-card::after {
        display: none;
    }
    
    .blog-card:hover .blog-image img {
        transform: none;
    }
    
    /* Show static read more button */
    .read-more-overlay {
        display: none;
    }
    
    .read-more-static {
        display: block;
    }
    
    /* Adjust card padding for mobile */
    .blog-content {
        padding-bottom: 40px; /* Extra space for button */
    }
}

.blog-card:hover .read-more-overlay::after {
    transform: translateX(5px);
}

/* Category Tags with Different Colors */
.blog-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Event - Purple */
.blog-tag[data-category="event"] {
    background: #7E57C2;
}

/* Research - Teal */
.blog-tag[data-category="research"] {
    background: #26A69A;
}

/* Announcement - Amber */
.blog-tag[data-category="announcement"] {
    background: #FFA000;
}

/* blogletter Section */
.blogletter {
    background: #55b8ff;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin: 50px 0;
    border: 1px solid #BBDEFB;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Modern Floating Tile Animation */
.blogletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(255,255,255,0.15) 25%, transparent 25%) -50px 0,
        linear-gradient(225deg, rgba(255,255,255,0.15) 25%, transparent 25%) -50px 0,
        linear-gradient(315deg, rgba(255,255,255,0.1) 25%, transparent 25%),
        linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%);
    background-size: 100px 100px;
    animation: floating-tiles 8s infinite linear;
    z-index: 1;
    opacity: 0.7;
}

@keyframes floating-tiles {
    0% {
        background-position: 0 0, 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 100px 100px, 100px 100px, 100px 100px, 100px 100px;
    }
}

/* Subtle Glossy Overlay */
.blogletter::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    animation: glossy-sweep 6s infinite;
    z-index: 2;
}

@keyframes glossy-sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 150%;
    }
}

/* Content stays above animations */
.blogletter > * {
    position: relative;
    z-index: 3;
}

/* ALL YOUR ORIGINAL STYLES BELOW - COMPLETELY UNCHANGED */
.blogletter h3 {
    margin-top: 0;
    color: rgb(57, 57, 57);
    font-size: 1.8rem;
}

.blogletter p {
    color: #404f56;
    margin-bottom: 20px;
}

.blogletter-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.blogletter-form input {
    flex: 1 1 300px;
    padding: 12px 20px;
    border: 1px solid #BBDEFB;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s;
    min-width: 200px;
}

.blogletter-form input:focus {
    border-color: var(--primary-blue);
}

.blogletter-form .subscribe-btn {
    background: rgba(0, 90, 207, 0.687);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.blogletter-form .subscribe-btn:hover {
    background: white;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

/* Footer */
.blog-footer {
    text-align: center;
    padding-top: 0px;
    padding-bottom: 15px;
    background: #1976D2;
    color: white;
}

.social-links {
    margin-top: 0px; /* Reduced from 20px */
    display: flex;
    justify-content: center;
    gap: 5px; /* Reduced from 20px */
}

.social-links a {
    color: white;
    font-size: 1.2rem; /* Reduced from 1.5rem */
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5px; /* Reduced from 40px */
    height: 5px; /* Reduced from 40px */
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Contact buttons section - No changes made below this line */
.contact-details {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    padding: 1rem 0;
}

.contact-item {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.contact-label {
    font-weight: 600;
    color: black;
    margin-right: 0.5rem;
}

.contact-value {
    color: var(--text-dark);
}

.contact-spacing {
    height: 2rem;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 100%;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.contact-btn svg {
    width: 24px;
    height: 24px;
    fill: black;
}

/* Button Hover Effects */
.contact-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-md);
}

.contact-btn.email:hover {
    background: #D44638;
    color: white;
}

.contact-btn.linkedin:hover {
    background: #0077B5;
    color: white;
}

.contact-btn.whatsapp:hover {
    background: #25D366;
    color: white;
}

.contact-btn.instagram:hover {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
}

.contact-btn:hover svg {
    fill: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    html, body {
        height: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    main {
        flex: 1;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        padding: 15px;
    }

    footer {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        flex-shrink: 0;
    }

    .stay-tuned {
        font-size: 2.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .modal-container {
        margin: 10px;
        width: calc(100% - 20px);
    }
}

/* Fix for mobile scrolling */
html, body {
    width: 100%;
    min-height: 100%; /* Changed from height:100% */
    overflow-x: hidden;
}

.blog-container {
    overflow: visible; /* Changed from hidden */
}

@media (max-width: 768px) {
    body {
        display: block; /* Changed from flex */
        min-height: 100vh;
        overflow-y: auto; /* Explicitly allow vertical scrolling */
    }
    
    main {
        min-height: 0; /* Remove fixed height */
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .stay-tuned {
        font-size: 2.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Prevent horizontal overflow */
    html {
        overflow-x: hidden;
    }
    
    body {
        position: relative;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }

    /* Full width elements */
    main, footer {
        width: 100%;
        box-sizing: border-box;
    }

    /* Modal adjustments */
    .modal-container {
        margin: 0 10px;
        width: calc(100% - 20px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .stay-tuned {
        font-size: 2.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stay-tuned {
        font-size: 2rem;
    }
    
    .flash-message {
        padding-top: 40px;
        padding-bottom: 20px;
    }
    
    .close-flash {
        top: 8px;
        right: 8px;
    }
    
    .social-links {
        gap: 15px;
    }
    
    .social-links a {
        font-size: 1.3rem;
        width: 36px;
        height: 36px;
    }
}


/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-container {
    background: white;
    border-radius: 10px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-image {
    height: 300px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content {
    padding: 30px;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-date {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 5px;
}


.modal-tag.event {
    background-color: #4CAF50;
}

.modal-tag.announcement {
    background-color: #2196F3;
}

.modal-tag.award {
    background-color: #FF9800;
}

.modal-tag.strategy {
    background-color: #4cb1b3;
}

.modal-tag.closure {
    background-color: rgb(248, 98, 98);
}

.modal-title {
    margin: 10px 0 20px 0;
    font-size: 1.8rem;
    text-align: left;
    font-weight: bold;
    color: #105aa5;
}

.modal-body {
    line-height: 1.6;
    color: #555;
}

.modal-body p {
    margin-bottom: 15px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modal-container {
        max-height: 85vh;
    }

    .modal-image {
        height: 200px;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 15px;
    }

    .modal-title {
        font-size: 1.3rem;
    }
}