/**
 * Shelly Elementor Widgets Styles
 *
 * @package Shelly
 * @since 1.0.0
 */

/* ===== Shared Section Styles ===== */
.shelly-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.shelly-book-card a {
    gap: 8px;
}

.shelly-section-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.shelly-section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--foreground);
    line-height: 1.2;
}

/* ===== Hero Section Widget ===== */
.shelly-hero {
    position: relative;
    padding: 4rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    flex-direction: column;
}

.shelly-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(250, 248, 245, 0.85),
            rgba(250, 248, 245, 0.7),
            rgba(250, 248, 245, 0.9));
    z-index: 1;
}

.shelly-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 2rem 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.shelly-hero-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.shelly-hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--foreground);
    margin-bottom: 1.5rem;
}

.shelly-hero-title .text-gradient-gold {
    display: block;
}

.shelly-hero-desc {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--muted-foreground);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.shelly-hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== About the Book Widget ===== */
.shelly-about-book {
    padding: 6rem 0;
}

.shelly-about-book-desc h3 {
    font-weight: 400;
}

.shelly-about-book-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.shelly-about-book.layout-image-right .shelly-about-book-inner,
.shelly-about-book.layout-image-left .shelly-about-book-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.shelly-about-book.layout-image-left .shelly-about-book-image {
    order: -1;
}

.shelly-about-book.layout-centered .shelly-about-book-inner {
    max-width: 800px;
    text-align: center;
}

.shelly-about-book-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.shelly-about-book-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--foreground);
    margin-bottom: 1.5rem;
}

.shelly-about-book-desc {
    color: var(--muted-foreground);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.shelly-about-book-desc p {
    margin-bottom: 1.4rem;
}

.shelly-highlight-quote {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--primary);
    border-left: 3px solid var(--gold-light);
    padding-left: 1.5rem;
    margin-top: 1.5rem;
}

/* ===== Books Grid Widget ===== */
.shelly-books-grid {
    padding: 6rem 0;
}

.shelly-books-grid-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.shelly-books-cards {
    display: grid;
    gap: 2rem;
}

.shelly-books-cards[data-columns="1"] {
    grid-template-columns: 1fr;
}

.shelly-books-cards[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.shelly-books-cards[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.shelly-books-cards[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.shelly-book-card {
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
}

.shelly-book-card-image {
    overflow: hidden;
    max-width: 68%;
    border-radius: 10px;
    display: flex;
    justify-content: center;
}

.shelly-book-card-image img {
    width: auto;
    height: 100%;
    margin: 0 auto;

    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.shelly-book-card-content {
    padding-top: 1.5rem;
    text-align: center;
}

.shelly-book-card-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.75rem;
}

.shelly-book-card-desc {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.btn-sm {
    padding: 0.7rem 1.5rem;
    font-size: 0.7rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
}

/* ===== Testimonials Widget ===== */
.shelly-testimonials {
    padding: 6rem 0;
}

.shelly-testimonials-inner {
    max-width: 864px;
    margin: 0 auto;
}

.shelly-testimonials-carousel {
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.shelly-testimonial-item {
    display: block;
    border: 1px solid #e6d5b3;
    border-radius: .75rem;
    background: #f6f4ee;
    padding: 2.5rem;
}

/* Grid layout */
.shelly-testimonials.layout-grid .shelly-testimonials-inner {
    max-width: 1200px;
}

.shelly-testimonials.layout-grid .shelly-testimonials-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.shelly-testimonials.layout-grid .shelly-testimonial-item {
    display: block;
    opacity: 1;
    background: var(--card);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.shelly-testimonial-stars {
    font-size: 1.25rem;
    color: var(--gold);
    margin-bottom: 1rem;
    letter-spacing: 0.15em;
}

.shelly-testimonial-quote {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.4;
    color: var(--foreground);
    margin-bottom: 1.5rem;
    position: relative;
}

.shelly-testimonial-author cite {
    font-style: normal;
    font-weight: 600;
    color: #b88f3d;
    font-size: 0.9rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.shelly-testimonial-flex {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.shelly-testimonial-author-title {
    display: block;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

/* Testimonial Navigation */
.shelly-testimonials-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.shelly-testimonial-prev,
.shelly-testimonial-next {
    background: none;
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shelly-testimonial-prev:hover,
.shelly-testimonial-next:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

.shelly-testimonials-dots {
    display: flex;
    gap: 0.5rem;
}

.shelly-testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.shelly-testimonial-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* ===== Author Bio Widget ===== */
.shelly-author-bio {
    padding: 6rem 0;
}

.shelly-author-bio-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
    align-items: center;
}

.shelly-author-bio-inner {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
}

.shelly-author-bio.layout-image-right .shelly-author-bio-image {
    order: 1;
}

.shelly-author-bio-image img {
    width: 18rem;
    max-width: 100%;
    height: 24rem;
    box-shadow: 0 4px 20px -4px #d1a3474d;
}

.shelly-author-bio-text em.text-foreground {
    color: #4b4b4b;
}

.shelly-author-bio-text h4.font-display.italic {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px;
    font-weight: 300;
}

.shelly-author-bio-image {
    display: flex;
    justify-content: center;
}

.shelly-author-bio-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--foreground);
    margin-bottom: 1.5rem;
}

.shelly-author-bio-text {
    color: var(--muted-foreground);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.shelly-author-bio-text p {
    margin-bottom: 1rem;
}

.shelly-author-bio-quote {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--primary);
    border-left: 3px solid var(--gold-light);
    padding-left: 1.5rem;
    margin-top: 1.5rem;
}

/* ===== CTA Section Widget ===== */
.shelly-cta-section {
    position: relative;
    padding: 6rem 0;
    text-align: center;
    overflow: hidden;
}

.shelly-cta-overlay {
    position: absolute;
    inset: 0;
    background: rgba(61, 50, 40, 0.85);
    z-index: 1;
}

.shelly-cta-inner {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.shelly-cta-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--gold-light);
    margin-bottom: 1.5rem;
}

.shelly-cta-desc {
    font-size: 1.1rem;
    color: #7e7167;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.shelly-cta-scripture {
    margin-bottom: 2.5rem;
    border: none;
    padding: 0;
}

.shelly-cta-scripture p {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.shelly-cta-scripture cite {
    font-style: normal;
    font-size: 0.9rem;
    color: var(--gold-light);
    letter-spacing: 0.05em;
}

/* ===== Responsive Styles ===== */
@media (max-width: 768px) {

    .shelly-about-book.layout-image-right .shelly-about-book-inner,
    .shelly-about-book.layout-image-left .shelly-about-book-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .shelly-about-book.layout-image-left .shelly-about-book-image {
        order: 0;
    }

    .shelly-books-cards[data-columns="3"],
    .shelly-books-cards[data-columns="4"] {
        grid-template-columns: 1fr;
    }

    .shelly-books-cards[data-columns="2"] {
        grid-template-columns: 1fr;
    }

    .shelly-author-bio-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .shelly-author-bio.layout-image-right .shelly-author-bio-image {
        order: 0;
    }

    .shelly-hero-buttons {
        flex-direction: column;
    }

    .shelly-about-book,
    .shelly-books-grid,
    .shelly-testimonials,
    .shelly-author-bio,
    .shelly-cta-section {
        padding: 4rem 0;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    .shelly-books-cards[data-columns="3"],
    .shelly-books-cards[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 769px) {
    .shelly-testimonial-quote {
        font-size: 20px;
    }

    .shelly-testimonial-item {
        padding: 2rem;
    }

    .shelly-author-bio-container {
        display: flex;
        flex-direction: column;
    }

    .shelly-author-bio-inner {
        padding: 0 1rem;
    }

    .shelly-section-header {
        margin-bottom: 0rem;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animation class */
.shelly-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.shelly-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ===== Blog Posts Widget ===== */

.shelly-blog-cards {
    display: grid;
    gap: 2rem;
}

.shelly-blog-cards[data-columns="1"] {
    grid-template-columns: 1fr;
}

.shelly-blog-cards[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.shelly-blog-cards[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.shelly-blog-card {
    background: var(--card);
    border: 1px solid #e7e1da;
    border-radius: 8px;
    border-top: 4px solid var(--gold);
    overflow: hidden;
}

.shelly-blog-card:hover {
    border: 1px solid #E6D8B3;
    border-top: 4px solid var(--gold);
}

.shelly-blog-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.shelly-blog-card-category {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.shelly-blog-card-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--foreground);
    margin-bottom: 0.85rem;
}

.shelly-blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.shelly-blog-card-excerpt {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--muted-foreground);
    line-height: 1.65;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.shelly-blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.5rem;
}

.shelly-blog-card-date {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.shelly-blog-card-readmore {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

.shelly-blog-card-readmore:hover {
    color: var(--gold-dark);
}

.shelly-blog-card-readmore:hover .shelly-readmore-arrow {
    transform: translateX(4px);
}

.shelly-readmore-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.shelly-blog-no-posts {
    text-align: center;
    padding: 3rem;
    color: var(--muted-foreground);
    font-style: italic;
}

@media (max-width: 769px) {
    .shelly-blog-cards {
        display: flex;
        gap: 2rem;
        flex-direction: column;
    }

}

/* ===== Video Content Widget ===== */
.shelly-video-content-widget {
    padding: 6rem 0;
}

.shelly-video-content-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.shelly-video-content-video-col {
    position: relative;
}

.shelly-video-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.shelly-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Aspect Ratios */
.shelly-video-wrapper.ratio-16-9 {
    padding-bottom: 56.25%;
}

.shelly-video-wrapper.ratio-4-3 {
    padding-bottom: 75%;
}

.shelly-video-wrapper.ratio-1-1 {
    padding-bottom: 100%;
}

.shelly-video-wrapper.ratio-9-16 {
    padding-bottom: 177.77%;
}

.shelly-video-wrapper.ratio-original video {
    position: static;
    height: auto;
}

.shelly-video-wrapper.ratio-original {
    padding-bottom: 0;
}

.shelly-video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
}

.shelly-video-content-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #b8924b;
    margin-bottom: 1rem;
}

.shelly-video-content-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 600;
    line-height: 1.25;
    color: #3d3228;
    margin-bottom: 1.5rem;
}

.shelly-video-content-title span {
    color: #b8924b;
    font-style: italic;
}

.shelly-video-content-desc {
    color: #7a7a7a;
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.shelly-video-content-btn-wrapper {
    margin-top: 2rem;
}

.shelly-video-content-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #b8924b;
    color: #fff;
    padding: 0.65rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.shelly-video-content-btn .btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.shelly-video-content-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.shelly-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: opacity 0.3s ease;
    z-index: 10;
    opacity: 0;
    -webkit-tap-highlight-color: transparent;
}

.shelly-video-overlay.is-paused {
    opacity: 1;
}

.shelly-video-wrapper:hover .shelly-video-overlay.is-playing {
    opacity: 1;
}

.shelly-video-icon {
    transition: transform 0.3s ease;
    display: none;
}

.shelly-video-overlay.is-paused .shelly-video-play-btn {
    display: block;
}

.shelly-video-overlay.is-playing .shelly-video-pause-btn {
    display: block;
}

.shelly-video-overlay:hover .shelly-video-icon {
    transform: scale(1.1);
}

.shelly-video-overlay.is-paused-by-hover {
    pointer-events: auto !important;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .shelly-video-content-inner {
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .shelly-video-content-inner {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 3rem;
    }

    .shelly-video-content-video-col {
        order: -1;
    }

    .shelly-video-content-title {
        font-size: 2.2rem;
    }
}