/**
 * Homepage Styles
 *
 * @package KnowledgePro
 */

/* Container */
.kw-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Titles */
.kw-section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: #1a365d;
    position: relative;
    padding-bottom: 1rem;
}

.kw-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #3182ce, #2b6cb0);
    border-radius: 2px;
}

/* ============================================================
   HERO BANNER
============================================================ */
.kw-hero-banner {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.kw-hero-banner-inner {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
}

.kw-hero-banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ============================================================
   SERVICES SECTION
============================================================ */
.kw-services-section {
    padding: 4rem 0;
    background-color: #f7fafc;
}

.kw-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.kw-service-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.kw-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.kw-service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kw-service-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kw-service-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.kw-service-content {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.kw-service-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.kw-service-link:hover {
    background: linear-gradient(135deg, #2b6cb0, #2c5282);
    transform: scale(1.05);
}

/* ============================================================
   VIDEOS SECTION
============================================================ */
.kw-videos-section {
    padding: 4rem 0;
    background-color: #ffffff;
}

.kw-videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kw-video-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.kw-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.kw-video-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.kw-video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #2d3748;
}

.kw-video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.kw-video-card:hover .kw-video-thumbnail img {
    transform: scale(1.1);
}

.kw-video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(26, 54, 93, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s ease;
}

.kw-video-card:hover .kw-video-play-icon {
    background: rgba(49, 130, 206, 0.95);
    transform: translate(-50%, -50%) scale(1.1);
}

.kw-video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.kw-video-title {
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kw-videos-more {
    text-align: center;
    margin-top: 2rem;
}

.kw-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.kw-button:hover {
    background: linear-gradient(135deg, #2b6cb0, #2c5282);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.4);
}

/* ============================================================
   RESPONSIVE DESIGN
============================================================ */
@media (max-width: 1024px) {
    .kw-services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .kw-videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .kw-section-title {
        font-size: 1.75rem;
    }

    .kw-services-section,
    .kw-videos-section {
        padding: 3rem 0;
    }

    .kw-services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .kw-videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .kw-service-card {
        padding: 1.5rem;
    }

    .kw-service-icon {
        width: 64px;
        height: 64px;
    }

    .kw-video-play-icon {
        width: 40px;
        height: 40px;
    }

    .kw-video-play-icon svg {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .kw-container {
        padding: 0 15px;
    }

    .kw-section-title {
        font-size: 1.5rem;
    }

    .kw-service-title {
        font-size: 1.125rem;
    }

    .kw-video-title {
        font-size: 0.9375rem;
    }
}

/* ============================================================
   SERVICES PAGE
============================================================ */
.kw-page-services {
    padding: 3rem 0;
}

.kw-page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.kw-page-title {
    font-size: 2.5rem;
    color: #1a365d;
}

.kw-services-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.kw-service-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .kw-service-item {
        grid-template-columns: 1fr;
    }
}

.kw-service-item-image {
    border-radius: 0.5rem;
    overflow: hidden;
}

.kw-service-item-image img {
    width: 100%;
    height: auto;
    display: block;
}

.kw-service-item-content {
    padding: 1rem 0;
}

.kw-service-item-title {
    font-size: 1.75rem;
    color: #1a365d;
    margin-bottom: 1rem;
}

.kw-service-item-excerpt {
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.kw-no-content {
    text-align: center;
    color: #718096;
    font-size: 1.125rem;
}

/* ============================================================
   VIDEOS PAGE
============================================================ */
.kw-page-videos {
    padding: 3rem 0;
}

.kw-videos-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .kw-videos-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .kw-videos-list {
        grid-template-columns: 1fr;
    }
}

.kw-video-item {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kw-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.kw-video-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.kw-video-item-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.kw-video-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kw-video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(26, 54, 93, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.kw-video-item-title {
    padding: 1rem;
    font-size: 1.125rem;
    color: #1a365d;
    margin: 0;
}

.kw-video-item-excerpt {
    padding: 0 1rem 1rem;
    color: #4a5568;
    font-size: 0.875rem;
    margin: 0;
}

/* Pagination */
.kw-pagination {
    margin-top: 3rem;
    text-align: center;
}

.kw-pagination a,
.kw-pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    text-decoration: none;
    color: #1a365d;
}

.kw-pagination a:hover,
.kw-pagination a:focus {
    background: #1a365d;
    color: white;
    border-color: #1a365d;
}

.kw-pagination .current {
    background: #1a365d;
    color: white;
    border-color: #1a365d;
}

/* ============================================================
   SINGLE POST TEMPLATES
============================================================ */

/* Common Single Styles */
.kw-single-service,
.kw-single-course,
.kw-single-video,
.kw-single-gallery,
.kw-single-article {
    padding: 3rem 0;
}

.kw-single-header {
    text-align: center;
    margin-bottom: 2rem;
}

.kw-single-title {
    font-size: 2.5rem;
    color: #1a365d;
    margin-bottom: 1rem;
    font-weight: 700;
}

.kw-single-featured-image {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.kw-single-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.kw-single-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 2rem;
}

.kw-single-content h2 {
    color: #1a365d;
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.kw-single-content h3 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.kw-single-content p {
    margin-bottom: 1rem;
}

.kw-single-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

/* Course Specific */
.kw-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.kw-course-price,
.kw-course-duration,
.kw-course-class-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
}

.kw-course-price strong,
.kw-course-duration strong,
.kw-course-class-count strong {
    margin-right: 0.5rem;
}

/* Video Specific */
.kw-video-duration-badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 1rem;
}

.kw-video-player {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.kw-video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Gallery Specific */
.kw-gallery-category {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

.kw-category-badge {
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.kw-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kw-gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.kw-gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Article Specific */
.kw-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
}

.kw-article-category {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kw-article-date {
    color: #718096;
    font-size: 0.95rem;
}

.kw-comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kw-single-service,
    .kw-single-course,
    .kw-single-video,
    .kw-single-gallery,
    .kw-single-article {
        padding: 2rem 0;
    }

    .kw-single-title {
        font-size: 1.75rem;
    }

    .kw-course-meta {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .kw-course-price,
    .kw-course-duration,
    .kw-course-class-count {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }

    .kw-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .kw-gallery-grid img {
        height: 150px;
    }

    .kw-article-meta {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .kw-single-title {
        font-size: 1.5rem;
    }

    .kw-single-content {
        font-size: 1rem;
    }

    .kw-gallery-grid {
        grid-template-columns: 1fr;
    }
}
