/* =====================================
   RESET & BASE
===================================== */
* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #ffffff;
    color: #1F2937;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 15px; }

/* =====================================
   TOP NAVIGATION
===================================== */
.navbar-top {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: #072A61;
}
.nav-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #072A61, #F97316);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-menu a {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: #2d3748;
    transition: color 0.3s ease;
    padding: 6px 2px;
}
.nav-menu a:hover,
.nav-menu a.active {
    color: #072A61;
    font-weight: 600;
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #072A61;
}

/* =====================================
   HERO
===================================== */
.hero-section {
    background: linear-gradient(135deg, #072A61 0%, #0E4C92 100%);
    color: #fff;
    padding: 70px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}
.hero-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #FFB37A;
    margin-bottom: 14px;
}
.hero-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px;
    max-width: 640px;
}
.hero-subtitle {
    font-size: 16px;
    color: #D6E4F5;
    max-width: 560px;
    margin: 0 0 28px;
    line-height: 1.6;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
.btn-primary { background: #F97316; color: #fff; }
.btn-primary:hover { background: #EA6A0C; transform: translateY(-2px); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* =====================================
   FIELDS / CATEGORY SECTION
===================================== */
.fields-section {
    background-color: #EEF2FA;
    padding: 50px 0 60px;
}
.fields-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.fields-section-header { margin-bottom: 30px; }
.fields-section-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #666;
    margin: 0;
    padding: 0 0 0 15px;
    position: relative;
    text-transform: uppercase;
}
.fields-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background-color: #FF8C42;
    border-radius: 2px;
}
.fields-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 14px;
}
.field-card {
    background: white;
    border-radius: 10px;
    padding: 18px 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    position: relative;
    border: 2px solid transparent;
}
.field-card:hover { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(0,0,0,0.1); }
.field-card.active { background: #FFF7ED; border-color: #F97316; box-shadow: 0 4px 12px rgba(249,115,22,0.2); }
.field-icon {
    width: 46px; height: 46px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.field-card:hover .field-icon { transform: scale(1.1); }
.field-icon svg { width: 26px; height: 26px; }
.field-title { font-size: 13px; font-weight: 600; color: #1a1a1a; margin: 0 0 4px; line-height: 1.25; }
.field-count { font-size: 12px; color: #666; margin: 0; }

/* =====================================
   CATALOG SECTION
===================================== */
.catalog-section { padding: 50px 0 70px; max-width: 1200px; margin: 0 auto; }
.catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin: 0 20px 26px;
}
.catalog-title { font-size: 30px; font-weight: 700; color: #1F2937; margin: 0; }
.catalog-search {
    display: flex; align-items: center;
    background: #fff;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    overflow: hidden;
    min-width: 280px; max-width: 380px; flex: 1;
}
.catalog-search input {
    flex: 1; padding: 10px 16px; border: none; outline: none;
    font-size: 14px; color: #374151; font-family: inherit;
}
.catalog-search input::placeholder { color: #9CA3AF; }
.catalog-search button {
    padding: 10px 16px; background: transparent; border: none;
    cursor: pointer; color: #6B7280; display: flex; align-items: center;
}
.catalog-search button:hover { color: #072A61; }

.filter-tabs {
    display: flex; gap: 8px; flex-wrap: wrap;
    border-bottom: 1px solid #E5E7EB;
    margin: 0 20px 24px;
    padding-bottom: 0;
}
.filter-tab {
    padding: 12px 18px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}
.filter-tab:hover { color: #F97316; background: #FFF7ED; }
.filter-tab.active { color: #fff; background: #F97316; border-bottom-color: #F97316; }

.book-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin: 0 20px;
}
.book-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}
.book-card:hover { transform: translateY(-6px); box-shadow: 0 14px 26px rgba(0,0,0,0.1); }
.book-cover {
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #EEF2FA, #E3F2FD);
    display: flex; align-items: center; justify-content: center;
    color: #072A61;
    font-weight: 700;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-category-badge {
    position: absolute; top: 10px; left: 10px;
    background: rgba(7,42,97,0.85);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}
.book-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.book-title {
    font-size: 15px; font-weight: 700; color: #1a1a1a;
    margin: 0 0 6px; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.book-author { font-size: 13px; color: #6B7280; margin: 0 0 10px; }
.book-meta { font-size: 12px; color: #9CA3AF; margin: 0 0 12px; }
.book-footer {
    margin-top: auto;
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 10px; border-top: 1px solid #F3F4F6;
}
.book-price { font-weight: 700; color: #072A61; font-size: 14px; }
.book-link {
    font-size: 13px; font-weight: 600; color: #F97316;
}
.book-link:hover { color: #EA6A0C; }

.no-results-message { text-align: center; padding: 60px 20px; color: #6B7280; grid-column: 1 / -1; }

/* =====================================
   ABOUT / STATS
===================================== */
.stats-section { background: #072A61; padding: 50px 0; }
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    max-width: 1200px; margin: 0 auto; padding: 0 20px; text-align: center;
}
.stat-number { font-size: 34px; font-weight: 700; color: #FF8C42; }
.stat-label { font-size: 13px; color: #D6E4F5; margin-top: 6px; letter-spacing: 0.3px; }

.content-section { max-width: 900px; margin: 0 auto; padding: 60px 20px; line-height: 1.8; }
.content-section h1 { font-size: 30px; color: #072A61; margin-bottom: 18px; }
.content-section h2 { font-size: 20px; color: #072A61; margin-top: 32px; }

/* =====================================
   CONTACT FORM
===================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1000px; margin: 60px auto; padding: 0 20px; }
.contact-form label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: #374151; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 10px 14px; border: 1px solid #D1D5DB; border-radius: 8px;
    font-family: inherit; font-size: 14px; outline: none;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: #072A61; }
.contact-form button { margin-top: 18px; }
.contact-info-card { background: #EEF2FA; border-radius: 12px; padding: 28px; }
.contact-info-card h3 { color: #072A61; margin-top: 0; }
.form-success { background: #ECFDF5; color: #065F46; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }

/* =====================================
   FOOTER
===================================== */
.footer-divider { height: 4px; background: linear-gradient(90deg, #072A61, #F97316); }
.footer-main { background: #0B1F3A; color: #C9D6E8; padding: 50px 0 24px; }
.footer-logo-text { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-text { font-size: 13px; line-height: 1.7; color: #9FB2CC; }
.footer-license-text { font-size: 12px; color: #7F93B3; margin-top: 14px; }
.footer-license-text a { color: #FF8C42; }
.footer-title { color: #fff; font-weight: 600; font-size: 14px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: 10px; }
.footer-menu a { font-size: 13px; color: #B9C7DE; transition: color 0.2s ease; }
.footer-menu a:hover { color: #FF8C42; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 34px; padding-top: 20px;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    font-size: 12px; color: #7F93B3;
}
.footer-attribution a { color: #FF8C42; }

/* =====================================
   ACCESSIBILITY
===================================== */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* =====================================
   RESPONSIVE
===================================== */
@media (max-width: 1100px) {
    .fields-grid { grid-template-columns: repeat(4, 1fr); }
    .book-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .nav-menu {
        position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; flex-direction: column; align-items: flex-start;
        padding: 16px 20px; gap: 16px; border-bottom: 1px solid #E5E7EB;
        display: none;
    }
    .nav-menu.open { display: flex; }
    .nav-toggle { display: flex; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .hero-title { font-size: 30px; }
    .fields-grid { grid-template-columns: repeat(3, 1fr); }
    .book-grid { grid-template-columns: repeat(2, 1fr); }
    .catalog-header { flex-direction: column; align-items: stretch; }
    .catalog-search { max-width: 100%; }
    .filter-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .filter-tab { flex-shrink: 0; }
}
@media (max-width: 480px) {
    .fields-grid { grid-template-columns: repeat(2, 1fr); }
    .book-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
