/* styles.css */

/* Basic reset */
* {
    box-sizing: border-box;
}

/* Page styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    text-align: center;
}

nav ul {
    list-style-type: none;
}

nav ul li {
    display: inline;
    margin-right: 20px;
}

a {
    color: darkgrey;
    text-decoration: none;
}

h1,
h2,
h3 {
    text-align: center;
}

#fact-of-the-day {
    padding: 20px;
    margin: 20px auto;
    background-color: #fff;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#fact {
    font-size: 18px;
    margin-bottom: 10px;
    text-align: justify;
}

#fact-tag {
    color: #666;
}

#fact-detail {
    text-align: justify;
    padding: 0 10px;
}

#social-share a {
    margin-right: 10px;
    color: #fff;
    text-decoration: none;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #333;
    color: #fff;
}

.ftxt {
    color: #333;
}

/* Social sharing styles */
#social-share {
    margin: 30px 0;
    text-align: center;
}

#social-share h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #555;
}

.share-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 20px;
    cursor: pointer;
    border: none;
    margin-bottom: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.share-label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Platform-specific colors - using official brand colors */
.facebook {
    background-color: #1877F2;
}

.twitter {
    background-color: #1DA1F2;
}

.linkedin {
    background-color: #0A66C2;
}

.messenger {
    background-color: #00B2FF;
}

.whatsapp {
    background-color: #25D366;
}

.viber {
    background-color: #7360F2;
}

.sms {
    background-color: #27ae60;
}

.email {
    background-color: #D44638;
}

.copy {
    background-color: #6B7280;
}

.share-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Copy URL success animation */
.copy-success {
    background-color: #38a169 !important;
    animation: pulse 1s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Tooltip for copy success */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: "Copied!";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.tooltip.show::after {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .share-icons {
        gap: 15px;
    }

    .share-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .share-label {
        font-size: 10px;
    }
}

/* Previous facts grid */
#fact-archive h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8rem;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding-bottom: 10px;
}

.fact-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 0 10px;
    text-align: justify;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tag-item {
    background-color: #f0f0f0;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    transition: background-color 0.3s;
}

.tag-item:hover {
    background-color: #e0e0e0;
}

.tag-count {
    font-size: 0.8em;
    color: #666;
    margin-left: 5px;
}

/* Footer styles */
footer {
    background-color: #f5f5f5;
    padding: 2rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    flex: 1;
    min-width: 300px;
    margin-right: 2rem;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    align-items: center;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    color: white;
    margin-left: 1rem;
    transition: background-color 0.3s ease;
}

.social-icon:hover {
    background-color: #555;
}

.copyright {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }

    .about-text {
        margin-right: 0;
    }

    .social-links {
        margin-top: 1rem;
        justify-content: center;
    }

    .social-icon:first-child {
        margin-left: 0;
    }
}

/* Tag page specific styles */
.tag-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.tag-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.tag-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.tag-header p {
    color: #7f8c8d;
    max-width: 700px;
    margin: 0 auto 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.back-link i {
    margin-right: 5px;
}

.back-link:hover {
    text-decoration: underline;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.fact-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.fact-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.fact-card h3 {
    color: #2c3e50;
    margin-top: 0;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.fact-card p {
    color: #7f8c8d;
    flex-grow: 1;
    margin-bottom: 15px;
}

.fact-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #95a5a6;
    margin-top: auto;
}

.tag-badge {
    background-color: #e0f7fa;
    color: #00838f;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.date {
    color: #7f8c8d;
}

/* Tags list styles */
.tags-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.tag-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.tag-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.tag-item a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 1.1rem;
    text-align: center;
}

.tag-item a:hover {
    background-color: #f9f9f9;
}

.tag-count {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: normal;
}

.no-facts {
    text-align: center;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 20px;
}

.search-box {
    margin-bottom: 30px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 30px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

@media (max-width: 768px) {

    .fact-grid,
    .tags-list {
        grid-template-columns: 1fr;
    }

    .tag-header h1 {
        font-size: 2rem;
    }
}

/* Archive-specific styles */
.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.month-section {
    margin-bottom: 40px;
}

.month-header {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.fact-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.fact-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.fact-card h3 {
    color: #2c3e50;
    margin-top: 0;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.fact-card p {
    color: #7f8c8d;
    flex-grow: 1;
    margin-bottom: 15px;
}

.fact-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #95a5a6;
    margin-top: auto;
}

.tag {
    background-color: #e0f7fa;
    color: #00838f;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.date {
    color: #7f8c8d;
}

.search-filter {
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.search-filter input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.archive-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.archive-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.archive-header p {
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

.no-facts {
    text-align: center;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

/* Hide cards when filtered out */
.fact-card.hidden {
    display: none;
}

/* Clear filters button */
.clear-filters {
    background-color: #f1f1f1;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.clear-filters:hover {
    background-color: #e0e0e0;
}

@media (max-width: 768px) {
    .fact-grid {
        grid-template-columns: 1fr;
    }

    .search-filter {
        flex-direction: column;
    }
}