/**
 * Needlew Fhs - Marketing Education Platform
 * Main Stylesheet
 */

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #0f172a;
    background: #ffffff;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

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

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: #f59e0b;
    color: #fff;
}

.btn-secondary:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
}

.logo-icon {
    font-size: 2rem;
}

.logo strong {
    color: #2563eb;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    color: #475569;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #2563eb;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #2563eb;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #0f172a;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero .lead {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   PAGE HERO
   ============================================ */

.page-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-hero .lead {
    font-size: 1.125rem;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    padding: 4rem 0;
}

.section {
    margin-bottom: 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   CATEGORY FILTERS
   ============================================ */

.category-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3rem;
}

.category-btn {
    padding: 0.625rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

/* ============================================
   ARTICLE CARDS
   ============================================ */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.article-image {
    width: 100%;
    height: 220px;
    background: #e2e8f0;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    width: fit-content;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-excerpt {
    color: #64748b;
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.875rem;
    color: #64748b;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   FEATURED ARTICLE
   ============================================ */

.featured-article {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.featured-image {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

.featured-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-content p {
    font-size: 1.0625rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ============================================
   FORMS
   ============================================ */

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #0f172a;
    font-size: 0.9375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #fff;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.required {
    color: #dc2626;
}

.error-message {
    display: none;
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: #dc2626;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
}

/* ============================================
   NEWSLETTER FORM
   ============================================ */

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 2rem auto 0;
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #2563eb;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    margin: 4rem 0;
}

.cta-box {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
}

.cta-box h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   ABOUT PAGE STYLES
   ============================================ */

.about-section {
    margin-bottom: 4rem;
}

.about-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: 1.0625rem;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* ============================================
   CONTACT PAGE STYLES
   ============================================ */

.contact-form {
    background: #fff;
    max-width: 700px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
    color: #fff;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer-col p {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-company {
    font-style: italic;
    color: #94a3b8;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col a {
    color: #cbd5e1;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #60a5fa;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

/* ============================================
   NOTIFICATION
   ============================================ */

.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .featured-article {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }

    .featured-image {
        height: 300px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu a {
        padding: 0.75rem;
        width: 100%;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .lead {
        font-size: 1.0625rem;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .page-hero {
        padding: 2rem 0;
    }

    .page-hero h1 {
        font-size: 1.75rem;
    }

    .cta-box {
        padding: 2rem 1.5rem;
    }

    .cta-box h2 {
        font-size: 1.5rem;
    }
}
