/**
 * Sarfraz Departments Manager - Frontend Styles
 */

/* Reset and Base */
.sdm-content-list,
.sdm-content-grid,
.sdm-department-feed {
    margin: 0;
    padding: 0;
}

/* Grid Layouts */
.sdm-grid-cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.sdm-grid-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sdm-grid-cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.sdm-grid-cols-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }
.sdm-grid-cols-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 15px; }

/* List Layout */
.sdm-content-list.sdm-columns-1 {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* List Item */
.sdm-list-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}

.sdm-list-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sdm-list-item .sdm-item-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
}

.sdm-list-item .sdm-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.sdm-item-content {
    flex: 1;
}

.sdm-item-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.sdm-item-title a {
    color: #1d2327;
    text-decoration: none;
}

.sdm-item-title a:hover {
    color: #2271b1;
}

.sdm-item-date {
    font-size: 13px;
    color: #646970;
    margin-bottom: 8px;
}

.sdm-item-excerpt {
    font-size: 14px;
    color: #50575e;
    line-height: 1.6;
}

/* Grid Item */
.sdm-grid-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sdm-grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.sdm-grid-item .sdm-item-thumbnail {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.sdm-grid-item .sdm-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sdm-grid-item:hover .sdm-item-thumbnail img {
    transform: scale(1.05);
}

.sdm-grid-item .sdm-item-content {
    padding: 20px;
}

.sdm-grid-item .sdm-item-title {
    font-size: 16px;
    margin-bottom: 10px;
}

.sdm-item-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #646970;
    margin-bottom: 10px;
}

.sdm-item-type {
    background: #f0f0f1;
    padding: 2px 8px;
    border-radius: 3px;
}

/* Feed Item */
.sdm-feed-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sdm-feed-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #f0f0f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sdm-feed-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #646970;
}

.sdm-feed-content {
    flex: 1;
}

.sdm-feed-type {
    font-size: 11px;
    text-transform: uppercase;
    color: #646970;
    letter-spacing: 0.5px;
}

.sdm-feed-title {
    margin: 4px 0;
    font-size: 15px;
}

.sdm-feed-title a {
    color: #1d2327;
    text-decoration: none;
}

.sdm-feed-title a:hover {
    color: #2271b1;
}

.sdm-feed-date {
    font-size: 12px;
    color: #646970;
}

/* Teacher Card */
.sdm-teacher-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.sdm-teacher-card:hover {
    transform: translateY(-3px);
}

.sdm-teacher-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #f0f0f1;
}

.sdm-teacher-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sdm-teacher-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sdm-teacher-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #c3c4c7;
}

.sdm-teacher-name {
    margin: 0 0 8px;
    font-size: 18px;
}

.sdm-teacher-name a {
    color: #1d2327;
    text-decoration: none;
}

.sdm-teacher-designation {
    color: #2271b1;
    font-size: 14px;
    margin: 0 0 5px;
}

.sdm-teacher-qualification {
    color: #646970;
    font-size: 13px;
    margin: 0;
}

/* Course Card */
.sdm-course-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sdm-course-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
}

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

.sdm-course-info {
    padding: 20px;
}

.sdm-course-title {
    margin: 0 0 12px;
    font-size: 17px;
}

.sdm-course-title a {
    color: #1d2327;
    text-decoration: none;
}

.sdm-course-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #646970;
}

.sdm-course-duration .dashicons,
.sdm-course-meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

.sdm-course-fee {
    background: #e7f3e8;
    color: #1e4620;
    padding: 2px 10px;
    border-radius: 3px;
    font-weight: 500;
}

.sdm-course-teacher {
    font-size: 13px;
    color: #646970;
    margin: 0;
}

.sdm-course-teacher a {
    color: #2271b1;
}

/* Event Card */
.sdm-event-card {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 15px;
}

.sdm-event-date-box {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: #fff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sdm-event-day {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.sdm-event-month {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.sdm-event-info {
    flex: 1;
}

.sdm-event-title {
    margin: 0 0 10px;
    font-size: 17px;
}

.sdm-event-title a {
    color: #1d2327;
    text-decoration: none;
}

.sdm-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #646970;
}

.sdm-event-meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

.sdm-event-online {
    color: #1e4620;
}

/* Book Card */
.sdm-book-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.sdm-book-card:hover {
    transform: translateY(-3px);
}

.sdm-book-cover {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f0f0f1;
}

.sdm-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sdm-book-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sdm-book-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #c3c4c7;
}

.sdm-book-info {
    padding: 15px;
}

.sdm-book-title {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.3;
}

.sdm-book-title a {
    color: #1d2327;
    text-decoration: none;
}

.sdm-book-author {
    font-size: 13px;
    color: #646970;
    margin: 0 0 12px;
}

.sdm-book-download {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #2271b1;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.sdm-book-download:hover {
    background: #135e96;
    color: #fff;
}

.sdm-book-download .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Mehfil Card */
.sdm-mehfil-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sdm-mehfil-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
}

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

.sdm-mehfil-info {
    padding: 20px;
}

.sdm-mehfil-type {
    display: inline-block;
    background: #e7f3e8;
    color: #1e4620;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.sdm-mehfil-title {
    margin: 0 0 8px;
    font-size: 17px;
}

.sdm-mehfil-title a {
    color: #1d2327;
    text-decoration: none;
}

.sdm-mehfil-date {
    font-size: 13px;
    color: #646970;
    margin: 0 0 12px;
}

.sdm-mehfil-media {
    display: flex;
    gap: 8px;
}

.sdm-media-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f0f0f1;
    border-radius: 50%;
    color: #646970;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.sdm-media-btn:hover {
    background: #2271b1;
    color: #fff;
}

/* Gallery */
.sdm-gallery {
    display: grid;
    gap: 10px;
}

.sdm-gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
}

.sdm-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sdm-gallery-item:hover img {
    transform: scale(1.05);
}

/* Carousel */
.sdm-content-carousel {
    position: relative;
    overflow: hidden;
}

.sdm-carousel-wrapper {
    display: flex;
    transition: transform 0.3s ease;
}

.sdm-carousel-item {
    flex: 0 0 33.333%;
    padding: 0 10px;
    box-sizing: border-box;
}

.sdm-carousel-content {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sdm-carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.sdm-carousel-prev,
.sdm-carousel-next {
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 18px;
    color: #1d2327;
    pointer-events: auto;
    transition: background 0.2s;
}

.sdm-carousel-prev:hover,
.sdm-carousel-next:hover {
    background: #2271b1;
    color: #fff;
}

/* Department Page */
.sdm-department-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.sdm-department-header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 40px;
    border-left: 5px solid;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sdm-department-header .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
}

.sdm-department-header h1 {
    margin: 0 0 10px;
    font-size: 32px;
}

.sdm-department-header p {
    margin: 0;
    color: #646970;
    font-size: 16px;
}

.sdm-department-section {
    margin-bottom: 40px;
}

.sdm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sdm-section-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
}

.sdm-section-header .dashicons {
    color: #646970;
}

.sdm-view-all {
    color: #2271b1;
    text-decoration: none;
    font-size: 14px;
}

.sdm-view-all:hover {
    text-decoration: underline;
}

/* Mini Card */
.sdm-mini-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sdm-mini-card .sdm-mini-thumb {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.sdm-mini-card .sdm-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sdm-mini-card h3 {
    margin: 0;
    padding: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.sdm-mini-card h3 a {
    color: #1d2327;
    text-decoration: none;
}

/* No Content Message */
.sdm-no-content {
    text-align: center;
    padding: 40px 20px;
    color: #646970;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
    .sdm-grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
    .sdm-grid-cols-5 { grid-template-columns: repeat(4, 1fr); }
    .sdm-grid-cols-6 { grid-template-columns: repeat(4, 1fr); }
    
    .sdm-carousel-item {
        flex: 0 0 50%;
    }
}

@media (max-width: 768px) {
    .sdm-grid-cols-3,
    .sdm-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .sdm-grid-cols-5,
    .sdm-grid-cols-6 { grid-template-columns: repeat(3, 1fr); }
    
    .sdm-list-item {
        flex-direction: column;
    }
    
    .sdm-list-item .sdm-item-thumbnail {
        width: 100%;
        height: 180px;
    }
    
    .sdm-event-card {
        flex-direction: column;
        text-align: center;
    }
    
    .sdm-event-date-box {
        width: 100%;
        height: auto;
        padding: 15px;
        flex-direction: row;
        gap: 10px;
    }
    
    .sdm-event-meta {
        justify-content: center;
    }
    
    .sdm-carousel-item {
        flex: 0 0 100%;
    }
}

@media (max-width: 480px) {
    .sdm-grid-cols-2,
    .sdm-grid-cols-3,
    .sdm-grid-cols-4,
    .sdm-grid-cols-5,
    .sdm-grid-cols-6 { grid-template-columns: 1fr; }
    
    .sdm-teacher-card {
        padding: 20px;
    }
    
    .sdm-teacher-photo {
        width: 100px;
        height: 100px;
    }
}
