/**
 * Typografie-Stile für Templates
 * Konsistente Typografie für alle Template-Seiten
 */

/* Template-spezifische Variablen */
:root {
    /* Template-spezifische Icons */
    --font-icons: 'Remix Icon';

    /* Template-spezifische Farben */
    --color-card-bg: rgba(255, 255, 255, 0.95);
    /* Kartenhintergrund */
}

/* Template-spezifische Body-Anpassungen werden in critical.css definiert */

/* Template-spezifische Heading-Anpassungen */
h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: 0.02em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* Spezielle Formatierung für h2 mit text-primary Klasse */
h2.text-primary {
    font-size: 2.25rem;
    /* Größer als --text-3xl (1.875rem) */
    font-weight: 800;
    /* Extra-fett */
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    /* Leicht engerer Buchstabenabstand für bessere Lesbarkeit bei großer Schrift */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Subtiler Textschatten für mehr Tiefe */
}

/* Responsive Anpassungen für h2.text-primary */
@media (max-width: 640px) {
    h2.text-primary {
        font-size: 1.875rem;
        /* Zurück zu --text-3xl auf mobilen Geräten */
    }
}

h3 {
    font-size: var(--text-xl);
}

/* Links */
a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-link-hover);
}

/* Spruch-Text - zentriert auf Cards und Detailseiten */
.spruch-text {
    text-align: center;
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    line-height: 1.6;
    color: var(--color-text-primary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Spruch-Text wird zusätzlich in styles.css definiert */

/* Seitentitel */
.page-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--black);
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* Spruch-Titel */
.spruch-title {
    font-family: var(--font-secondary);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--black);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin-bottom: 1rem;
}

/* Untertitel */
.page-subtitle {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    color: var(--black);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Karten-Stil - DEPRECATED: Nutze card-layout.css
.content-card {
    background-color: var(--color-card-bg);
    backdrop-filter: blur(4px);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
*/

/* Button-Stile */
.action-btn {
    width: 44px;
    /* WCAG Touch Target Size */
    height: 44px;
    /* WCAG Touch Target Size */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-100);
    border-radius: 9999px;
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

/* Optimierung für kleinere Screens */
@media (max-width: 360px) {
    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

.action-btn:hover {
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--color-link);
    transform: scale(1.05);
}

/* Aktiver Button */
.action-btn.active {
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--color-link);
}

/* Favoriten-Button aktiv */
.favorite-btn.active {
    color: var(--color-danger);
    background-color: rgba(225, 29, 72, 0.1);
}

.favorite-btn.active i {
    content: "\ee0f";
    /* Remix Icon heart-fill Unicode */
}

/* Etsy-Button */
.etsy-btn {
    background-color: #F1641E !important;
    color: white !important;
}

.etsy-btn:hover {
    background-color: #d4541a !important;
    color: white !important;
    transform: scale(1.05);
}

/* Tag-Stile */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(243, 244, 246, 0.8);
    color: var(--color-text-secondary);
    border-radius: 9999px;
    font-size: var(--text-xs);
    transition: background-color 0.2s ease;
}

.tag:hover {
    background-color: rgba(229, 231, 235, 0.8);
}

/* Kategorie-Stile */
.category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--color-link);
    border-radius: 0.25rem;
    font-size: var(--text-xs);
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.category:hover {
    background-color: rgba(0, 102, 204, 0.2);
}

/* Social Media Buttons */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.social-btn.whatsapp {
    background-color: #25D366;
}

.social-btn.whatsapp:hover {
    background-color: #1da851;
}

.social-btn.facebook {
    background-color: #1877F2;
}

.social-btn.facebook:hover {
    background-color: #0d65d9;
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-btn.instagram:hover {
    background: linear-gradient(45deg, #e78b2e 0%, #d25e36 25%, #c9233c 50%, #b9205c 75%, #a9167a 100%);
}

.social-btn.pinterest {
    background-color: #BD081C;
}

.social-btn.pinterest:hover {
    background-color: #9e0718;
}

.social-btn.twitter {
    background-color: var(--black);
}

.social-btn.twitter:hover {
    background-color: #333333;
}

/* Zurück-Link */
.mb-4:has(> .back-link) {
    margin-bottom: 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--black);
    font-size: var(--text-sm);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.back-link:hover {
    color: var(--black);
    background-color: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.back-link i {
    margin-right: 0.5rem;
}

/* ============================================
   KATEGORIE-SEITEN ENHANCEMENTS
   ============================================ */

/* Spruch-Zähler Badge */
.spruch-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #0066CC 0%, #0055b3 100%);
    color: white;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    margin-top: 6px;
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.25);
    font-family: 'Nunito', sans-serif;
}

/* Zufälliger Spruch Button */
/* Fix: visited-color überschreiben damit Text auf dunkelblauem Hintergrund sichtbar bleibt */
.random-spruch-btn:visited,
.next-spruch-btn:visited {
    color: white !important;
}

.random-spruch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #0066CC 0%, #0055b3 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    border-radius: 24px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.random-spruch-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 102, 204, 0.4);
}

.random-spruch-btn i {
    font-size: 18px;
}

/* ============================================
   SPRUCH-SEITEN ENHANCEMENTS
   ============================================ */

/* Nächster-Spruch Button */
.next-spruch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #0066CC 0%, #0055b3 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    border-radius: 24px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.next-spruch-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 102, 204, 0.4);
}

.next-spruch-btn i {
    font-size: 16px;
}

/* Aktions-Bereich Spruch-Seite (beide Buttons nebeneinander) */
.spruch-nav-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 2rem 0 1rem;
}

/* Tags und Kategorien Container */
.tags-categories-container {
    margin-top: 1rem;
    padding: 0.75rem;
    border-top: 1px solid #e5e7eb;
    animation: fadeInUp 0.3s ease-out;
    text-align: center;
}

.categories-section,
.tags-section {
    margin-bottom: 0.75rem;
    text-align: center;
}

/* Tags mit Wrapping - Styling wird via flex flex-wrap in Templates gesteuert */

.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.spruch-category {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    margin: 0.125rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.spruch-category::before {
    content: '📁';
    margin-right: 0.25rem;
}

/* Spezifische Farben für Kategorien */
.spruch-category[href*="ostern"] {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}

/* Amber */
.spruch-category[href*="weihnachten"] {
    background-color: #fecaca !important;
    color: #991b1b !important;
}

/* Red */
.spruch-category[href*="tiere"] {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

/* Emerald */
.spruch-category[href*="gemeinsam"] {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}

/* Blue */
.spruch-category[href*="herbst"] {
    background-color: #fed7aa !important;
    color: #9a3412 !important;
}

/* Orange */
.spruch-category[href*="bewegung"] {
    background-color: #e0e7ff !important;
    color: #3730a3 !important;
}

/* Indigo */
.spruch-category[href*="bauernhof"] {
    background-color: #ecfccb !important;
    color: #3f6212 !important;
}

/* Lime */
.spruch-category[href*="boesewichte"] {
    background-color: #e4e4e7 !important;
    color: #18181b !important;
}

/* Zinc */
.spruch-category[href*="englisch"] {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
}

/* Sky */
.spruch-category[href*="essen"] {
    background-color: #fef9c3 !important;
    color: #854d0e !important;
}

/* Yellow */
.spruch-category[href*="jahreszeiten"] {
    background-color: #cffafe !important;
    color: #155e75 !important;
}

/* Cyan */
.spruch-category[href*="maerchen"] {
    background-color: #fce7f3 !important;
    color: #be185d !important;
}

/* Pink */
.spruch-category[href*="religion"] {
    background-color: #ede9fe !important;
    color: #5b21b6 !important;
}

/* Violet */
.spruch-category[href*="zungenbrecher"] {
    background-color: #ffe4e6 !important;
    color: #be123c !important;
}

/* Rose */

/* Standard-Stil für andere Kategorien */
.spruch-category {
    background-color: var(--gray-100);
    color: #374151;
}

/* Aktuell aktive Kategorie auf Listen-Seiten */
.spruch-category--active {
    background-color: #0ea5e9;
    color: white;
    font-weight: 600;
}

.spruch-category:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.spruch-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    margin: 0.125rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--black);
    text-decoration: none;
    transition: all 0.2s ease;
}

.spruch-tag::before {
    content: '#';
    margin-right: 0.125rem;
    color: #9ca3af;
}

.spruch-tag:hover {
    background-color: var(--gray-100);
    border-color: #d1d5db;
    transform: translateY(-1px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Anpassungen */
@media (max-width: 768px) {

    h1,
    .page-title {
        font-size: var(--text-2xl);
    }

    h2 {
        font-size: var(--text-xl);
    }

    h3 {
        font-size: var(--text-lg);
    }

    .spruch-text {
        font-size: var(--text-base);
        max-width: 450px;
    }

    .spruch-category,
    .spruch-tag {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }

    .content-card {
        padding: 1rem;
    }
}

/* =====================================================
   Etsy-Komponenten
   ===================================================== */

/* ── Inline-Link (klein, nach Spruchtext) ── */
.etsy-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff8f5;
    border: 1px solid rgba(241, 100, 30, 0.2);
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    text-decoration: none;
    color: #c44f14;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.etsy-inline:hover {
    background: #F1641E;
    color: white;
    border-color: #F1641E;
}

/* ── Produktkarte (horizontal, mit Icon + CTA) ── */
.etsy-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e8f0fb;
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.08);
    max-width: 520px;
    transition: box-shadow 0.2s;
}
.etsy-card:hover {
    box-shadow: 0 4px 18px rgba(0, 102, 204, 0.14);
}
.etsy-card-icon {
    width: 52px;
    height: 52px;
    background: #fff3ee;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.6rem;
}
.etsy-card-body {
    flex: 1;
    min-width: 0;
}
.etsy-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.2rem;
}
.etsy-card-text {
    font-size: 0.78rem;
    color: #6c757d;
    line-height: 1.4;
}
.etsy-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #F1641E;
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.etsy-card-btn:hover {
    background: #d4541a;
    transform: scale(1.03);
}

/* ── Kategorie-Banner (horizontal, warm-orange Gradient) ── */
.etsy-banner {
    background: linear-gradient(135deg, #fff8f5 0%, #fdeee6 100%);
    border: 1px solid #f5d0bb;
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.etsy-banner-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.etsy-banner-emoji {
    font-size: 2rem;
    flex-shrink: 0;
}
.etsy-banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.2rem;
}
.etsy-banner-text {
    font-size: 0.82rem;
    color: #6c757d;
}
.etsy-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #F1641E;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.55rem 1.1rem;
    border-radius: 9px;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.etsy-banner-btn:hover {
    background: #d4541a;
    transform: scale(1.02);
}

@media (max-width: 640px) {
    .etsy-card {
        flex-wrap: wrap;
    }
    .etsy-card-btn {
        width: 100%;
        justify-content: center;
    }
    .etsy-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .etsy-banner-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Etsy-Banner: Vorschaubild + Premium-Variante (2026-10 Etsy-Rotation) --- */
.etsy-banner-left { flex: 1 1 0; min-width: 260px; }
.etsy-banner-btn { flex-shrink: 0; }
.etsy-banner-img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(15,23,42,0.08);
    flex-shrink: 0;
}
.etsy-banner-info {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #0f5f5c;
    text-decoration: underline;
}
.etsy-banner--premium {
    background: linear-gradient(135deg, #f3faf8 0%, #e3f1ee 100%);
    border: 1px solid #b9dcd5;
    border-left: 5px solid #0f5f5c;
}
.etsy-banner--premium .etsy-banner-title { font-size: 1.05rem; color: #0b3f3d; }
.etsy-banner--premium .etsy-banner-text  { color: #3f5f5c; }
.etsy-banner--premium .etsy-banner-btn   { background: #0f5f5c; }
.etsy-banner--premium .etsy-banner-btn:hover { background: #0b4644; }
.etsy-banner-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a6d1f;
    background: #fbf3d9;
    border: 1px solid #ecd9a0;
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    margin-bottom: 0.3rem;
}
@media (max-width: 640px) {
    .etsy-banner-img { width: 96px; height: 72px; }
}

/* Hub-Seiten (.hub a) ueberschreiben Linkfarben -> Button-Text absichern */
.etsy-banner a.etsy-banner-btn, .etsy-banner a.etsy-banner-btn:hover, .etsy-banner a.etsy-banner-btn:visited { color: #fff !important; text-decoration: none !important; }
.etsy-banner a.etsy-banner-info { color: #0f5f5c !important; }
