/**
 * Advanced Carousel Builder - Frontend Styles v3.0.0
 * Multiple card styles with read more button and custom style support
 */

:root {
    --acb-primary: #6366f1;
    --acb-gray-50: #f9fafb;
    --acb-gray-100: #f3f4f6;
    --acb-gray-200: #e5e7eb;
    --acb-gray-700: #374151;
    --acb-gray-900: #111827;
}

/* Carousel Wrapper */
.acb-carousel-wrapper {
    width: 100%;
    padding: 40px 0;
    position: relative;
}

.acb-carousel {
    overflow: hidden;
    position: relative;
}

/* Base Card Styles */
.acb-card {
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.acb-card-header {
    padding: 20px;
}

.acb-card-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.acb-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.acb-card-title a:hover {
    color: var(--acb-primary);
}

.acb-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #6b7280;
}

.acb-card-excerpt {
    padding: 0 20px 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    flex-grow: 1;
}

.acb-card-image {
    position: relative;
    overflow: hidden;
}

.acb-card-image a {
    display: block;
}

.acb-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.acb-card:hover .acb-card-image img {
    transform: scale(1.05);
}

/* Read More Button */
.acb-card-footer {
    padding: 0 20px 20px;
    margin-top: auto;
}

.acb-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--acb-primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    line-height: 1;
}

.acb-read-more:hover {
    opacity: 0.9;
    transform: translateX(4px);
    color: white;
    text-decoration: none;
}

.acb-read-more svg {
    transition: transform 0.2s ease;
}

.acb-read-more:hover svg {
    transform: translateX(4px);
}

/* Navigation Arrows */
.acb-carousel .swiper-button-prev,
.acb-carousel .swiper-button-next {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.acb-carousel .swiper-button-prev:hover,
.acb-carousel .swiper-button-next:hover {
    background: var(--acb-primary);
    transform: scale(1.1);
}

.acb-carousel .swiper-button-prev::after,
.acb-carousel .swiper-button-next::after {
    font-size: 20px;
    font-weight: 900;
    color: var(--acb-gray-700);
    transition: color 0.3s ease;
}

.acb-carousel .swiper-button-prev:hover::after,
.acb-carousel .swiper-button-next:hover::after {
    color: white;
}

.acb-carousel .swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Pagination */
.acb-carousel .swiper-pagination {
    position: relative;
    margin-top: 32px;
}

.acb-carousel .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: var(--acb-gray-200);
    opacity: 1;
    transition: all 0.3s ease;
}

.acb-carousel .swiper-pagination-bullet-active {
    background: var(--acb-primary);
    width: 32px;
    border-radius: 6px;
}

/* ========================================
   FACEBOOK STYLE
   ======================================== */
.acb-style-facebook .acb-card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e4e6eb;
}

.acb-style-facebook .acb-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.acb-style-facebook .acb-card-header {
    border-bottom: 1px solid #e4e6eb;
}

.acb-style-facebook .acb-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #050505;
}

.acb-style-facebook .acb-card-meta {
    color: #65676b;
    font-size: 13px;
}

.acb-style-facebook .acb-card-excerpt {
    color: #050505;
    font-size: 14px;
}

.acb-style-facebook .acb-card-image {
    border-radius: 0;
}

.acb-style-facebook .acb-read-more {
    background: #1877f2;
    border-radius: 8px;
}

/* ========================================
   MODERN STYLE
   ======================================== */
.acb-style-modern .acb-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.acb-style-modern .acb-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.acb-style-modern .acb-card-image {
    height: 200px;
    position: relative;
}

.acb-style-modern .acb-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.acb-style-modern .acb-card-header,
.acb-style-modern .acb-card-excerpt,
.acb-style-modern .acb-card-footer {
    background: white;
}

.acb-style-modern .acb-card-title {
    color: #1e293b;
    font-weight: 800;
    font-size: 20px;
}

.acb-style-modern .acb-card-meta {
    color: #64748b;
}

.acb-style-modern .acb-read-more {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
}

/* ========================================
   MINIMAL STYLE
   ======================================== */
.acb-style-minimal .acb-card {
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 24px;
}

.acb-style-minimal .acb-card:hover {
    transform: none;
}

.acb-style-minimal .acb-card-image {
    height: 240px;
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.acb-style-minimal .acb-card-header {
    padding: 0 0 12px 0;
}

.acb-style-minimal .acb-card-title {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.02em;
}

.acb-style-minimal .acb-card-excerpt {
    padding: 0;
    font-size: 16px;
    color: #6b7280;
    line-height: 1.7;
}

.acb-style-minimal .acb-card-meta {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

.acb-style-minimal .acb-card-footer {
    padding: 12px 0 0 0;
}

.acb-style-minimal .acb-read-more {
    background: transparent;
    color: #111827;
    border: 2px solid #111827;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 13px;
}

.acb-style-minimal .acb-read-more:hover {
    background: #111827;
    color: white;
}

/* ========================================
   ELEGANT STYLE
   ======================================== */
.acb-style-elegant .acb-card {
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

.acb-style-elegant .acb-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.acb-style-elegant .acb-card-image {
    height: 280px;
    filter: grayscale(0.2);
}

.acb-style-elegant .acb-card:hover .acb-card-image {
    filter: grayscale(0);
}

.acb-style-elegant .acb-card-header {
    background: white;
    padding: 24px;
}

.acb-style-elegant .acb-card-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 24px;
    font-weight: 400;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.acb-style-elegant .acb-card-excerpt {
    background: white;
    padding: 0 24px 24px;
    font-size: 15px;
    color: #475569;
    line-height: 1.8;
    font-family: Georgia, 'Times New Roman', serif;
}

.acb-style-elegant .acb-card-meta {
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

.acb-style-elegant .acb-card-footer {
    background: white;
    padding: 0 24px 24px;
}

.acb-style-elegant .acb-read-more {
    background: transparent;
    color: #1e293b;
    border: 1px solid #1e293b;
    border-radius: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    letter-spacing: 0.02em;
}

.acb-style-elegant .acb-read-more:hover {
    background: #1e293b;
    color: white;
}

/* ========================================
   HERO SLIDER STYLE
   Full-screen image background with text overlay
   Ideal for sports/cycling content with action photos
   ======================================== */

/* Break out of any WordPress container to be full-viewport-width */
.acb-style-hero.acb-carousel,
.acb-carousel-wrapper:has(.acb-style-hero) {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0;
    overflow: hidden;
}

.acb-style-hero .swiper-slide {
    height: auto;
    width: 100% !important;
}

.acb-style-hero .acb-hero-card {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    max-height: 800px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a2e;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.acb-style-hero .acb-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.1) 70%,
        transparent 100%
    );
    z-index: 1;
}

.acb-style-hero .acb-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 48px 48px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.acb-style-hero .acb-hero-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0;
}

.acb-style-hero .acb-hero-meta .acb-author {
    color: #3b82f6;
    font-weight: 600;
}

.acb-style-hero .acb-hero-meta .acb-date::before {
    content: '\2022';
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.4);
}

.acb-style-hero .acb-hero-title {
    margin: 0;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    padding: 0;
}

.acb-style-hero .acb-hero-title a {
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: color 0.2s ease;
}

.acb-style-hero .acb-hero-title a:hover {
    color: #60a5fa;
}

.acb-style-hero .acb-hero-excerpt {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.6;
    padding: 0;
    max-width: 700px;
}

.acb-style-hero .acb-hero-footer {
    padding: 8px 0 0;
}

.acb-style-hero .acb-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #3b82f6;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.25s ease;
    border: none;
}

.acb-style-hero .acb-hero-btn:hover {
    background: #2563eb;
    color: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

/* Hero navigation arrows - glassmorphism */
.acb-style-hero .swiper-button-prev,
.acb-style-hero .swiper-button-next {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.acb-style-hero .swiper-button-prev:hover,
.acb-style-hero .swiper-button-next:hover {
    background: rgba(59, 130, 246, 0.8);
    border-color: rgba(59, 130, 246, 0.6);
    transform: scale(1.1);
}

.acb-style-hero .swiper-button-prev::after,
.acb-style-hero .swiper-button-next::after {
    font-size: 20px;
    font-weight: 900;
    color: #ffffff;
}

/* Hero pagination */
.acb-style-hero .swiper-pagination {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    margin-top: 0;
    z-index: 3;
}

.acb-style-hero .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

.acb-style-hero .swiper-pagination-bullet-active {
    background: #3b82f6;
    width: 28px;
    border-radius: 5px;
}

/* Hero card without image */
.acb-style-hero .acb-hero-card:not([style*="background-image"]) {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .acb-carousel-wrapper {
        padding: 24px 0;
    }

    .acb-card-title {
        font-size: 18px;
    }

    .acb-card-excerpt {
        font-size: 14px;
    }

    .acb-style-hero .acb-hero-card {
        height: 60vh;
        min-height: 350px;
    }

    .acb-style-hero .acb-hero-title {
        font-size: 28px;
    }

    .acb-style-hero .acb-hero-content {
        padding: 40px 32px 32px;
    }
}

@media (max-width: 768px) {
    .acb-carousel .swiper-button-prev,
    .acb-carousel .swiper-button-next {
        width: 40px;
        height: 40px;
    }

    .acb-carousel .swiper-button-prev::after,
    .acb-carousel .swiper-button-next::after {
        font-size: 16px;
    }

    .acb-card-header {
        padding: 16px;
    }

    .acb-card-excerpt {
        padding: 0 16px 16px;
    }

    .acb-card-footer {
        padding: 0 16px 16px;
    }

    .acb-style-hero .acb-hero-card {
        height: 50vh;
        min-height: 300px;
    }

    .acb-style-hero .acb-hero-content {
        padding: 32px 24px 24px;
    }

    .acb-style-hero .acb-hero-title {
        font-size: 22px;
    }

    .acb-style-hero .acb-hero-excerpt {
        font-size: 14px;
    }

    .acb-style-hero .acb-hero-btn {
        padding: 10px 22px;
        font-size: 14px;
    }

    .acb-style-hero .swiper-button-prev,
    .acb-style-hero .swiper-button-next {
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.acb-card:focus-within {
    outline: 2px solid var(--acb-primary);
    outline-offset: 4px;
}

.acb-card-title a:focus,
.acb-card-image a:focus,
.acb-read-more:focus {
    outline: 2px solid var(--acb-primary);
    outline-offset: 2px;
}

/* Performance optimizations */
.swiper-slide {
    will-change: transform;
}

.acb-card-image {
    contain: layout;
}

/* No posts message */
.acb-no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* Image placeholder */
.acb-card-image.acb-no-image {
    background: var(--acb-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.acb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

.acb-placeholder svg {
    width: 80px;
    height: 80px;
}

/* Style specific image heights */
.acb-style-facebook .acb-card-image {
    min-height: 200px;
}

.acb-style-modern .acb-card-image {
    height: 220px;
}

.acb-style-minimal .acb-card-image {
    height: 240px;
}

.acb-style-elegant .acb-card-image {
    height: 280px;
}
