/* Custom Font Face */
@font-face {
    font-family: 'iA Writer Quattro';
    src: url('ia-writer-quattro/iAWriterQuattroS-Regular.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'iA Writer Quattro', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.bg-dots {
    background-size: 40px 40px;
    background-image: radial-gradient(circle, #eee 2px, transparent 2px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background-color: #dc2626;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.language-switcher {
    display: flex;
    gap: 8px;
}

.lang-btn {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 4px 8px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    min-width: 60px;
}

.lang-btn:hover,
.lang-btn.active {
    background-color: white;
    color: #dc2626;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #fff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.hero-logo {
    width: 120px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.hero-content h1 {
    font-family: 'Borel', cursive;
    font-size: 3.5rem;
    font-weight: normal;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.calendar-section {
    text-align: center;
}

.calendar-section h3 {
    font-family: 'iA Writer Quattro', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    margin-bottom: 1rem;
}

.calendar-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    background-color: white;
    color: #dc2626;
    border: none;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.calendar-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.cta-btn:hover {
    background-color: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Stories Section */
.stories {
    padding: 80px 0;
    background-color: #f8fafc;
}

.stories h2 {
    font-family: 'Borel', cursive;
    font-size: 2.5rem;
    color: #dc2626;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: normal;
}

.stories-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.story-text {
    text-align: left;
    display: flex;
    align-items: center;
}

.story-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #1f2937;
    font-weight: normal;
}

.story-tweet {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.tweet-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 16px;
    max-width: 100%;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: box-shadow 0.1s ease, transform 0.05s ease;
    transform-style: preserve-3d;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tweet-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.tweet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(29, 155, 240, 0.15), rgba(255, 20, 147, 0.15), rgba(255, 215, 0, 0.15));
    opacity: 0;
    transition: opacity 0.1s ease;
    pointer-events: none;
    border-radius: 12px;
}

.tweet-card:hover::before {
    opacity: 1;
}

.tweet-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.tweet-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.tweet-user-info {
    flex: 1;
    line-height: 1.3;
}

.tweet-name {
    font-weight: bold;
    color: #0f1419;
    font-size: 15px;
    margin-right: 4px;
}

.tweet-handle {
    color: #536471;
    font-size: 15px;
    margin-right: 4px;
}

.tweet-date {
    color: #536471;
    font-size: 15px;
}

.tweet-logo {
    position: absolute;
    top: 0;
    right: 0;
}

.tweet-logo a {
    display: inline-block;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.tweet-logo a:hover {
    background-color: rgba(29, 155, 240, 0.1);
}

.tweet-content {
    color: #0f1419;
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.tweet-content p {
    margin-bottom: 8px;
    color: #0f1419;
}

.tweet-content p:last-child {
    margin-bottom: 0;
}

.tweet-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 12px;
    position: relative;
    z-index: 2;
}

.tweet-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.tweet-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e1e8ed;
    max-width: 425px;
    position: relative;
    z-index: 2;
}

.tweet-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #536471;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tweet-stat:hover {
    color: #1d9bf0;
}

.tweet-stat:hover svg {
    fill: #1d9bf0;
}

.tweet-stat svg {
    transition: fill 0.2s ease;
}

/* Social Media Section */
.social-media {
    padding: 80px 0;
    background-color: white;
}

.social-media h2 {
    font-family: 'Borel', cursive;
    font-size: 2.5rem;
    color: #dc2626;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: normal;
}

/* Masonry Grid */
.masonry-grid {
    columns: 3;
    column-gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.social-item {
    break-inside: avoid;
    margin-bottom: 20px;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 16px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    width: 100%;
    cursor: pointer;
    position: relative;
}

.social-item:hover {
    background-color: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.social-item.tweet {
    /* Removed left border */
}

.social-item.video {
    border-left: 4px solid #ff0000;
}

.social-item h3 {
    color: #dc2626;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.social-item p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 10px;
}

.social-meta {
    font-size: 0.9rem;
    color: #6b7280;
    font-style: italic;
}

.social-meta a {
    color: #6b7280;
    text-decoration: none;
}

.social-meta a:hover {
    color: #dc2626;
}

/* Mini tweet styling for masonry grid */
.tweet-header-mini {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.tweet-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
}

.tweet-user-info-mini {
    line-height: 1.3;
    flex: 1;
}

.tweet-logo-mini {
    position: absolute;
    top: 0;
    right: 0;
}

.tweet-logo-mini svg {
    transition: fill 0.2s ease;
}

.social-item:hover .tweet-logo-mini svg {
    fill: #1d9bf0;
}

.tweet-name-mini {
    font-weight: bold;
    color: #0f1419;
    font-size: 0.9rem;
    margin-right: 4px;
}

.tweet-handle-mini {
    color: #536471;
    font-size: 0.9rem;
}

.tweet-content-mini {
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.tweet-content-mini p {
    color: #0f1419;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.tweet-image-container {
    margin-top: 12px;
    position: relative;
    z-index: 2;
}

.tweet-post-image {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.social-meta {
    font-size: 0.85rem;
    color: #6b7280;
    position: relative;
    z-index: 2;
}

/* Hero Popup */
.hero-popup {
    position: fixed;
    top: 100px;
    right: -300px;
    transform: translateY(0);
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
    z-index: 1500;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    font-family: 'iA Writer Quattro', Arial, sans-serif;
}

.hero-popup.show {
    right: 20px;
}

.hero-popup:hover {
    transform: translateY(0) scale(1.05);
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.4);
}

@media (max-width: 768px) {
    .hero-popup {
        font-size: 0.8rem;
        padding: 10px 16px;
        border-radius: 20px;
        box-shadow: 0 6px 20px rgba(220, 38, 38, 0.25);
        left: 50%;
        width: fit-content;
        max-width: 80%;
        text-align: center;
        transform: translateX(100%);
    }

    .hero-popup.show {
        transform: translateX(-50%);
    }
}

/* Footer */
footer {
    background-color: #dc2626;
    color: white;
    padding: 30px 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-logo {
        width: 80px;
        margin-bottom: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .masonry-grid {
        columns: 1;
    }

    .stories h2,
    .social-media h2 {
        font-size: 2rem;
    }

    .container {
        padding: 0 15px;
    }

    .stories-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .story-text {
        text-align: center;
    }

    .tweet-images {
        aspect-ratio: 1/1;
        grid-template-columns: 1fr 1fr;
        gap: 2px;
    }

    .tweet-image {
        height: 100%;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .masonry-grid {
        columns: 2;
    }
}

/* Animation for smooth transitions */
.social-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.social-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.social-item:nth-child(even) {
    animation-delay: 0.2s;
}

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