/* Slogan Decoder Specific Styles */

/* Breadcrumb Navigation */
.breadcrumb-nav a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* Category Sections */
.category-section {
    margin-bottom: 4rem;
}

/* Card Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    perspective: 1000px;
}

/* Flip Card */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 220px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
}

.flip-card-front {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: var(--text-primary);
}

.flip-card-back {
    background: linear-gradient(135deg, #f8f8f8 0%, #efefef 100%);
    color: var(--text-primary);
    transform: rotateY(180deg);
}

/* Card text colors - all black */
.slogan-text {
    color: #000000;
}

.truth-text {
    color: #000000;
}

/* Card Content */
.slogan-text {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    quotes: """ """;
}

.slogan-text::before {
    content: open-quote;
}

.slogan-text::after {
    content: close-quote;
}

.truth-text {
    font-size: 1rem;
    line-height: 1.4;
    text-align: left;
}

/* Flip Indicator */
.flip-indicator {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.flip-card:hover .flip-indicator {
    opacity: 0.7;
}

/* Flip indicator color */
.flip-indicator {
    color: #000000;
}

.flip-indicator svg {
    width: 100%;
    height: 100%;
}

/* Share Button */
.share-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.flip-card:hover .share-button {
    opacity: 1;
}

.share-button:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Share button color */
.share-button {
    color: #000000;
}

.share-button svg {
    width: 18px;
    height: 18px;
    color: currentColor;
}

/* Hidden cards (for search) */
.flip-card.hidden {
    display: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .decoder-hero .hero-title {
        font-size: 2rem;
    }
    
    .decoder-hero .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .controls-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .button-group {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .control-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .flip-card {
        height: 200px;
    }
    
    .slogan-text {
        font-size: 1.2rem;
    }
    
    .truth-text {
        font-size: 1rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .control-btn {
        width: 100%;
    }
}

/* Focus styles for accessibility */
.flip-card:focus {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

.flip-card:focus .flip-card-inner {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}

/* Animation for card entrance */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flip-card {
    animation: cardEntrance 0.4s ease-out;
    animation-fill-mode: both;
}

.flip-card:nth-child(n) {
    animation-delay: calc(0.05s * var(--card-index, 1));
}

/* Loading state */
.loading {
    text-align: center;
    padding: 3rem;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
