/**
 * SEO Layer Styles
 * Used for term.php and browse.php
 */

* {
    box-sizing: border-box;
}

body {
    background-color: #fcfdfa;
    background-image: radial-gradient(#e1e8d8 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    margin: 0;
    overflow-x: hidden;
}

.seo-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}


/* Eye-catching "Back to dictionary" button */
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--color-brand-light, #C0E04F) 0%, var(--color-brand-accent, #86A123) 100%);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 1.2rem;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(66, 107, 29, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.back-link svg {
    margin-right: 12px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    width: 24px;
    height: 24px;
}

.back-link:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 30px rgba(66, 107, 29, 0.4);
    background: linear-gradient(135deg, #d4f06d 0%, #9bc22d 100%);
}

.back-link:active {
    transform: translateY(-2px) scale(0.98);
}

/* Shine effect */
.back-link::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    transition: none;
    opacity: 0;
}

.back-link:hover::after {
    left: 150%;
    opacity: 1;
    transition: all 0.8s ease-in-out;
}

/* Pulse animation for the button to make it even more noticeable */
@keyframes pulse-shadow {
    0% { box-shadow: 0 10px 20px rgba(66, 107, 29, 0.2); }
    50% { box-shadow: 0 10px 30px rgba(66, 107, 29, 0.5); }
    100% { box-shadow: 0 10px 20px rgba(66, 107, 29, 0.2); }
}

.back-link {
    animation: pulse-shadow 3s infinite;
}

.term-title, .seo-container h1 {
    font-size: 3rem;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--color-brand-primary, #426B1D);
    padding-bottom: 15px;
    font-weight: 900;
}

.opredelenie {
    margin-bottom: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
}

.read-more-msg {
    background: #fffde7;
    border: 1px solid #fff59d;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 25px;
    font-style: italic;
    font-size: 1rem;
    color: #856404;
}

.seo-read-more-link {
    color: var(--color-brand-primary, #426B1D);
    text-decoration: underline;
    display: inline-block;
    margin-left: 5px;
}

.seo-read-more-link:hover {
    color: var(--color-brand-accent, #86A123);
}

.alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #eee;
}

.alphabet a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.2s;
}

.alphabet a.active {
    background: var(--color-brand-primary, #426B1D);
    color: #fff;
    border-color: var(--color-brand-primary, #426B1D);
    box-shadow: 0 4px 10px rgba(66, 107, 29, 0.3);
}

.alphabet a:hover {
    border-color: var(--color-brand-primary, #426B1D);
    color: var(--color-brand-primary, #426B1D);
    transform: translateY(-2px);
}

.alphabet a.active:hover {
    color: #fff;
    opacity: 0.9;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.terms-grid a {
    text-decoration: none;
    color: var(--color-brand-primary, #426B1D);
    padding: 10px 15px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eee;
    transition: all 0.2s;
}

.terms-grid a:hover {
    background: #f0f4eb;
    border-color: var(--color-brand-primary, #426B1D);
    transform: translateX(5px);
}

footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
}

@media (max-width: 600px) {
    .term-title, .seo-container h1 { 
        font-size: 1.75rem; 
        margin-bottom: 15px;
        line-height: 1.2;
        word-break: break-word;
    }
    .back-link { 
        display: flex;
        width: 100%; 
        max-width: 100%;
        padding: 12px 16px; 
        font-size: 0.95rem; 
        margin-bottom: 30px;
        border-radius: 12px;
        letter-spacing: 0.5px;
        height: auto;
        min-height: 50px;
        white-space: normal;
        text-align: center;
    }
    .back-link svg {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }
    .seo-container { 
        padding: 20px 15px; 
        margin: 10px; 
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    }
    .opredelenie {
        padding: 20px 15px;
        margin-bottom: 20px;
        border-radius: 15px;
    }
    .alphabet {
        padding: 15px;
        gap: 8px;
    }
    .alphabet a {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    .terms-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

