/* Page styles of resources/views/frontend/home/index.blade.php (moved out of the view) */

/* ── Toast styles (unchanged) ─────────────────────────────────── */
.toast-container { z-index: 99999; }

.custom-toast {
    background: white;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 15px;
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    position: relative;
}

@keyframes slideInRight {
    0%   { transform: translateX(120%) scale(0.8); opacity: 0; }
    100% { transform: translateX(0)    scale(1);   opacity: 1; }
}
@keyframes slideOutRight {
    0%   { transform: translateX(0)    scale(1);   opacity: 1; }
    100% { transform: translateX(120%) scale(0.8); opacity: 0; }
}

.custom-toast .toast-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}
.custom-toast .toast-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%);  }
}
.custom-toast .toast-header i {
    font-size: 1.2rem;
    margin-inline-end: 8px;
    background: rgba(255,255,255,.2);
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.custom-toast .btn-close { filter: invert(1) brightness(2); opacity: .8; transition: all .3s; }
.custom-toast .btn-close:hover { opacity: 1; transform: rotate(90deg); }
.custom-toast .toast-body { padding: 20px; font-size: 1rem; line-height: 1.6; color: #2d3748; }

.success-toast .toast-header { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.error-toast   .toast-header { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.warning-toast .toast-header { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.info-toast    .toast-header { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }

.custom-toast::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    animation: progressBar 3s linear forwards;
    border-radius: 0 0 16px 16px;
}
.success-toast::after { background: linear-gradient(90deg, #10b981, #059669); }
.error-toast::after   { background: linear-gradient(90deg, #ef4444, #dc2626); }
.warning-toast::after { background: linear-gradient(90deg, #f59e0b, #d97706); }
.info-toast::after    { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
@keyframes progressBar { 0% { width: 100%; } 100% { width: 0%; } }

.custom-toast:hover { transform: translateY(-2px); box-shadow: 0 15px 50px rgba(0,0,0,.2); transition: all .3s; }

.custom-toast::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 16px 0 0 16px;
}
.success-toast::before { background: linear-gradient(180deg, #10b981, #059669); }
.error-toast::before   { background: linear-gradient(180deg, #ef4444, #dc2626); }
.warning-toast::before { background: linear-gradient(180deg, #f59e0b, #d97706); }
.info-toast::before    { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }

@keyframes gentleShake {
    0%,100% { transform: translateX(0);  }
    25%      { transform: translateX(-3px); }
    75%      { transform: translateX(3px);  }
}
.custom-toast.shake { animation: gentleShake 0.5s ease; }

/* ── Search styles (unchanged) ────────────────────────────────── */
.search-container { width: 100%; position: relative; }

.subcribe-form .search-container .form-control {
    width: 100%;
    padding-left: 70px !important;
    padding-right: 20px !important;
    font-size: 1.1rem;
    border-width: 2px;
    transition: all .3s;
    background: rgba(255,255,255,.9) !important;
}
.subcribe-form .search-container .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb),.25);
    background: white !important;
}

#homeQuickSearchResults {
    width: 100%; left: 0; right: 0;
    max-height: 400px; overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,.1);
    border: 1px solid #dee2e6;
    animation: slideDown .2s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0);     }
}
.quick-search-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--bs-dark);
}
.quick-search-item:hover { background-color: #f8f9fa; padding-inline-start: 20px; }

/* ── Card hover effects (shared) ──────────────────────────────── */
.proverb-card, .quote-card, .category-card, .author-card { transition: all .3s ease; }
.proverb-card:hover, .quote-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,.1) !important; }
.category-card:hover, .author-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,.15) !important; }

.proverb-card, .quote-card { border-inline-end: 4px solid transparent; }
.proverb-card:hover { border-inline-end-color: var(--bs-warning); }
.quote-card:hover   { border-inline-end-color: var(--bs-primary); }

/* ── Quote card inner styles (matching index view) ────────────── */
.quote-card { background: linear-gradient(145deg, #ffffff, #f8f9fa); }
.quote-content p { line-height: 1.8; color: #2d3748; }
/* Quote mark: colour + opacity are on the <i> (common.css); no opacity here, it multiplied down to .025 */

.author-avatar { position: relative; }
.author-avatar::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity .3s ease;
}
.quote-card:hover .author-avatar::after { opacity: .3; }
.author-avatar img { transition: transform .3s ease; }
.quote-card:hover .author-avatar img { transform: scale(1.1); }

/* ── Proverb card inner styles ────────────────────────────────── */
.proverb-card { background: linear-gradient(145deg, #ffffff, #f8f9fa); }
.proverb-content p { line-height: 1.8; color: #2d3748; }

/* ── Stat items ───────────────────────────────────────────────── */
.stat-item { cursor: pointer; transition: all .3s ease; padding: 8px; border-radius: 8px; }
.stat-item:hover { transform: scale(1.05); }
.like-stat:hover     { background-color: rgba(220,53,69,.1)  !important; }
.like-stat:hover i   { color: #dc3545 !important; transform: scale(1.2); }
.bookmark-stat:hover   { background-color: rgba(255,193,7,.1)  !important; }
.bookmark-stat:hover i { color: #ffc107 !important; transform: scale(1.2); }
.comment-stat:hover    { background-color: rgba(16, 102, 231,.1) !important; }
.comment-stat:hover i  { color: #1066E7 !important; transform: scale(1.2); }

/* ── Action buttons ───────────────────────────────────────────── */
.action-buttons .btn { transition: all .3s ease; border-radius: 6px; }
.action-buttons .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,.1); }

/* ── Animations ───────────────────────────────────────────────── */
@keyframes heartBeat {
    0%,100% { transform: scale(1);   }
    25%,75% { transform: scale(1.3); }
}
@keyframes bounceSmall {
    0%,100% { transform: translateY(0);   }
    50%     { transform: translateY(-3px); }
}
.bounce-animation { animation: bounceSmall 0.5s ease; }

/* ── Features ─────────────────────────────────────────────────── */
.feature-icon { transition: transform .3s ease; }
.card:hover .feature-icon { transform: scale(1.1); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .toast-container { top: 20px; right: 20px; left: 20px; }
    .custom-toast { max-width: 100%; }
    .search-container { max-width: 100% !important; }
    .subcribe-form .search-container .form-control { padding-left: 60px !important; height: 55px; font-size: 1rem; }
    .proverb-card, .quote-card { border-inline-end-width: 3px; }
    .quote-content p { font-size: 1.1rem !important; }
    .action-buttons .btn { padding: 6px 8px; font-size: .85rem; }
}
@media (max-width: 576px) {
    .toast-container { top: 10px; right: 10px; left: 10px; padding: 0; }
    .custom-toast { border-radius: 12px; }
    .stat-item { padding: 4px; }
    .stat-item i { font-size: 1rem !important; }
    #homeQuickSearchResults {
        position: fixed !important;
        top: 70px !important; left: 15px !important; right: 15px !important;
        width: calc(100% - 30px) !important;
        max-height: 70vh;
    }
}

/* ── «أمثال الشعوب» and «التصنيفات الشائعة»: the whole card is the link.
   --card-color: the category colour (quotes), the brand blue by default (proverbs).
   Tints use color-mix, after a plain brand-blue fallback for older browsers. ── */
.culture-card {
    transition: transform .2s ease, box-shadow .2s ease;
}

.culture-card:hover,
.culture-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(16, 102, 231, .12) !important;
}

.culture-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(16, 102, 231, .1);
    background-color: color-mix(in srgb, var(--card-color, #1066E7) 12%, transparent);
    color: var(--card-color, #1066E7);
    font-size: 1.35rem;
}

.culture-card__emoji {
    font-size: 1.5rem;
    line-height: 1;
}

.culture-card__name {
    font-weight: 700;
    transition: color .2s ease;
}

.culture-card:hover .culture-card__name {
    color: #1066E7 !important;
}

/* The sample proverb / quote: a soft tinted block at the bottom of the card */
.culture-card__sample {
    padding: .75rem .9rem;
    border-radius: .5rem;
    border-inline-start: 3px solid var(--card-color, transparent);
    background-color: rgba(16, 102, 231, .05);
    background-color: color-mix(in srgb, var(--card-color, #1066E7) 6%, transparent);
    color: #3c4858;
    font-size: .9rem;
    line-height: 1.7;
}

.culture-card__mark {
    color: var(--card-color, #1066E7);
}