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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #111827;
    background-color: #f9fafb;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Header */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
}

.logo-text {
    display: block;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.hamburger {
    width: 24px;
    height: 2px;
    background-color: #111827;
    transition: all 0.3s;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #4b5563;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: #1e40af;
}

/* Top Banner */
.top-banner {
    background: linear-gradient(to right, #1d4ed8, #1e3a8a);
    padding: 1rem 0;
}

.banner-text {
    color: white;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Section Spacing */
.section-spacing {
    margin-bottom: 3rem;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.section-header.dark {
    background: linear-gradient(to right, #111827, #1f2937);
    color: white;
}

.section-header.red {
    background-color: #dc2626;
    color: white;
}

.section-header.purple {
    background: linear-gradient(to right, #4f46e5, #7c3aed);
    color: white;
}

.section-header.dark-full {
    background-color: #111827;
    color: white;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.section-header .icon {
    width: 20px;
    height: 20px;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.grid-tech {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.grid-dont-miss {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-latest {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1.5rem;
}

.latest-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.dont-miss-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dont-miss-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Article Cards */
.article-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
    display: block;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.article-card.large .article-image {
    height: 16rem;
    object-fit: cover;
    width: 100%;
}

.article-card.medium .article-image {
    height: 10rem;
    object-fit: cover;
    width: 100%;
}

.article-card.featured .article-image {
    height: 24rem;
    object-fit: cover;
    width: 100%;
}

.article-image-wrapper {
    position: relative;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    padding: 1rem;
}

.article-card.featured .article-content {
    padding: 1.5rem;
}

.article-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.article-card:hover .article-title {
    color: #2563eb;
}

.article-title-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}

.article-title-small {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.latest-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.article-meta .icon {
    width: 12px;
    height: 12px;
}

.article-date {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Category Badges */
.category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0.25rem;
    color: white;
}

.category-badge.red {
    background-color: #dc2626;
}

.category-badge.blue {
    background-color: #2563eb;
}

.category-badge-small {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.category-badge-small {
    background-color: #f3f4f6;
    color: #374151;
}

.category-badge-small.green {
    background-color: #d1fae5;
    color: #065f46;
}

.category-badge-small.purple {
    background-color: #e9d5ff;
    color: #6b21a8;
}

/* Sidebar Cards */
.sidebar-card {
    display: block;
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
    border-left: 4px solid #2563eb;
}

.sidebar-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.sidebar-card:hover .sidebar-title {
    color: #2563eb;
}

.sidebar-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Horizontal Cards */
.horizontal-card {
    display: flex;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.horizontal-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.horizontal-image {
    width: 12rem;
    height: 8rem;
    object-fit: cover;
    flex-shrink: 0;
}

.horizontal-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.horizontal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.horizontal-card:hover .horizontal-title {
    color: #2563eb;
}

/* Small Cards */
.small-card {
    display: block;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.small-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.small-image {
    width: 100%;
    height: 7rem;
    object-fit: cover;
}

.small-content {
    padding: 0.75rem;
}

.small-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.small-card:hover .small-title {
    color: #2563eb;
}

/* Trending Sidebar */
.trending-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trending-header {
    background-color: #dc2626;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
}

.trending-card {
    display: flex;
    gap: 0.75rem;
    background: white;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    border-left: 2px solid #d1d5db;
    transition: all 0.3s;
}

.trending-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left-color: #dc2626;
}

.trending-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #d1d5db;
    flex-shrink: 0;
}

.trending-content {
    flex: 1;
}

.trending-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-card:hover .trending-title {
    color: #2563eb;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(to right, #2563eb, #4f46e5);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    color: white;
}

.newsletter-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.newsletter-text {
    color: #bfdbfe;
    margin-bottom: 1.5rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 28rem;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: none;
    color: #111827;
}

.newsletter-input:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.newsletter-btn {
    padding: 0.5rem 1.5rem;
    background-color: #dc2626;
    color: white;
    font-weight: 600;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.newsletter-btn:hover {
    background-color: #b91c1c;
}

.subscribe-message {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    max-width: 28rem;
    margin: 0 auto;
}

.subscribe-message p {
    font-weight: 500;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.category-btn {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
    transition: all 0.2s;
}

.category-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Footer */
.footer {
    background-color: #111827;
    color: #f9fafb;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.footer-text {
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.footer-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #9ca3af;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #2563eb;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Article Detail Page Styles */
.article-detail {
    background: white;
}

.article-header {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.article-header-content {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #2563eb;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #1d4ed8;
}

.back-link .icon {
    width: 16px;
    height: 16px;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: #dbeafe;
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.article-category .icon {
    width: 12px;
    height: 12px;
}

.article-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.article-detail-excerpt {
    font-size: 1.25rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.article-detail-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.article-detail-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-detail-meta .icon {
    width: 16px;
    height: 16px;
}

.article-detail-meta .meta-item span {
    font-weight: 500;
}

.article-featured-image {
    max-width: 56rem;
    margin: 2rem auto;
    padding: 0 1rem;
}

.article-featured-image img {
    width: 100%;
    height: 25rem;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-body {
    max-width: 56rem;
    margin: 2rem auto;
    padding: 0 1rem;
}

.article-prose {
    color: #374151;
    line-height: 1.75;
    font-size: 1.125rem;
}

.article-prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.article-prose h2 {
    color: #111827;
    font-weight: 700;
    font-size: 1.875em;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3;
}

.article-prose h3 {
    color: #111827;
    font-weight: 600;
    font-size: 1.5em;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    line-height: 1.6;
}

.article-prose strong {
    color: #111827;
    font-weight: 600;
}

.article-prose a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.article-prose a:hover {
    color: #1d4ed8;
}

.author-bio {
    max-width: 56rem;
    margin: 2rem auto;
    padding: 0 1rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
}

.author-bio-card {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.author-bio-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.author-avatar {
    width: 4rem;
    height: 4rem;
    background-color: #2563eb;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-avatar .icon {
    width: 2rem;
    height: 2rem;
    color: white;
}

.author-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.author-info p {
    color: #6b7280;
    font-size: 0.875rem;
}

.related-articles {
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 4rem 0;
}

.related-content {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    transition: box-shadow 0.3s;
}

.related-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.related-card img {
    width: 100%;
    height: 10rem;
    object-fit: cover;
}

.related-card-content {
    padding: 1rem;
}

.related-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.related-card:hover h3 {
    color: #2563eb;
}

.related-card p {
    font-size: 0.875rem;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Content Pages */
.content-page {
    background: white;
    min-height: 100vh;
}

.content-header {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 3rem 0;
}

.content-header-content {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.content-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.content-header p {
    font-size: 1.125rem;
    color: #6b7280;
}

.content-body {
    max-width: 56rem;
    margin: 3rem auto;
    padding: 0 1rem;
}

.content-section {
    margin-bottom: 2.5rem;
}

.content-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.content-section p {
    color: #4b5563;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
    color: #4b5563;
    line-height: 1.75;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 0.5rem;
}

.content-section strong {
    color: #111827;
    font-weight: 600;
}

.content-section a {
    color: #2563eb;
    text-decoration: underline;
}

.content-section a:hover {
    color: #1d4ed8;
}

/* Contact Form */
.contact-form {
    max-width: 42rem;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 8rem;
}

.form-btn {
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.form-btn:hover {
    background-color: #1d4ed8;
}

.form-success {
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .grid-tech,
    .grid-latest {
        grid-template-columns: 1fr;
    }

    .tech-featured {
        order: 1;
    }

    .tech-sidebar {
        order: 2;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

    .trending-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

    .trending-header {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid #e5e7eb;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .grid-dont-miss {
        grid-template-columns: 1fr;
    }

    .dont-miss-right {
        grid-template-columns: repeat(2, 1fr);
    }

    .horizontal-card {
        flex-direction: column;
    }

    .horizontal-image {
        width: 100%;
        height: 12rem;
    }

    .article-detail-title {
        font-size: 2rem;
    }

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

    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .dont-miss-right {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .article-featured-image img {
        height: 16rem;
    }
}
