/**
 * Dictionary Letter Archive Styling
 *
 * @package Gagana_Samoa
 */

/* Letter Archive Page Layout */
.letter-archive-page {
    background: linear-gradient(135deg, #F5F1EE 0%, #F9F6F3 100%);
    min-height: 100vh;
}

/* Header Section */
.letter-archive-header {
    padding: 40px 0 30px;
    background: white;
    border-bottom: 1px solid #e5e5e5;
}

.header-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.archive-title {
    font-family: 'Aleo', serif;
    font-size: 2.5em;
    font-weight: 600;
    color: #323710;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.letter-highlight {
    color: #aa0125;
    background: rgba(170, 1, 37, 0.1);
    padding: 5px 15px;
    border-radius: 8px;
    display: inline-block;
    margin: 0 5px;
    font-size: 1.2em;
}

.archive-subtitle {
    font-size: 1.1em;
    color: #666;
    margin: 0;
    font-style: italic;
}

/* Alphabet Navigation for Letter Pages */
.letter-alphabet-nav {
    background: rgba(74, 74, 74, 0.05);
    padding: 30px 0;
    border-bottom: 1px solid rgba(74, 74, 74, 0.1);
}

.letter-alphabet-nav .alphabet-section {
    background: white;
    padding: 20px 25px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    max-width: 1000px;
    margin: 0 auto;
}

/* Words Content - Merriam-Webster Style */
.letter-words-content {
    padding: 50px 0;
}

.letter-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

.letter-main-content {
    background: transparent;
    border-radius: 10px;
    box-shadow: none;
    border: none;
    overflow: visible;
}

.words-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #f0f0f0;
}

.words-column {
    background: white;
    padding: 40px 30px;
    min-height: 500px;
}

.word-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.word-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.word-link {
    display: block;
    color: #323710;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.word-link:hover {
    background: #f8f9fa;
    border-left-color: #aa0125;
    color: #aa0125;
    text-decoration: none;
    padding-left: 16px;
}

/* Sidebar Styling */
.letter-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
}

.sidebar-section h3 {
    font-family: 'Aleo', serif;
    font-size: 1.2em;
    font-weight: 600;
    color: #323710;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: none;
}

/* Related Letters */
.quick-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-letter-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    color: #323710;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-letter-link:hover {
    background: #aa0125;
    color: white;
    border-color: #aa0125;
    text-decoration: none;
}

/* Learning Tools */
.tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tools-list li {
    margin-bottom: 15px;
}

.tools-list li:last-child {
    margin-bottom: 0;
}

.tool-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #323710;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.tool-link:hover {
    background: #f6b402;
    color: #323710;
    border-left-color: #aa0125;
    text-decoration: none;
    transform: translateX(5px);
}

.tool-icon {
    font-size: 1.2em;
}

/* Quick Search */
.sidebar-search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-search-field {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.sidebar-search-field:focus {
    outline: none;
    border-color: #007b98;
}

.sidebar-search-submit {
    padding: 12px 20px;
    background: #007b98;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.sidebar-search-submit:hover {
    background: #005a6b;
}

/* Popular Words */
.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-list li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.popular-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-link {
    display: block;
    color: #323710;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.popular-link:hover {
    background: #f8f9fa;
    border-left-color: #007b98;
    color: #007b98;
    text-decoration: none;
    padding-left: 16px;
}

.no-popular {
    color: #666;
    font-style: italic;
    text-align: center;
    margin: 0;
}

/* No Words Found */
.no-words-found {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.no-words-content {
    max-width: 500px;
}

.no-words-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.6;
}

.no-words-found h2 {
    font-family: 'Aleo', serif;
    font-size: 1.8em;
    color: #323710;
    margin: 0 0 15px 0;
}

.no-words-found p {
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0 0 25px 0;
}

.back-to-dictionary {
    display: inline-block;
    background: #007b98;
    color: white;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.back-to-dictionary:hover {
    background: #005f7a;
    text-decoration: none;
    color: white;
}

/* Cross-promotion Section */
.letter-archive-promotion {
    padding: 40px 0;
    background: white;
    border-top: 1px solid #e5e5e5;
}

.promotion-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.promotion-content h3 {
    font-family: 'Aleo', serif;
    font-size: 1.5em;
    color: #323710;
    margin: 0 0 25px 0;
}

.promotion-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.promo-link {
    display: inline-block;
    background: #f6b402;
    color: #323710;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #f6b402;
}

.promo-link:hover {
    background: transparent;
    color: #f6b402;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .letter-layout {
        gap: 40px;
        max-width: 1200px;
    }
    
    .archive-title {
        font-size: 2.2em;
    }
}

@media (max-width: 1024px) {
    .letter-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .letter-sidebar {
        order: -1;
    }
    
    .sidebar-section {
        padding: 20px;
    }
    
    .words-column {
        padding: 30px 25px;
    }
}

@media (max-width: 768px) {
    .letter-archive-header {
        padding: 30px 0 25px;
    }
    
    .archive-title {
        font-size: 1.8em;
    }
    
    .letter-highlight {
        font-size: 1.1em;
        padding: 4px 12px;
    }
    
    .words-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .words-column {
        padding: 20px;
        min-height: auto;
    }
    
    .letter-words-content {
        padding: 40px 0;
    }
    
    .letter-alphabet-nav {
        padding: 25px 0;
    }
    
    .letter-alphabet-nav .alphabet-section {
        padding: 15px 20px;
    }
    
    .letter-sidebar {
        gap: 20px;
    }
    
    .sidebar-section {
        padding: 15px;
    }
    
    .quick-letters {
        gap: 6px;
    }
    
    .quick-letter-link {
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }
    
    .promotion-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .promo-link {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .letter-archive-header {
        padding: 20px 0;
    }
    
    .archive-title {
        font-size: 1.5em;
    }
    
    .letter-highlight {
        font-size: 1em;
        padding: 3px 10px;
    }
    
    .words-column {
        padding: 15px;
    }
    
    .word-link {
        font-size: 1em;
        padding: 6px 10px;
    }
    
    .word-link:hover {
        padding-left: 14px;
    }
    
    .letter-words-content {
        padding: 30px 0;
    }
    
    .letter-archive-promotion {
        padding: 30px 0;
    }
}

/* Print Styles */
@media print {
    .letter-archive-page {
        background: white;
    }
    
    .letter-alphabet-nav,
    .letter-archive-promotion {
        display: none;
    }
    
    .words-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .words-column {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .word-link {
        color: black !important;
        border-left: none !important;
    }
}

/* Focus states for accessibility */
.word-link:focus,
.back-to-dictionary:focus,
.promo-link:focus {
    outline: 2px solid #007b98;
    outline-offset: 2px;
}

/* Animation for word items */
.word-item {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.word-item:nth-child(1) { animation-delay: 0.1s; }
.word-item:nth-child(2) { animation-delay: 0.15s; }
.word-item:nth-child(3) { animation-delay: 0.2s; }
.word-item:nth-child(4) { animation-delay: 0.25s; }
.word-item:nth-child(5) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}