/* ==========================================================================
   ArmTechX — Public site styles
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --dark: #0f172a;
    --text: #1e293b;
    --muted: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
    --border: #e2e8f0;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --max: 1150px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Figtree', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
}

h1, h2, h3, h4 { color: var(--dark); line-height: 1.2; font-weight: 700; }

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.navbar .logo { font-size: 1.4rem; font-weight: 700; color: var(--primary); }

.navbar nav { display: flex; align-items: center; gap: 28px; }

.navbar nav a { color: var(--text); font-weight: 500; transition: color .2s; }
.navbar nav a:hover,
.navbar nav a.active { color: var(--primary); }

.navbar nav a.nav-btn {
    background: var(--primary);
    color: var(--white);
    padding: 9px 20px;
    border-radius: 999px;
}
.navbar nav a.nav-btn:hover { background: var(--primary-dark); color: var(--white); }

.menu-toggle {
    display: none;
    font-size: 1.6rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark);
}

.lang-switch { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; }
.lang-switch a { color: var(--muted); padding: 0; }
.lang-switch a:hover { color: var(--primary); }
.lang-switch a.active { color: var(--primary); text-decoration: underline; }
.lang-sep { color: var(--border); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.primary-btn, .secondary-btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 999px;
    font-weight: 600;
    transition: transform .15s, background .2s, box-shadow .2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.primary-btn { background: var(--primary); color: var(--white); }
.primary-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }

.secondary-btn { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.7); }
.secondary-btn:hover { background: rgba(255,255,255,.15); transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
    color: var(--white);
}
.hero-overlay { background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.08), transparent 60%); }
.hero-content {
    max-width: var(--max);
    margin: 0 auto;
    padding: 110px 24px;
}
.hero-content .label {
    display: inline-block;
    background: rgba(255,255,255,.15);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: .85rem;
    letter-spacing: .5px;
    margin-bottom: 20px;
}
.hero-content h1 { color: var(--white); font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 20px; }
.hero-content p { font-size: 1.15rem; max-width: 640px; opacity: .92; margin-bottom: 32px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 84px 0; }
.section.light { background: var(--light); }
.section-label, .page-header .label {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: .8rem;
    margin-bottom: 12px;
}
.section h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 18px; }
.section > .container > p { color: var(--muted); max-width: 720px; font-size: 1.05rem; }

.intro { text-align: center; }
.intro .container > p { margin: 0 auto; }

/* Page header (interior pages) */
.page-header {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: var(--white);
    padding: 90px 0 70px;
    text-align: center;
}
.page-header h1 { color: var(--white); font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 16px; }
.page-header p { max-width: 680px; margin: 0 auto; opacity: .9; font-size: 1.1rem; }

/* --------------------------------------------------------------------------
   Cards grid
   -------------------------------------------------------------------------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
    margin-top: 40px;
}
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 26px;
    box-shadow: var(--shadow);
    transition: transform .2s;
}
.card:hover { transform: translateY(-6px); }
.card .icon { font-size: 2.4rem; margin-bottom: 14px; }
.card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.card p { color: var(--muted); font-size: .97rem; }

/* --------------------------------------------------------------------------
   Impact
   -------------------------------------------------------------------------- */
.impact { background: var(--dark); color: var(--white); text-align: center; }
.impact h2 { color: var(--white); }
.impact .section-label { color: #93c5fd; }
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin-top: 44px;
}
.impact-box h3 { color: #60a5fa; font-size: 2.6rem; }
.impact-box p { color: #cbd5e1; margin-top: 6px; }

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */
.cta { background: linear-gradient(135deg, #2563eb, #1e40af); color: var(--white); text-align: center; }
.cta h2 { color: var(--white); }
.cta p { color: rgba(255,255,255,.9); margin: 0 auto 28px; }

/* --------------------------------------------------------------------------
   About — two column
   -------------------------------------------------------------------------- */
.two-column {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 44px;
    align-items: start;
}
.two-column p { color: var(--muted); margin-bottom: 16px; }
.highlight-box {
    background: var(--light);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 32px;
}
.highlight-box h3 { margin-bottom: 12px; }
.highlight-box p { color: var(--muted); margin: 0; }

/* --------------------------------------------------------------------------
   Programs
   -------------------------------------------------------------------------- */
.program-list { display: grid; gap: 22px; }
.program-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px;
    box-shadow: var(--shadow);
}
.program-number {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.program-item h2 { font-size: 1.5rem; margin-bottom: 10px; }
.program-item p { color: var(--muted); margin-bottom: 14px; }
.program-item ul { padding-left: 20px; color: var(--text); }
.program-item li { margin-bottom: 6px; }

/* --------------------------------------------------------------------------
   Events
   -------------------------------------------------------------------------- */
.event-list { display: grid; gap: 20px; margin-top: 36px; }
.event-card {
    display: flex;
    gap: 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 30px;
    box-shadow: var(--shadow);
    align-items: flex-start;
}
.event-date {
    background: var(--primary);
    color: var(--white);
    border-radius: 12px;
    text-align: center;
    padding: 14px 18px;
    min-width: 74px;
}
.event-date span { display: block; font-size: 1.7rem; font-weight: 700; }
.event-date p { font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; }
.event-card h3 { margin-bottom: 8px; }
.event-card p { color: var(--muted); margin-bottom: 4px; }

/* --------------------------------------------------------------------------
   Blog
   -------------------------------------------------------------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}
.blog-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(15,23,42,.12); }
.blog-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, .85);
    color: var(--white);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .5px;
    padding: 6px 12px;
    border-radius: 999px;
}
.blog-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.blog-meta { display: flex; gap: 8px; color: var(--muted); font-size: .85rem; margin-bottom: 10px; }
.blog-body h3 { font-size: 1.2rem; margin-bottom: 10px; line-height: 1.35; }
.blog-body p { color: var(--muted); font-size: .97rem; flex: 1; }
.blog-cover { display: block; }
.blog-body h3 a { color: var(--dark); transition: color .2s; }
.blog-body h3 a:hover { color: var(--primary); }
.blog-read { margin-top: 16px; color: var(--primary); font-weight: 600; align-self: flex-start; }
.blog-read:hover { color: var(--primary-dark); }

/* Blog post (detail) */
.post-header {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: var(--white);
    padding: 70px 0 46px;
    text-align: center;
}
.post-tag { position: static; display: inline-block; margin-bottom: 16px; }
.post-header h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.8rem); max-width: 820px; margin: 0 auto 18px; }
.post-meta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; color: #cbd5e1; font-size: .9rem; }
.post-cover {
    max-width: 860px;
    margin: -30px auto 0;
    position: relative;
    z-index: 2;
}
.post-cover img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 20px 45px rgba(15,23,42,.25);
    display: block;
}
.post-body { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }
.post-lead { font-size: 1.2rem; color: var(--text); font-weight: 500; margin-bottom: 28px; }
.post-body h2 { font-size: 1.5rem; margin: 34px 0 12px; }
.post-body p { color: #334155; margin-bottom: 16px; font-size: 1.05rem; }
.post-figure { margin: 30px 0; }
.post-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.post-figure figcaption { color: var(--muted); font-size: .9rem; text-align: center; margin-top: 10px; font-style: italic; }
.post-back { display: inline-block; margin-top: 24px; color: var(--primary); font-weight: 600; }
.post-back:hover { color: var(--primary-dark); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: start;
}
.contact-info p { color: var(--muted); margin-bottom: 18px; }
.contact-details { list-style: none; }
.contact-details li { margin-bottom: 8px; color: var(--text); }

.contact-form {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px;
    box-shadow: var(--shadow);
}
.contact-form label { display: block; font-weight: 600; margin: 16px 0 6px; }
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    background: #f8fafc;
    transition: border .2s, box-shadow .2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
    background: var(--white);
}
.contact-form button { margin-top: 22px; width: 100%; }

/* Flash / validation messages */
.flash { padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; }
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-error ul { list-style: none; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer { background: var(--dark); color: #cbd5e1; padding: 60px 0 0; }
.footer-container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}
.footer-container h3 { color: var(--white); font-size: 1.3rem; margin-bottom: 10px; }
.footer-container h4 { color: var(--white); margin-bottom: 14px; }
.footer-container a { display: block; color: #94a3b8; margin-bottom: 8px; transition: color .2s; }
.footer-container a:hover { color: var(--white); }
.footer-container p { color: #94a3b8; margin-bottom: 6px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    text-align: center;
    padding: 20px;
    font-size: .9rem;
    color: #94a3b8;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
    .menu-toggle { display: block; }
    .navbar nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 16px 24px;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .navbar nav.open { display: flex; }
    .two-column, .contact-wrapper { grid-template-columns: 1fr; }
    .event-card { flex-direction: column; }
}

/* ==========================================================================
   Books / Library
   ========================================================================== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}
.book-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.book-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(15,23,42,.12); }
.book-cover {
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-cover .book-icon { font-size: 3.4rem; }
.book-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.book-tag {
    display: inline-block;
    align-self: flex-start;
    background: var(--light);
    color: var(--primary-dark);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.book-body h3 { font-size: 1.15rem; margin-bottom: 8px; line-height: 1.35; color: var(--dark); }
.book-author { color: var(--muted); font-size: .85rem; margin-bottom: 12px; }
.book-body p { color: var(--muted); font-size: .95rem; flex: 1; }
.book-actions { margin-top: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.book-size { color: var(--muted); font-size: .82rem; }
/* Smaller, light-background-friendly buttons inside book cards */
.book-actions .primary-btn,
.book-actions .secondary-btn { padding: 9px 18px; font-size: .9rem; }
.book-actions .secondary-btn { color: var(--primary); border: 2px solid var(--border); background: var(--white); }
.book-actions .secondary-btn:hover { background: var(--light); border-color: var(--primary); }
