
/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero .tagline {
    font-size: clamp(1.2rem, 3vw, 1.75rem);
    color: var(--text);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero .description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Popular Decks Section */
.popular-decks-section {
    padding: 4rem 0;
    background: var(--background);
    margin: 3rem 0;
}

.popular-decks-section h2 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.popular-decks-section .subtitle {
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-light);
    margin-bottom: 3rem;
}

.deck-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.deck-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-light);
}

.deck-card .deck-icon {
    width: 60px;
    height: 60px;
    background: var(--background);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.deck-card h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.deck-card .deck-meta {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.deck-card .deck-meta i {
    margin-right: 0.25rem;
}

.deck-card .deck-meta span {
    margin-right: 1rem;
}

.deck-card .deck-description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.deck-card .deck-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.deck-tag {
    background: var(--background);
    color: var(--text);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
}

.deck-card .btn-view {
    width: 100%;
    padding: 0.625rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.deck-card .btn-view:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 127, 215, 0.3);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 50%;
    opacity: 1;
    transition: all 0.3s ease;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: none;
    background-image: none;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    color: white;
}

/* Multi-item carousel: show 3 cards per carousel slide (grouped) */
.carousel-inner {
    overflow: hidden;
}

/* Each carousel item is one full slide that contains a row of cards */
.popular-decks-section .carousel-item {
    width: 100%;
    padding: 0.25rem 0;
    display: flex !important;
    gap: 1rem;
    align-items: stretch;
    justify-content: center;
    float: none !important;
    position: relative;
}

/* Each card inside the slide takes one third of available width */
.popular-decks-section .carousel-item .deck-card {
    flex: 0 0 calc(33.333% - 0.666rem);
    max-width: calc(33.333% - 0.666rem) !important;
    width: calc(33.333% - 0.666rem) !important;
    height: 100%;
    margin: 0;
}

/* Slightly fade non-active slides for emphasis */
.popular-decks-section .carousel-item {
    opacity: 0.85;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.popular-decks-section .carousel-item.active {
    opacity: 1;
}

/* Responsive: stack cards on small screens */
@media (max-width: 767.98px) {
    .popular-decks-section .carousel-item { flex-direction: column; }
    .popular-decks-section .carousel-item .deck-card { flex: 1 1 100% !important; max-width: 100% !important; width: 100% !important; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Show 2 per slide on medium screens */
    .popular-decks-section .carousel-item .deck-card { flex: 0 0 calc(50% - 0.5rem); max-width: calc(50% - 0.5rem) !important; width: calc(50% - 0.5rem) !important; }
}

.carousel-indicators {
    margin-bottom: -2.5rem;
}

.carousel-indicators [data-bs-target] {
    background-color: var(--border);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
}

.carousel-indicators .active {
    background-color: var(--primary);
}

/* Resources Section */
.resources-section {
    padding: 4rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.resources-section h2 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 3rem;
}

.resource-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    border: 1px solid var(--border);
}

.resource-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
    border-color: var(--primary-light);
}

.resource-card.reverse {
    flex-direction: row-reverse;
}

.resource-image {
    flex: 0 0 220px;
    height: 220px;
    background: var(--background);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    border: 2px solid var(--border);
    overflow: hidden;
}

.resource-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.resource-card:hover .resource-image img {
    transform: scale(1.1);
}

.resource-content {
    flex: 1;
}

.resource-content h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.resource-content p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 1.75rem;
}

.btn-try {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.05rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

.btn-try::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-try:hover::before {
    width: 400px;
    height: 400px;
}

.btn-try:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-try:active {
    transform: translateY(-1px);
}

.btn-try span {
    position: relative;
    z-index: 1;
}

.btn-create {
    background-color: var(--primary);
    color: white;
}

.btn-create:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-explore {
    background-color: var(--accent);
    color: white;
}

.btn-explore:hover {
    background-color: #E8935B;
    color: white;
}

.btn-collaborate {
    background-color: var(--success);
    color: white;
}

.btn-collaborate:hover {
    background-color: #5FA876;
    color: white;
}

/* CTA Section */
.final-cta {
    margin: 4rem 0 3rem;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.final-cta h2 {
    color: white;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.final-cta p {
    color: white;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    margin-bottom: 2rem;
    opacity: 0.95;
}

.final-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .hero h1,
[data-bs-theme="dark"] .resources-section h2,
[data-bs-theme="dark"] .popular-decks-section h2,
[data-bs-theme="dark"] .resource-content h3,
[data-bs-theme="dark"] .deck-card h5 {
    color: var(--primary-light);
}

[data-bs-theme="dark"] .resource-card,
[data-bs-theme="dark"] .deck-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .resource-card:hover,
[data-bs-theme="dark"] .deck-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .carousel-control-prev-icon::before,
[data-bs-theme="dark"] .carousel-control-next-icon::before {
    color: var(--primary-light);
}

/* Responsive Design */
@media (max-width: 992px) {
    .carousel-control-prev {
        left: -40px;
    }
    .carousel-control-next {
        right: -40px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem;
    }

    .resource-card,
    .resource-card.reverse {
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
    }

    .resource-image {
        flex: 0 0 180px;
        height: 180px;
        font-size: 4rem;
    }

    .cta-buttons,
    .final-cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .cta-buttons .btn,
    .final-cta-buttons .btn {
        width: 100%;
    }

    .final-cta {
        padding: 3rem 1.5rem;
        margin: 3rem 0 2rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }

    .popular-decks-section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .resource-image {
        flex: 0 0 150px;
        height: 150px;
        font-size: 3.5rem;
    }

    .btn-try {
        width: 100%;
        text-align: center;
    }
}
