/* ============================================================
   AcademicEdit Pro - Main Stylesheet
   Design: Refined Editorial / Academic Luxury
   ============================================================ */

:root {
    --navy:      #0d2340;
    --navy-700:  #162f54;
    --navy-500:  #1e4080;
    --gold:      #c9974a;
    --gold-light:#e8b96a;
    --cream:     #faf8f4;
    --text:      #1a1a2e;
    --muted:     #6b7280;
    --border:    #e5e7eb;
    --white:     #ffffff;
    --success:   #0d7a5a;
    --warning:   #b45309;
    --danger:    #be123c;
    --info:      #1d4ed8;
    --radius:    0.5rem;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:    0 4px 16px rgba(13,35,64,.08), 0 1px 3px rgba(13,35,64,.06);
    --shadow-lg: 0 16px 40px rgba(13,35,64,.12), 0 4px 10px rgba(13,35,64,.08);
}

/* ─── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
}
a { color: var(--navy-500); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }

/* ─── Navbar ───────────────────────────────────────────────── */
.aep-navbar {
    background: rgba(255,255,255,0.99);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1030;
}
.aep-navbar .dropdown-menu {
    z-index: 1031;
}
.aep-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy) !important;
}
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--navy), var(--navy-500));
    color: var(--white);
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: 1.1rem;
}
.brand-accent { color: var(--gold); }
.brand-text { letter-spacing: -0.5px; }
.navbar-nav .nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text) !important;
    padding: 0.5rem 0.85rem;
    transition: color 0.2s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--navy-500) !important; }
.user-avatar-sm {
    width: 24px; height: 24px;
    background: var(--navy);
    color: var(--white);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn-primary {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
    font-weight: 500;
    transition: all 0.2s;
}
.btn-primary:hover {
    background: var(--navy-500);
    border-color: var(--navy-500);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13,35,64,.25);
}
.btn-outline-primary {
    border-color: var(--navy);
    color: var(--navy);
    font-weight: 500;
}
.btn-outline-primary:hover {
    background: var(--navy);
    border-color: var(--navy);
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: none;
    color: var(--white);
    font-weight: 600;
    letter-spacing: 0.01em;
}
.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(201,151,74,.4);
}
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }

/* ─── Hero ─────────────────────────────────────────────────── */
.aep-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 45%, #0d3060 100%);
    color: var(--white);
    padding: 5rem 0 4.5rem;
    position: relative;
    overflow: hidden;
}
.aep-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 0h80v80H0z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(201,151,74,.2);
    border: 1px solid rgba(201,151,74,.4);
    color: var(--gold-light);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}
.aep-hero h1 { 
    font-size: clamp(2rem, 5vw, 3.25rem);
    color: var(--white);
    margin-bottom: 1.25rem;
}
.aep-hero .lead { 
    font-size: 1.1rem;
    color: rgba(255,255,255,.8);
    max-width: 540px;
}
.hero-stats {
    display: flex; gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.12);
}
.hero-stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1;
}
.hero-stat-label { font-size: 0.8rem; color: rgba(255,255,255,.6); }
.hero-card {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 2rem;
    color: var(--white);
}
.hero-card h5 { color: var(--white); font-size: 1rem; }

/* ─── Section Titles ───────────────────────────────────────── */
.section-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-title-lg { font-size: clamp(1.8rem, 3.5vw, 2.75rem); }

/* ─── Service Cards ────────────────────────────────────────── */
.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.25s;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}
.service-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #eef2ff, #e0e8ff);
    color: var(--navy-500);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}
.service-card h5 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.service-card .price-tag {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
}
.service-card .price-unit { font-size: 0.8rem; color: var(--muted); }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
    display: flex; align-items: flex-start; gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--muted);
    padding: 0.25rem 0;
}
.feature-list li .bi { color: var(--success); flex-shrink: 0; margin-top: 2px; }

/* ─── Pricing Calculator ───────────────────────────────────── */
.calculator-card {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    position: sticky; top: 5rem;
}
.calc-result {
    background: var(--navy);
    color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.25rem;
}
.calc-price-main {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1;
}
.form-range::-webkit-slider-thumb { background: var(--navy); }

/* ─── Order Process ────────────────────────────────────────── */
.process-step { position: relative; }
.step-number {
    width: 48px; height: 48px;
    background: var(--navy);
    color: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    position: relative; z-index: 1;
}
.step-connector {
    position: absolute;
    top: 24px;
    left: calc(50% + 24px);
    right: calc(-50% + 24px);
    height: 2px;
    background: linear-gradient(90deg, var(--navy), var(--border));
}

/* ─── Dashboard / Order Cards ──────────────────────────────── */
.order-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}
.order-card:hover { box-shadow: var(--shadow); }
.order-number { font-size: 0.8rem; color: var(--muted); font-family: monospace; }
.status-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
}
.status-badge.pending    { background: #fef3c7; color: #92400e; }
.status-badge.assigned   { background: #dbeafe; color: #1e40af; }
.status-badge.in_review  { background: #e0e7ff; color: #3730a3; }
.status-badge.editing    { background: #e0e7ff; color: #3730a3; }
.status-badge.completed  { background: #d1fae5; color: #065f46; }
.status-badge.delivered  { background: #d1fae5; color: #065f46; }
.status-badge.revision   { background: #fef3c7; color: #92400e; }
.status-badge.cancelled  { background: #fee2e2; color: #991b1b; }

/* Progress tracker */
.order-progress { display: flex; margin: 1.5rem 0; }
.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    font-size: 0.75rem;
    color: var(--muted);
}
.progress-step::before {
    content: '';
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--white);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.4rem;
}
.progress-step::after {
    content: '';
    position: absolute;
    top: 13px; left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}
.progress-step:last-child::after { display: none; }
.progress-step.active::before {
    background: var(--navy);
    border-color: var(--navy);
}
.progress-step.done::before { background: var(--success); border-color: var(--success); }
.progress-step.active { color: var(--navy); font-weight: 600; }

/* ─── Forms ────────────────────────────────────────────────── */
.form-label { font-size: 0.88rem; font-weight: 500; color: var(--navy); margin-bottom: 0.35rem; }
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--navy-500);
    box-shadow: 0 0 0 3px rgba(30,64,128,.1);
}
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--cream);
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--navy-500);
    background: #eef2ff;
}
.upload-zone .upload-icon {
    font-size: 2.5rem;
    color: var(--navy-500);
    margin-bottom: 0.75rem;
}

/* ─── Stats Cards ──────────────────────────────────────────── */
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--navy-500));
}
.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}
.stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}

/* ─── Testimonials ─────────────────────────────────────────── */
.testimonial-card {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}
.testimonial-card .stars { color: var(--gold); }
.avatar-circle {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

/* ─── Pricing Table ────────────────────────────────────────── */
.pricing-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    transition: all 0.25s;
}
.pricing-card.featured {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}
.pricing-card.featured h3,
.pricing-card.featured .price-amount,
.pricing-card.featured p { color: rgba(255,255,255,.9); }
.pricing-card.featured .feature-list li { color: rgba(255,255,255,.75); }
.pricing-card.featured .feature-list li .bi { color: var(--gold-light); }
.featured-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--gold);
    color: var(--white);
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.price-amount {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}

/* ─── Blog ─────────────────────────────────────────────────── */
.blog-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s;
    height: 100%;
}
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.blog-card-img {
    height: 180px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-500) 100%);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.3);
    font-size: 3rem;
}
.blog-category {
    font-size: 0.73rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
}

/* ─── Footer ───────────────────────────────────────────────── */
.aep-footer { background: var(--navy); color: rgba(255,255,255,.8); }
.footer-heading {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { color: rgba(255,255,255,.6); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold-light); }
.footer-contact { list-style: none; padding: 0; }
.footer-contact li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.88rem; margin-bottom: 0.5rem; }
.footer-contact a { color: rgba(255,255,255,.7); }
.social-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.7);
    border-radius: 8px;
    margin-right: 0.4rem;
    transition: all 0.2s;
}
.social-link:hover { background: var(--gold); color: var(--white); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
}
.footer-legal-links a { transition: color 0.2s; }
.footer-legal-links a:hover { color: var(--gold-light) !important; }
.footer-brand { display: flex; align-items: center; }
.footer-brand .brand-text { color: var(--white) !important; font-family: 'Playfair Display', serif; font-size: 1.25rem; }

/* ─── Admin Overrides (shared components) ──────────────────── */
.admin-badge { background: #fee2e2; color: #991b1b; padding: 0.2rem 0.6rem; border-radius: 50px; font-size: 0.75rem; }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-stats { gap: 1.25rem; flex-wrap: wrap; }
    .hero-stat-num { font-size: 1.5rem; }
    .calculator-card { position: static; }
    .pricing-card.featured { transform: none; }
    .step-connector { display: none; }
}

/* ─── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.5s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ─── Utilities ────────────────────────────────────────────── */
.text-gold { color: var(--gold) !important; }
.text-navy { color: var(--navy) !important; }
.bg-navy  { background-color: var(--navy) !important; }
.bg-cream { background-color: var(--cream) !important; }
.rounded-xl { border-radius: 16px !important; }
.divider-gold { height: 3px; background: linear-gradient(90deg, var(--gold), transparent); border: none; }
.section-py { padding: 5rem 0; }
.section-py-sm { padding: 3rem 0; }
