/* Custom Styles for Dim Sum Cantonese Learning */

/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* Navigation */
.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #fef5e7 100%);
}

/* Category Cards */
.category-card {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s;
}

.category-card:hover {
    transform: translateY(-3px);
}

.category-icon {
    font-size: 2.5rem;
}

/* Dish Cards */
.dish-card {
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.dish-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.dish-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f8f9fa;
}

.hover-lift {
    transition: transform 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Pronunciation Badges */
.pronunciation .badge {
    font-size: 0.85rem;
    padding: 0.5em 0.8em;
    margin-right: 0.5rem;
    font-weight: 500;
}

/* Character Breakdown */
.chinese-char {
    font-size: 4rem;
    font-weight: bold;
    color: #dc3545;
    line-height: 1;
}

.character-breakdown {
    padding: 1rem 0;
}

.character-breakdown h5 {
    color: #495057;
    margin-bottom: 0.75rem;
}

.character-breakdown p {
    line-height: 1.6;
}

/* Search Results */
#searchResults {
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#searchResults .list-group-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

#searchResults .list-group-item:hover {
    background-color: #f8f9fa;
}

/* Detail Page Specific */
.dish-detail-header {
    border-bottom: 3px solid #dc3545;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

/* Sidebar Sticky */
@media (min-width: 992px) {
    .sticky-top {
        position: sticky;
        top: 20px;
        z-index: 1020;
    }
}

/* Categories Sidebar */
.list-group-item-action:hover {
    background-color: #f8f9fa;
}

.list-group-item.active {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Responsive Images */
.dish-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Feature Icons */
.feature-icon {
    display: inline-block;
}

/* Buttons */
.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Card Shadows */
.shadow-sm {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.075) !important;
}

/* Pronunciation Cards */
.bg-primary.bg-opacity-10 {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.bg-info.bg-opacity-10 {
    background-color: rgba(13, 202, 240, 0.1) !important;
}

/* Alerts */
.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Carousel Captions */
.carousel-caption {
    padding: 0.75rem 1rem;
}

/* Related Dishes Images */
.list-group-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

/* Page Header */
.page-header {
    border-bottom: 1px solid #dee2e6;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-in-out;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .category-icon {
        font-size: 2rem;
    }
    
    .chinese-char {
        font-size: 3rem;
    }
    
    .dish-image {
        height: 180px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .breadcrumb,
    footer,
    .btn,
    .sidebar {
        display: none;
    }
    
    .card {
        border: 1px solid #dee2e6;
        page-break-inside: avoid;
    }
}

/* Accessibility */
a:focus,
button:focus,
.btn:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Pagination Styles */
.pagination .page-link {
    color: #dc3545;
    border-color: #dee2e6;
}

.pagination .page-link:hover {
    color: #c82333;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
}

/* Text-to-Speech Button Styles */
[data-controller="tts"] {
    transition: all 0.3s ease;
    cursor: pointer;
}

[data-controller="tts"]:hover {
    transform: scale(1.1);
}

[data-controller="tts"].speaking {
    animation: pulse-tts 1s infinite;
}

@keyframes pulse-tts {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

[data-controller="tts"] i {
    transition: transform 0.3s ease;
}

[data-controller="tts"]:active i {
    transform: rotate(20deg);
}

/* YouTube Video Link Button Styles */
a[href*="pronounce"] i.fa-play-circle,
a[href*="captions"] i.fa-play-circle {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

a[href*="pronounce"]:hover,
a[href*="captions"]:hover {
    transform: scale(1.15);
    text-decoration: none;
}

a[href*="pronounce"]:hover i.fa-play-circle,
a[href*="captions"]:hover i.fa-play-circle {
    color: #0056b3 !important;
}

/* Adjust button spacing in flex layout */
.d-flex.align-items-center.gap-2 {
    gap: 0.5rem !important;
}

/* Breadcrumb Links - Red Color */
.breadcrumb-item a {
    color: #dc3545;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #c82333;
    text-decoration: underline;
}

/* Character Breakdown Links - Red Color */
.card-header.bg-dark + .card-body a {
    color: #dc3545;
    text-decoration: none;
}

.card-header.bg-dark + .card-body a:hover {
    color: #c82333;
    text-decoration: underline;
}

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

 .no-underline {
  text-decoration: none !important;
}
