@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===========================
   CSS Variables
   =========================== */
:root {
    --brand-red: #E60000;
    --brand-red-dark: #C30000;
    --accent-blue: #3B82F6;
    --text-dark: #121826;
    --text-medium: #3A475B;
    --text-light: #6C7A91;
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --border-color: #E5E7EB;
    --shadow-color-light: rgba(0, 0, 0, 0.03);
    --shadow-color-medium: rgba(0, 0, 0, 0.06);
    --section-padding-y: clamp(3rem, 8vw, 5rem);
    --text-dark-footer-bg: #121826;
}

/* ===========================
   Base Reset & Typography
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: var(--brand-red); transition: color 0.2s ease-in-out; }
a:hover { color: var(--brand-red-dark); }

h1, h2, h3, h4, h5, h6 { margin-bottom: 0.8em; line-height: 1.25; font-weight: 700; color: var(--text-dark); }
p { margin-bottom: 1.5em; color: var(--text-medium); font-size: clamp(0.95rem, 1.5vw, 1.1rem); }
ul, ol { margin-bottom: 1.5em; padding-left: 20px; }
li { margin-bottom: 0.5em; color: var(--text-medium); }
strong { font-weight: 600; color: var(--text-dark); }

/* ===========================
   Container
   =========================== */
.container { width: 90%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Blog post content uses narrower container */
.blog-post-section .container { max-width: 800px; }

/* ===========================
   Navbar
   =========================== */
.navbar {
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: .6rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(226,232,240,.5);
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; max-width: 1280px; }
.logo { display: flex; align-items: center; gap: .5rem; }
.logo img { width: 34px; height: 34px; border-radius: 8px; }
.logo span { font-size: 1.35rem; font-weight: 800; color: var(--brand-red); }

.nav-links { display: none; align-items: center; list-style: none; }
@media (min-width: 992px) {
    .nav-links { display: flex; }
}
.nav-links li { margin-left: 2rem; }
.nav-links a { color: var(--text-medium); font-weight: 500; font-size: .88rem; position: relative; padding: .45rem .7rem; border-radius: 6px; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background-color: var(--brand-red); transition: width 0.3s ease-in-out; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover, .nav-links a.active { color: var(--brand-red); }
.nav-links .cta-button-nav { margin-left: 2rem; color: #fff !important; padding: .7rem 1.6rem; font-size: .9rem; }
.nav-links .cta-button-nav:hover { color: #fff !important; }
.nav-links .cta-button-nav::after { display: none; }

/* Mobile menu button */
.mobile-menu-button { display: block; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--text-dark); padding: 5px; }
@media (min-width: 992px) {
    .mobile-menu-button { display: none; }
}

/* Mobile nav (blog listing variant: separate div) */
#main-nav-links-mobile {
    background-color: var(--bg-white);
    box-shadow: 0 10px 15px var(--shadow-color-light);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
}
@media (min-width: 992px) {
    #main-nav-links-mobile { display: none !important; }
}
#main-nav-links-mobile a {
    display: block;
    padding: 0.8rem 1rem;
    text-align: center;
    font-weight: 500;
    color: var(--text-medium);
}
#main-nav-links-mobile a:hover { color: var(--brand-red); background-color: var(--bg-light); }
#main-nav-links-mobile .cta-button-nav { margin: 0.8rem auto; display: block; width: fit-content; color: #fff !important; }
#main-nav-links-mobile .cta-button-nav:hover { color: #fff !important; }

/* ===========================
   CTA Buttons
   =========================== */
.cta-button {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.25s ease-in-out;
    text-align: center;
    display: inline-block;
    border: none;
    cursor: pointer;
}
.cta-button-primary {
    background-image: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    color: white !important;
    box-shadow: 0 4px 12px rgba(230, 0, 0, 0.25);
}
.cta-button-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 7px 18px rgba(230, 0, 0, 0.3);
}
.cta-button.cta-button-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1.6rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: .9rem;
    font-family: inherit;
    text-decoration: none;
    transition: all .25s cubic-bezier(.16,1,.3,1);
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(230, 0, 0, 0.25);
}
.cta-button.cta-button-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(230, 0, 0, 0.3);
    color: #fff !important;
}

/* ===========================
   Language Switcher
   =========================== */
.language-switcher-container {}
.language-switcher { position: relative; display: inline-block; }
.language-switcher-button {
    background-color: transparent;
    color: var(--text-medium);
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.language-switcher-button:hover,
.language-switcher-button:focus-visible {
    background-color: var(--bg-light);
    color: var(--brand-red);
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}
.language-switcher-button svg:first-of-type { width: 16px; height: 16px; margin-right: 0.4rem; }
.language-switcher-button .chevron-icon { margin-left: 0.4rem; margin-right: 0; transition: transform 0.2s ease-in-out; }
.language-switcher-button[aria-expanded="true"] .chevron-icon { transform: rotate(180deg); }

.language-dropdown {
    display: none;
    position: absolute;
    background-color: var(--bg-white);
    min-width: 140px;
    box-shadow: 0 5px 15px var(--shadow-color-light);
    border-radius: 8px;
    padding: 0.5rem 0;
    list-style: none;
    top: calc(100% + 0.5rem);
    right: 0;
    margin-top: 0;
    z-index: 1010;
    border: 1px solid var(--border-color);
}
.language-dropdown.show { display: block; }
.language-dropdown li a {
    color: var(--text-dark);
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}
.language-dropdown li a:hover,
.language-dropdown li a:focus-visible {
    background-color: var(--bg-light);
    color: var(--brand-red);
    outline: none;
}
.language-dropdown li a::after { display: none !important; }

/* ===========================
   Blog Listing (blog.html)
   =========================== */

/* Hero section */
.blog-hero-section {
    background-color: var(--brand-red);
    color: var(--bg-white);
    padding: clamp(2rem, 8vw, 4rem) 0;
    text-align: center;
}
.blog-hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--bg-white);
    margin-bottom: 0.5rem;
}
.blog-hero-section p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.9);
    max-width: 700px;
    margin: 0 auto 1rem auto;
}

/* Main container top padding (listing page) */
main.container {
    padding-top: var(--section-padding-y);
}

/* Listing section */
.blog-listing-section {
    padding-top: 0;
    padding-bottom: var(--section-padding-y);
    flex-grow: 1;
}

/* Blog grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Blog cards */
.blog-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 8px 16px var(--shadow-color-medium);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px var(--shadow-color-medium);
}
.blog-card-image-placeholder {
    height: 200px;
    background-color: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-style: italic;
    background-size: cover;
    background-position: center;
}
.blog-card-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}
.blog-card-content h3 a { color: var(--text-dark); }
.blog-card-content h3 a:hover { color: var(--brand-red); }
.blog-card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}
.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

/* Read more button */
.read-more-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--brand-red);
    color: var(--brand-red);
    border-radius: 20px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    align-self: flex-start;
}
.read-more-btn:hover {
    background-color: var(--brand-red);
    color: var(--bg-white);
}

/* ===========================
   Blog Post (article pages)
   =========================== */
.blog-post-section {
    padding: var(--section-padding-y) 0;
    background-color: var(--bg-white);
    flex-grow: 1;
}
.blog-post-section p {
    font-size: 1.05rem;
}
.blog-post-header {
    margin-bottom: 2.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}
.blog-post-header h1 {
    font-size: clamp(2.2rem, 5vw, 3rem);
    margin-bottom: 0.5rem;
}
.blog-post-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}
.blog-post-meta span { margin: 0 0.5em; }
.blog-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}
.blog-post-content h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.blog-post-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
.blog-post-content blockquote {
    border-left: 4px solid var(--brand-red);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-medium);
}
.blog-post-content img.featured-image,
.blog-post-content img.inline-image {
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color-light);
    margin: 1.5rem auto;
    display: block;
    max-width: 100%;
    height: auto;
}

/* Back to blog link */
.back-to-blog-link {
    display: inline-block;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-blue);
    font-weight: 500;
}
.back-to-blog-link:hover { text-decoration: underline; }

/* ===========================
   Footer
   =========================== */
.footer {
    background-color: var(--text-dark-footer-bg);
    color: #A0AEC0;
    padding: 4rem 0 2rem;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}
.footer .container { display: flex; flex-direction: column; align-items: center; max-width: 1280px; }
.footer-logo-container { display: flex; align-items: center; margin-bottom: 1.5rem; text-decoration: none; }
.footer-logo-container img { width: 36px; height: 36px; margin-right: 0.6rem; border-radius: 6px; }
.footer-logo-container span { font-size: 1.5rem; font-weight: 700; color: var(--bg-white); }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; margin-bottom: 1.5rem; padding-left: 0; }
.footer-links li { margin: 0.3rem 0.8rem; }
.footer-links a { color: #A0AEC0; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--bg-white); }
.footer .copyright { margin-bottom: 0.5rem; }
.footer .disclaimer { font-size: 0.8rem; color: #718096; margin-top: 1rem; max-width: 600px; line-height: 1.5; }

/* ===========================
   Responsive Breakpoints
   =========================== */

/* Tablet / small desktop */
@media (max-width: 991px) {
    .navbar .container { flex-wrap: wrap; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--bg-white);
        box-shadow: 0 10px 15px var(--shadow-color-light);
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
        order: 3;
    }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 0.8rem 0; width: 100%; text-align: center; }
    .nav-links a { width: 100%; display: block; padding: 0.5rem 1rem; }
    .nav-links .cta-button-nav { margin: 0.8rem auto; display: inline-block; width: auto; }
    .mobile-menu-button { display: block; order: 2; margin-left: auto; }
    .logo { order: 1; }
    .language-switcher-container { width: 100%; text-align: center; margin-left: 0; order: 0; }
    .language-switcher-button { padding: 0.8rem 1rem; width: auto; margin: 0.5rem auto; justify-content: center; }
    .language-dropdown { left: 50%; transform: translateX(-50%); min-width: 180px; }
}

/* Mobile */
@media (max-width: 767px) {
    .blog-hero-section { padding: 3rem 0; }
    main.container { padding-top: 2rem; }
    .blog-listing-section { padding-bottom: 3rem; }
}

/* Small mobile */
@media (max-width: 480px) {
    .container { width: 95%; padding: 0 15px; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-post-header h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
}
