/* ============================================
   e-Robotic Press - Main Stylesheet
   Colors inspired by the brand comps:
   Primary Blue: #1AA2FF
   Dark Navy: #0B1D3A
   Accent Green: #4ECB71
   Warm Orange: #FF8C42
   Light BG: #F5F9FF
   ============================================ */

:root {
    --erp-blue: #1AA2FF;
    --erp-navy: #0B1D3A;
    --erp-green: #4ECB71;
    --erp-orange: #FF8C42;
    --erp-light: #F5F9FF;
    --erp-yellow: #FFD93D;
    --erp-purple: #9B59B6;
}

body {
    font-family: 'Nunito', sans-serif;
    color: #333;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    color: #25408F;
}

/* ---- Navbar ---- */
.erp-navbar {
    background: #1A1D4A;
    padding: 0.75rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: relative;
}

.erp-navbar::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 23px;
    background-image: url('/images/Blue-Decorative-Squigle-line.png');
    background-repeat: repeat-x;
    background-size: auto 30px;
    z-index: 1;
    pointer-events: none;
}

.erp-navbar .nav-link {
    color: rgba(255,255,255) !important;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s;
}

.erp-navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(26, 162, 255, 0.3);
}

/* ---- Hero Section ---- */
.erp-hero {
    background: url('/images/eRP-Header-Image.png') center center / cover no-repeat;
    color: white;
    padding: 4rem 0 7rem;
    position: relative;
    overflow: hidden;
}

.erp-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26,162,255,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

    .erp-hero h1 {
        font-size: 3.5rem;
        font-weight: 700;
        margin-bottom: 1.5rem;
        text-align: center;
        color: white;
    }

.erp-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
}

/* ---- Subpage Banner (with background image, flush to navbar) ---- */
.erp-subpage-banner {
    background: url('/images/eRP-Header-Image.png') center center / cover no-repeat;
    color: white;
    padding: 3.5rem 0 3rem;
    text-align: center;
    position: relative;
    z-index: 0;
    margin-top: -6px; /* tuck under navbar squiggle so it overlaps */
    padding-top: calc(3.5rem + 6px);
}

.erp-subpage-banner h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    color: white;
}

.erp-subpage-banner p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Our Goal Overlap Banner ---- */
.erp-goal-banner {
    background: #146EAB;
    color: #fff;
    position: relative;
    z-index: 1;
    margin-top: -8rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.erp-goal-banner .goal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 280px;
}

.erp-goal-banner .goal-text {
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.erp-goal-banner .goal-text h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.erp-goal-banner .goal-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.95;
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .erp-goal-banner {
        margin-top: -4rem;
    }
    .erp-goal-banner .goal-text {
        padding: 2rem 1.5rem;
    }
    .erp-goal-banner .goal-image {
        min-height: 220px;
    }
}

/* ---- Our Goal / Callout Box ---- */
.erp-callout-box {
    background: var(--erp-light);
    border-left: 5px solid var(--erp-blue);
    border-radius: 0 16px 16px 0;
    padding: 2rem 2.5rem;
    margin: 2rem 0;
}

.erp-callout-box h3 {
    color: var(--erp-navy);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ---- Mission / Feature Card ---- */
.erp-mission-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    height: 100%;
    text-align: center;
}

.erp-mission-card i {
    font-size: 2.5rem;
    color: var(--erp-blue);
    margin-bottom: 1rem;
}

.erp-mission-card h5 {
    color: var(--erp-navy);
    font-weight: 700;
}

/* ---- About Highlight Box ---- */
.erp-highlight-box {
    background: linear-gradient(135deg, var(--erp-navy) 0%, #1a3a6a 100%);
    color: white;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    margin: 2rem 0;
}

.erp-highlight-box h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.erp-highlight-box p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* ---- Section Styles ---- */
.erp-section {
    padding: 4rem 0;
}

.erp-section-light {
    background-color: var(--erp-light);
}

.erp-section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--erp-navy);
}

.erp-section-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ---- Book Cards ---- */
.erp-book-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    background: #fff;
}

.erp-book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.erp-book-card .card-img-top {
    object-fit: contain;
    background: var(--erp-light);
    border-bottom: 4px solid var(--erp-blue);
}

.erp-book-card .card-body {
    padding: 1.25rem;
}

.erp-book-card .card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--erp-navy);
    line-height: 1.3;
}

.erp-book-card .card-text {
    font-size: 0.85rem;
    color: #666;
}

/* ---- Buttons ---- */
.btn-erp-primary {
    background-color: var(--erp-blue);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.6rem 2rem;
    font-weight: 600;
    font-family: 'Fredoka', sans-serif;
    transition: all 0.3s;
}

.btn-erp-primary:hover {
    background-color: #0d8de6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26,162,255,0.4);
}

.btn-erp-orange {
    background-color: var(--erp-orange);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.6rem 2rem;
    font-weight: 600;
    font-family: 'Fredoka', sans-serif;
    transition: all 0.3s;
}

.btn-erp-orange:hover {
    background-color: #e67a30;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,140,66,0.4);
}

.btn-erp-green {
    background-color: var(--erp-green);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.6rem 2rem;
    font-weight: 600;
    font-family: 'Fredoka', sans-serif;
    transition: all 0.3s;
}

.btn-erp-green:hover {
    background-color: #3db85e;
    color: white;
    transform: translateY(-2px);
}

.btn-amazon {
    background-color: #FF9900;
    color: #111;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2.5rem;
    font-size: 1.1rem;
    font-family: 'Fredoka', sans-serif;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-amazon:hover {
    background-color: #e68a00;
    color: #111;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,153,0,0.4);
}

/* ---- Product Page ---- */
.product-detail-section {
    padding: 3rem 0;
}

.product-cover-img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.product-meta-table {
    columns: 2;
    column-gap: 2rem;
}

.product-meta-table tbody {
    display: block;
    columns: 2;
    column-gap: 2rem;
}

.product-meta-table tr {
    display: flex;
    break-inside: avoid;
    border-bottom: 1px solid #dee2e6;
}

.product-meta-table th {
    width: 140px;
    flex-shrink: 0;
    white-space: nowrap;
    color: var(--erp-navy);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.product-meta-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    flex-grow: 1;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--erp-navy);
    margin-bottom: 0.75rem;
}

/* ---- Blog Cards ---- */
.erp-blog-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.erp-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.erp-blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.erp-blog-card .card-body {
    padding: 1.5rem;
}

.erp-blog-card .card-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    color: var(--erp-navy);
}

/* ---- Blog Post ---- */
.blog-post-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.blog-post-content h3 {
    color: var(--erp-navy);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-post-content p {
    margin-bottom: 1rem;
}

.blog-post-content ul {
    margin-bottom: 1rem;
}

/* ---- Carousel Section ---- */
.erp-carousel-section {
    padding: 3rem 0;
}

/* ---- Quote Cards ---- */
.erp-quote-card {
    background: var(--erp-light);
    border-radius: 16px;
    padding: 2rem;
    border-left: 5px solid var(--erp-blue);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.erp-quote-card blockquote {
    font-size: 1.1rem;
    font-style: italic;
    color: #444;
    margin-bottom: 0.5rem;
}

.erp-quote-card .quote-author {
    font-weight: 700;
    color: var(--erp-navy);
}

/* ---- Feature Icons ---- */
.erp-feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1rem;
}

.erp-feature-icon.blue { background: var(--erp-blue); }
.erp-feature-icon.green { background: var(--erp-green); }
.erp-feature-icon.orange { background: var(--erp-orange); }
.erp-feature-icon.purple { background: var(--erp-purple); }

/* ---- Footer ---- */
.erp-footer {
    background: linear-gradient(135deg, var(--erp-navy) 0%, #152d52 100%);
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

.footer-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--erp-blue);
}

.footer-social {
    color: rgba(255,255,255,0.7);
    font-size: 1.5rem;
    transition: color 0.2s;
}

.footer-social:hover {
    color: var(--erp-blue);
}

/* ---- Publish With Us Form ---- */
.erp-form .form-control,
.erp-form .form-select {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e8f0;
    transition: border-color 0.2s;
}

.erp-form .form-control:focus,
.erp-form .form-select:focus {
    border-color: var(--erp-blue);
    box-shadow: 0 0 0 0.2rem rgba(26,162,255,0.15);
}

.erp-form label {
    font-weight: 600;
    color: var(--erp-navy);
}

/* ---- Admin Styles ---- */
.admin-sidebar {
    background: var(--erp-navy);
    min-height: 100vh;
    padding: 1.5rem;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(26,162,255,0.2);
    color: white;
}

/* ---- Alert/Toast ---- */
.erp-alert-success {
    background: linear-gradient(135deg, var(--erp-green) 0%, #3db85e 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .erp-hero h1 {
        font-size: 2rem;
    }

    .erp-book-card .card-img-top {
    }

    .erp-subpage-banner h1 {
        font-size: 1.8rem;
    }
}

/* ---- Table of Contents styling in product page ---- */
.toc-list {
    list-style: none;
    padding-left: 0;
}

.toc-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px dotted #ddd;
    font-size: 0.9rem;
}

.toc-list li .toc-chapter {
    text-align: left;
}

.toc-list li .toc-page {
    text-align: right;
    flex-shrink: 0;
    margin-left: 1rem;
    color: #666;
}

/* ---- Author Bio Section ---- */
.author-bio-card {
    background: var(--erp-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.author-bio-card h5 {
    color: var(--erp-navy);
    margin-bottom: 0.25rem;
}

.author-bio-card .author-role {
    color: var(--erp-blue);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

/* ---- Search Overlay ---- */
.erp-search-toggle {
    font-size: 1.15rem;
    transition: color 0.2s;
}

.erp-search-toggle:hover {
    color: var(--erp-yellow) !important;
}

.erp-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--erp-navy);
    padding: 1.25rem 0;
    z-index: 1050;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.erp-search-overlay.open {
    transform: translateY(0);
    opacity: 1;
}

.erp-search-form .form-control.erp-search-input {
    border: 2px solid var(--erp-blue);
    border-radius: 2rem 0 0 2rem;
    padding: 0.65rem 1.25rem;
    font-size: 1.1rem;
    background: #fff;
}

.erp-search-form .form-control.erp-search-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(26, 162, 255, 0.25);
    border-color: var(--erp-blue);
}

.erp-search-btn {
    background: var(--erp-blue);
    color: #fff;
    border: 2px solid var(--erp-blue);
    font-weight: 600;
    padding: 0.65rem 1.25rem;
}

.erp-search-btn:hover {
    background: #0d8de6;
    border-color: #0d8de6;
    color: #fff;
}

.erp-search-close {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 1.2rem;
    padding: 0.65rem 1rem;
    border-radius: 0 2rem 2rem 0;
    border: 2px solid rgba(255,255,255,0.3);
    border-left: none;
}

.erp-search-close:hover {
    color: var(--erp-yellow);
    border-color: var(--erp-yellow);
}

/* ---- Search Results Page ---- */
.erp-search-page h1 {
    color: var(--erp-navy);
}

.erp-search-page-input .form-control {
    border: 2px solid var(--erp-blue);
    border-radius: 2rem 0 0 2rem;
    padding: 0.65rem 1.25rem;
}

.erp-search-page-input .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(26, 162, 255, 0.25);
    border-color: var(--erp-blue);
}

.erp-btn-search {
    background: var(--erp-blue);
    color: #fff;
    border: 2px solid var(--erp-blue);
    border-radius: 0 2rem 2rem 0;
    font-weight: 600;
}

.erp-btn-search:hover {
    background: #0d8de6;
    border-color: #0d8de6;
    color: #fff;
}

/* Filter buttons */
.erp-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.erp-filter-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    background: #e9ecef;
    color: #333;
    transition: all 0.2s;
}

.erp-filter-btn:hover {
    background: var(--erp-blue);
    color: #fff;
}

.erp-filter-btn.active {
    background: var(--erp-blue);
    color: #fff;
}

/* Result cards */
.erp-search-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.erp-search-result-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 1rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
    background: #fff;
}

.erp-search-result-card:hover {
    border-color: var(--erp-blue);
    box-shadow: 0 4px 16px rgba(26, 162, 255, 0.15);
    color: inherit;
}

.erp-search-result-img {
    flex-shrink: 0;
    width: 80px;
    height: 100px;
    overflow: hidden;
    border-radius: 0.5rem;
}

.erp-search-result-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.erp-search-result-body {
    flex: 1;
    min-width: 0;
}

.erp-search-result-body h5 {
    color: var(--erp-navy);
    font-size: 1.1rem;
}

.erp-search-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.erp-badge-book {
    background: rgba(78, 203, 113, 0.15);
    color: #2d9a4e;
}

.erp-badge-blogpost {
    background: rgba(26, 162, 255, 0.15);
    color: #0d8de6;
}

.erp-badge-page {
    background: rgba(155, 89, 182, 0.15);
    color: #8e44ad;
}

@media (max-width: 576px) {
    .erp-search-result-card {
        flex-direction: column;
    }

    .erp-search-result-img {
        width: 100%;
        height: 140px;
    }

    .erp-filter-group {
        justify-content: center;
    }
}
