@import url("colours.css");

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-900);
    background-color: var(--background-50);
    overflow-x: hidden;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--background-100);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--primary-200);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-600);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--accent-600);
}

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

.nav-links a {
    color: var(--text-800);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-600);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-500);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    background-color: var(--accent-500);
    color: var(--text-50) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    background-color: var(--accent-600);
    transform: translateY(-2px);
}

/* Blog Hero */
.blog-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-100), var(--secondary-100));
    margin-top: 70px;
}

.hero-container {
    max-width: 1400px;
    width: 100%;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-label {
    display: inline-block;
    background-color: var(--accent-200);
    color: var(--accent-800);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 900;
    color: var(--primary-700);
    line-height: 1;
}

.hero-description {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-700);
    max-width: 600px;
}

.hero-decoration {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.decoration-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-300), var(--primary-300));
    animation: float 3s ease-in-out infinite;
}

.decoration-circle:nth-child(2) {
    width: 120px;
    height: 120px;
    animation-delay: 0.5s;
    background: linear-gradient(135deg, var(--secondary-300), var(--accent-300));
}

.decoration-circle:nth-child(3) {
    width: 100px;
    height: 100px;
    animation-delay: 1s;
    background: linear-gradient(135deg, var(--primary-300), var(--secondary-300));
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    min-height: 50vh;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 4rem 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--primary-200);
    border-top-color: var(--accent-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: var(--text-600);
    font-size: 1.1rem;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Article Card */
.blog-card {
    background-color: var(--background-100);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--primary-200);
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-500), var(--secondary-500));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-400);
}

.card-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid var(--primary-200);
    background: linear-gradient(135deg, var(--background-100), var(--background-200));
}

.card-title {
    color: var(--primary-700);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.card-date {
    color: var(--text-600);
    font-size: 0.9rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-date::before {
    content: '📅';
    font-style: normal;
}

.card-excerpt {
    padding: 1.5rem 2rem;
    color: var(--text-700);
    line-height: 1.7;
    flex-grow: 1;
    font-size: 1rem;
}

.read-more {
    margin: 0 2rem 2rem;
    background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
    border: none;
    color: var(--text-50);
    padding: 0.875rem 1.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.read-more:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Full Article View */
.blog-post {
    background-color: var(--background-100);
    border-radius: 20px;
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
    animation: slideUp 0.5s ease;
    border: 2px solid var(--primary-200);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.back-button {
    background-color: var(--background-200);
    border: 2px solid var(--primary-300);
    color: var(--primary-700);
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 2.5rem;
    transition: all 0.3s ease;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button:hover {
    background-color: var(--primary-600);
    color: var(--text-50);
    border-color: var(--primary-600);
    transform: translateX(-5px);
}

.post-header {
    border-bottom: 3px solid var(--accent-500);
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.post-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background-color: var(--secondary-500);
}

.blog-title {
    color: var(--primary-700);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-date {
    color: var(--text-600);
    font-size: 1rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-date::before {
    content: '📅';
    font-style: normal;
}

.blog-content {
    color: var(--text-800);
    line-height: 1.8;
    font-size: 1.1rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content h1,
.blog-content h2,
.blog-content h3 {
    font-weight: 800;
    color: var(--primary-700);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--accent-400);
    padding-bottom: 0.5rem;
}

.blog-content h2 {
    font-size: 1.6rem;
    color: var(--secondary-700);
}

.blog-content h3 {
    font-size: 1.3rem;
    color: var(--secondary-600);
}

.blog-content code {
    background-color: var(--primary-100);
    color: var(--accent-700);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    border: 1px solid var(--primary-200);
}

.blog-content em,
.blog-content i {
    font-style: italic;
    color: var(--text-700);
}

.blog-content strong,
.blog-content b {
    font-weight: 700;
    color: var(--primary-800);
}

.blog-content a {
    color: var(--secondary-600);
    text-decoration: none;
    border-bottom: 2px solid var(--secondary-300);
    transition: all 0.3s ease;
}

.blog-content a:hover {
    color: var(--accent-600);
    border-bottom-color: var(--accent-600);
}

.blog-content ul,
.blog-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.blog-content ul li::marker {
    color: var(--accent-500);
}

.blog-content blockquote {
    border-left: 4px solid var(--accent-500);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-700);
    background-color: var(--background-200);
    padding: 1.5rem;
    border-radius: 8px;
}

/* No Articles State */
.no-articles {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--background-100);
    border: 2px dashed var(--primary-300);
    border-radius: 16px;
    animation: fadeIn 0.6s ease;
}

.no-articles::before {
    content: '✍️';
    display: block;
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-articles p {
    color: var(--primary-600);
    font-size: 1.2rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: var(--primary-700);
    color: var(--text-100);
    padding: 4rem 2rem 2rem;
    margin-top: 6rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    color: var(--text-50);
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    color: var(--accent-300);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-200);
    line-height: 1.8;
}

.footer-section a {
    display: block;
    color: var(--text-200);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-300);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--primary-600);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-300);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-decoration {
        justify-content: center;
    }

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

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

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .blog-hero {
        min-height: 40vh;
    }

    .hero-container {
        padding: 3rem 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .main-content {
        padding: 3rem 1.5rem;
    }

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

    .blog-post {
        padding: 2rem 1.5rem;
    }

    .decoration-circle {
        width: 80px;
        height: 80px;
    }

    .decoration-circle:nth-child(2) {
        width: 60px;
        height: 60px;
    }

    .decoration-circle:nth-child(3) {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .blog-title {
        font-size: 1.75rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .blog-content {
        font-size: 1rem;
    }
}