/* style.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background-color: #333;
    color: white;
    padding: 10px 0;
    border-bottom: 3px solid #007bff;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.5em;
    font-weight: bold;
}

/* Menu Desktop */
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
}

.menu-toggle {
    display: none; 
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
}


@media (max-width: 768px) {
    .menu-toggle {
        display: block; 
    }
    
    #main-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        position: absolute;
        top: 50px; 
        left: 0;
        right: 0;
        background-color: #444;
        z-index: 100;
        width: 100%;
        padding: 0;
    }

    #main-nav.active {
        max-height: 300px; 
        padding: 10px 0;
    }
    
    .nav-menu {
        flex-direction: column;
        text-align: center;
    }

    .nav-menu li a {
        padding: 15px;
        border-bottom: 1px solid #555;
    }
    
    .nav-menu li:last-child a {
        border-bottom: none;
    }
}

.search-container {
    padding: 50px 0;
    text-align: center;
}

.search-container input[type="text"] {
    width: 80%;
    max-width: 600px;
    padding: 15px 20px;
    border: 1px solid #ccc;
    border-radius: 30px;
    font-size: 1.1em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    outline: none;
    transition: box-shadow 0.3s;
}

.search-container input[type="text"]:focus {
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.translation-box {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.input-area, .output-area {
    flex: 1;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1.2em;
    resize: vertical;
}

.translate-actions {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 20px;
}

.translate-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s;
}

.translate-btn:hover {
    background-color: #0056b3;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: none;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .translation-box {
        flex-direction: column;
    }
}


.message-container {
    position: fixed; 
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 15px 30px;
    background-color: #ffc107; 
    color: #333;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 1; 
    transition: opacity 0.5s ease-out; 
    max-width: 90%;
    text-align: center;
}

.message-container.hidden {
    display: none;
    opacity: 0;
}


.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px; 
    
   
    margin-top: 20px; 
    margin-bottom: 30px; 
    padding: 0;
    list-style: none;
}

main.container {
    padding-bottom: 50px; 
}

.item-card {
    background-color: #ffffff; 
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
    height: 100%; 
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
}

.item-card a {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.item-card h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: #007bff; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 0;
}

.item-card-meta {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
}

.item-card-description {
    font-size: 0.95em;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 10px;
}

.similar-items-list {
    margin-top: 20px;
    margin-bottom: 50px;
}


footer {
    background-color: #f8f8f8; 
    color: #333;
    padding: 30px 0 10px 0; 
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-between;
    gap: 30px; 
    margin-bottom: 30px;
}

.footer-column {
    flex: 1; 
    min-width: 250px; 
}

.footer-column h3 {
    font-size: 1.1em;
    font-weight: bold;
    color: #000;
    margin-top: 0;
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column a {
    color: #333;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: #007bff;
}

.footer-branding {
    text-align: center;
    padding: 10px 0;
    font-size: 0.85em;
    color: #6c757d;
    border-top: 1px solid #eee; 
}

.footer-branding .logo-text {
    margin-bottom: 15px;
}


.breadcrumb {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 0.9em;
    border-bottom: 1px solid #eee;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #6c757d; 
    margin: 0 5px;
}


.pagination-links {
    text-align: center;
    padding: 20px 0;
}

.page-link {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #007bff;
    background-color: #fff;
    transition: background-color 0.2s, border-color 0.2s;
}

.page-link:hover {
    background-color: #f0f0f0;
    border-color: #007bff;
}

.current-page {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border-color: #007bff;
    cursor: default;
}


.social-share {
    margin: 25px 0;
    padding: 15px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.social-share strong {
    font-size: 1.1em;
    margin-right: 15px;
    vertical-align: middle;
    color: #333;
}

.share-btn {
    display: inline-block;
    padding: 8px 15px;
    margin-right: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    color: white;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.85;
}

.share-facebook {
    background-color: #3b5998; 
}

.share-twitter {
    background-color: #1da1f2; 
}

.share-copy {
    background-color: #6c757d; 
}

.output-area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.input-area-header {
    display: flex;
    justify-content: flex-start; 
    align-items: center;
    margin-bottom: 5px; 
    padding-right: 15px;
}

.copy-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background-color: #5a6268;
}