/* AI 101 Section CSS - Add this to your index.css file */

/* AI 101 Section */
.ai101-section {
    padding: 80px 20px;
    background: #ffffff;
    min-height: 100vh;
}

.ai101-container {
    max-width: 1200px;
    margin: 0 auto;
}

.ai101-title {
  font-family: 'Poppins-ExtraBold', sans-serif;
  font-size: 30px;
  font-weight: 700;
  text-align: start;
  color: #1E1E1E;
  margin-bottom: 60px;
  letter-spacing: -0.02em;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* Article Card - Using Vector Speech Bubble */
.article-card {
    background-image: url('../img/article-card.png'); /* Your speech bubble vector */
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    padding: 20px;
    aspect-ratio: 3 / 4.4; /* Adjust based on your vector proportions */
    display: flex;
    flex-direction: column;
    
    /* Remove default card styling since we're using vector */
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.article-card:hover {
    transform: translateY(-8px) scale(1.02);
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.15));
}

/* Article Thumbnail - Positioned within vector */
.article-thumbnail {
    width: 100%;
    height: 200px; /* Adjusted for vector layout */
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 16px;
    margin-top: 10px; /* Space from vector top */
    margin-left: -5px;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-thumbnail-placeholder {
    width: 60px;
    height: 60px;
    background: #e5e7eb;
    border-radius: 8px;
}

/* Article Content - Positioned within vector */
.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 10px;
    margin-bottom: 30px; /* Space from vector bottom/tail */
}

/* Article Source */
.article-source {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.article-logo {
    width: 40px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.article-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Fallback styling for text logos */
.article-logo-text {
    background: #3b82f6;
    color: white;
    font-size: 12px;
    font-weight: 600;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-source-name {
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
}

/* Article Date */
.article-date {
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 16px;
    color: #262626;
    margin-bottom: 16px;
    font-weight: 500;
}

/* Article Title - Adjusted sizing for vector */
.article-title {
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #262626;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article Description - Adjusted for vector layout */
.article-description {
    font-size: 14px;
    color: #696868;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 35px;
    margin-top: 40px;
}

.pagination-button {
    width: 86px;
    height: 61px;
    border: none;
    border-radius: 8px;
    background: #004AD6;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: bolder;
}

.pagination-button:hover:not(:disabled) {
    background: #004AD6;
    transform: translateY(-1px);
}

.pagination-button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.pagination-numbers{
    display: flex;
    gap: 15px;
}

.pagination-number {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #262626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 500;
}

.pagination-number.active {
    background: #004AD6;
    color: white;
    border-radius: 50%;
}

.pagination-number:hover:not(.active) {
    background: #f3f4f6;
    color: #262626;
}

/* Loading State */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.error-container {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

/* Responsive Design */

/* Tablet - 768px and below */
@media (max-width: 768px) {
    .ai101-title {
        font-size: 36px;
        margin-bottom: 40px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .article-thumbnail {

        height: 100px;
        margin-bottom: 12px;
    }
    
    .article-content {
        padding: 0 8px;
        margin-bottom: 25px;
    }
    
    .article-title {
        font-size: 17px;
    }
    
    .article-description {
        font-size: 14px;
    }
}

/* Mobile Large - 760px and below */
@media (max-width: 760px) {
    .ai101-section {
        padding: 60px 16px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-card {
        max-width: 350px;
        margin: 0 auto;
        /* aspect-ratio: 3 / 3.8; */
    }

    .article-thumbnail {
        width: 100%; /* Responsive width with consistent padding */
        max-width: 310px;
        height: 190px;
        margin-top: 0;
        /* margin: 8px 16px 10px 16px; Equal left/right margins */
    }

    .pagination {
        gap: 42px;
    }
}

/* iPhone XS and similar - 375px and below */
@media (max-width: 375px) and (min-width: 361px) {
    
    .article-thumbnail {
        width: 100%; /* Account for card internal padding */
        max-width: 310px; /* Smaller max-width for iPhone XS */
        height: 180px;
    }

    .article-source-name,
    .article-date {
        font-size: 16px;
    }
    
    .article-content {
        margin-bottom: 22px;
    }
    
    .article-title {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .article-description {
        font-size: 14px;
    }

    .pagination {
        gap: 19px;
    }
}

/* Mobile Medium - 390px and below (but above 375px) */
@media (max-width: 390px) and (min-width: 376px) {
    .ai101-title {
        font-size: 26px;
        font-weight: 800;
        margin-bottom: 30px;
    }
    
    .article-card {
        aspect-ratio: 3 / 4.5;
        padding: 16px;
    }
    
    .article-thumbnail {
        width: 100%;
        max-width: 310px;
        height: 185px;
        margin: 0;
    }

    .article-source-name,
    .article-date {
        font-size: 16px;
    }
    
    .article-content {
        margin-bottom: 22px;
        padding-top: 8px;
    }
    
    .article-title {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .article-description {
        font-size: 14px;
    }
    
    .pagination-button,
    .pagination-number {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    .article-card {
        aspect-ratio: 3 / 4.5;
    }
}

/* Mobile Small - 360px and below */
@media (max-width: 360px) {
    .ai101-section {
        padding: 40px 12px;
    }
    
    .ai101-title {
        font-size: 24px;
    }
    
    .article-card {
        max-width: 320px;
        padding: 14px;
        aspect-ratio: 3 / 4.5;
    }
    
    .article-thumbnail {
        width: 100%;
        max-width: 270px;
        height: 170px;
        margin: 5px 0px 10px 5px;
    }
    
    .pagination {
        gap: 15px;
    }
}

/* Mobile Extra Small - 320px and below */
@media (max-width: 320px) {
    .ai101-title {
        font-size: 22px;
        line-height: 1.2;
    }
    
    .article-card {
        padding: 12px;
        aspect-ratio: 3 / 4.2;
    }
    
    .article-thumbnail {
        width: calc(100% - 12px);
        max-width: 250px;
        height: 160px;
        margin: 8px 6px 10px 6px;
    }
    
    .article-content {
        margin-bottom: 20px;
    }
    
    .pagination-button,
    .pagination-number {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .pagination {
        gap: 6px;
    }
}




/* Default (desktop) – will use 30x30 from the SVG itself */
.pagination-button svg {
  width: 30px;
  height: 30px;
}

/* Mobile (390px and below) – overrides the inline size */
@media (max-width: 390px) {
.pagination-button {
    width: 42px;
    height: 30px;
}

  .pagination-button svg {
    width: 15px !important;
    height: 15px !important;
  }
}
