/* ========================================
   MEDIA.CSS
   Styles for CV media component
======================================== */

/* ----------------------------------------
   MEDIA APPEARANCES SECTION
---------------------------------------- */
.media-subsection {
    margin-bottom: 30px;
}

.media-subsection:last-child {
    margin-bottom: 0;
}

.media-subtitle {
    color: #4a2c17;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(139, 69, 19, 0.3);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.media-item {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid rgba(139, 69, 19, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.media-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(139, 69, 19, 0.4);
}

.media-icon {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(139, 69, 19, 0.3);
}

.media-details {
    flex-grow: 1;
}

.media-details h5 {
    color: #4a2c17;
    font-size: 1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.media-link a {
    color: #8B4513;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid #8B4513;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.media-link a:hover {
    color: #A0522D;
    border-bottom-color: #A0522D;
    text-decoration: underline;
}

.media-date {
    color: #8B4513;
    font-size: 0.8rem;
    font-weight: 500;
    font-style: italic;
    margin-bottom: 8px;
    opacity: 0.9;
}

/* ----------------------------------------
   PRESS ARTICLES SECTION
---------------------------------------- */
/* ----------------------------------------
   PRESS ARTICLES GRID - 3 ITEMS PER ROW FIX
---------------------------------------- */

.press-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force exactly 3 columns */
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

/* Ensure each press item takes exactly 1/3 of the width */
.press-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    min-width: 0; /* Prevent flex items from growing beyond container */
}

.press-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(139, 69, 19, 0.3);
}

.press-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.press-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.press-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.press-item:hover .press-photo {
    transform: scale(1.05);
}

.press-caption {
    padding: 15px;
}

.press-caption h5 {
    color: #4a2c17;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.press-caption p {
    color: #8B4513;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    opacity: 0.8;
}

/* Placeholder for missing images */
.press-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    color: #8B4513;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ----------------------------------------
   MEDIA SUBTITLE WITH ARTICLE COUNT
---------------------------------------- */
.media-subtitle {
    color: #4a2c17;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(139, 69, 19, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-count {
    font-size: 0.9rem;
    font-weight: 500;
    color: #8B4513;
    opacity: 0.8;
    font-style: italic;
}

/* ----------------------------------------
   RESPONSIVE - MAINTAIN 3 COLUMNS UNTIL MOBILE
---------------------------------------- */

/* Large screens - keep 3 columns */
@media (min-width: 1200px) {
    .press-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Medium screens - keep 3 columns but smaller gap */
@media (max-width: 1199px) and (min-width: 768px) {
    .press-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .press-image {
        height: 180px;
    }
}

/* Small tablets - 2 columns */
@media (max-width: 767px) and (min-width: 480px) {
    .press-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .press-image {
        height: 150px;
    }
    
    .press-caption {
        padding: 12px;
    }
    
    .press-caption h5 {
        font-size: 0.9rem;
    }
    
    .press-caption p {
        font-size: 0.8rem;
    }
}

/* Mobile - 1 column */
@media (max-width: 479px) {
    .press-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .press-image {
        height: 200px;
    }
}

/* ----------------------------------------
   RESPONSIVE FOR MEDIA SECTION
---------------------------------------- */
@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: 1fr;
    }
    
    .media-item {
        padding: 12px 15px;
    }
    
    .media-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .press-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .press-image {
        height: 150px;
    }
    
    .press-caption {
        padding: 12px;
    }
    
    .press-caption h5 {
        font-size: 0.9rem;
    }
    
    .press-caption p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .press-grid {
        grid-template-columns: 1fr;
    }
}