/* 
   pages.css — Specific styles for marketing, legal, and informative pages
   To avoid inline CSS and keep main style.css clean.
*/

/* ═══════════════════════════════════════════════════════════════
   1. LEGAL PAGES (Privacy & Terms)
   ═══════════════════════════════════════════════════════════════ */
.legal-container {
    max-width: 1200px;
    margin: 0 auto;
}

.legal-section {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.legal-section h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--highlight);
}

.legal-section h3 {
    color: var(--neutral-900);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-section p {
    line-height: 1.8;
    color: var(--neutral-700);
    margin-bottom: 1rem;
}

.legal-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-section li {
    line-height: 1.8;
    color: var(--neutral-700);
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .legal-section {
        padding: 1.5rem 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   2. HERO SECTIONS (Shared between Home/About/Contact)
   ═══════════════════════════════════════════════════════════════ */
.page-hero {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
}

/* ═══════════════════════════════════════════════════════════════
   3. HOME PAGE: HERO V2
   ═══════════════════════════════════════════════════════════════ */
.hero-v2 {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #f0faf5;
}

.hero-v2__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-v2__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% center;
}

.hero-v2__bg-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(240, 250, 245, 1) 0%,
        rgba(240, 250, 245, 0.97) 25%,
        rgba(240, 250, 245, 0.88) 40%,
        rgba(240, 250, 245, 0.55) 60%,
        rgba(240, 250, 245, 0.15) 80%,
        transparent 100%
    );
    pointer-events: none;
}

.hero-v2__container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-v2__card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    max-width: 540px;
}

.hero-v2__headline {
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #111827;
    margin-bottom: 0.4rem;
}

.hero-v2__subheadline {
    font-size: 1rem;
    line-height: 1.5;
    color: #6b7280;
    margin-bottom: 1rem;
}

.hero-v2__features {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.hero-v2__feature-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    transition: all 0.3s ease;
    cursor: default;
}

.hero-v2__feature-row:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.hero-v2__feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.hero-v2__feature-icon--green { background: #dcfce7; color: #166534; }
.hero-v2__feature-icon--purple { background: #ede9fe; color: #6d28d9; }
.hero-v2__feature-icon--amber { background: #fef3c7; color: #b45309; }
.hero-v2__feature-icon--teal { background: #d1fae5; color: #047857; }

.hero-v2__feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.hero-v2__feature-text strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}

.hero-v2__feature-text span {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.35;
}

.hero-v2__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    font-family: inherit;
    border: none;
}

.hero-v2__btn--primary {
    background: #166534;
    color: #fff;
    box-shadow: 0 2px 10px rgba(22, 101, 52, 0.25);
}

.hero-v2__btn--primary:hover {
    background: #14532d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 101, 52, 0.35);
}

.hero-v2__btn--outline {
    background: #fff;
    color: #374151;
    border: 1.5px solid #d1d5db;
}

.hero-v2__btn--outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.hero-v2__trust {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-v2__trust-stars {
    display: flex;
    gap: 0.12rem;
    color: #f59e0b;
    font-size: 0.9rem;
}

.hero-v2__trust-text {
    font-size: 0.82rem;
    color: #6b7280;
}

.hero-v2__trust-text strong {
    color: #111827;
    font-weight: 700;
}

.hero-fade-in {
    opacity: 0;
    transform: translateY(18px);
    animation: heroFadeUp 0.65s ease forwards;
}

.hero-fade-in--delay-1 { animation-delay: 0.1s; }
.hero-fade-in--delay-2 { animation-delay: 0.2s; }
.hero-fade-in--delay-3 { animation-delay: 0.3s; }
.hero-fade-in--delay-4 { animation-delay: 0.4s; }
.hero-fade-in--delay-5 { animation-delay: 0.5s; }

@keyframes heroFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .hero-v2__container { grid-template-columns: 1.2fr 0.8fr; padding: 2.5rem 1.5rem; }
    .hero-v2__card { max-width: 100%; }
}

@media (max-width: 768px) {
    .hero-v2 { min-height: auto; }
    .hero-v2__bg-fade {
        background: linear-gradient(to bottom, rgba(240, 250, 245, 0.92) 0%, rgba(240, 250, 245, 0.8) 50%, rgba(240, 250, 245, 0.55) 100%);
    }
    .hero-v2__container { grid-template-columns: 1fr; padding: 2rem 1rem; }
    .hero-v2__card { max-width: 100%; padding: 2rem 1.5rem; text-align: center; }
    .hero-v2__feature-row { text-align: left; }
    .hero-v2__cta { justify-content: center; }
    .hero-v2__btn { width: 100%; }
    .hero-v2__trust { justify-content: center; }
}

@media (max-width: 480px) {
    .hero-v2__container { padding: 1.5rem 0.85rem; }
    .hero-v2__card { padding: 1.5rem 1.15rem; border-radius: 16px; }
    .hero-v2__headline { font-size: 1.5rem; }
    .hero-v2__subheadline { font-size: 0.9rem; }
}

/* ═══════════════════════════════════════════════════════════════
   4. SECTION UTILITIES (Generic)
   ═══════════════════════════════════════════════════════════════ */
.section-white {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.section-highlight {
    background: var(--highlight);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.section-primary-gradient {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius);
}

.content-narrow {
    max-width: 800px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   5. ABOUT PAGE SPECIFIC
   ═══════════════════════════════════════════════════════════════ */
.value-card {
    text-align: center;
}

.value-card-icon {
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 3rem;
}

.offer-item {
    padding: 1.5rem;
}

.offer-item h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--neutral-900);
}

.offer-item h3 i {
    color: var(--primary);
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   6. CONTACT PAGE SPECIFIC
   ═══════════════════════════════════════════════════════════════ */
.contact-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--highlight);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--neutral-200);
}

.social-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Feature Frames (Bottom of Contact Page) */
.feature-frame {
    position: relative;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 3rem 2rem 2rem 2rem;
    margin-bottom: 3rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    margin-top: 2rem;
}

.feature-frame-badge {
    position: absolute;
    top: -18px;
    left: 3rem;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.75rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.feature-frame-content {
    color: #1e3a8a;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.feature-frame-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #1f2937;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-frame-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.feature-frame-list i {
    color: var(--primary);
    font-size: 1.5rem;
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   7. NEWSLETTER SECTION
   ═══════════════════════════════════════════════════════════════ */
.newsletter-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 3rem 1rem;
    border-radius: 12px;
    text-align: center;
}

.newsletter-form-p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form-inline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 1rem;
    background: transparent;
    box-shadow: none;
}

.newsletter-form-inline input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    width: 100%;
}

.newsletter-form-inline button {
    background: white;
    color: var(--primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

@media (min-width: 768px) {
    .newsletter-form-inline {
        flex-direction: row !important;
        gap: 0.5rem !important;
    }
    .newsletter-form-inline button {
        width: auto !important;
        white-space: nowrap;
    }
}

#newsletter-message.success {
    background: #d1fae5;
    color: #065f46;
}

#newsletter-message.error {
    background: #fee2e2;
    color: #991b1b;
}

#newsletter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
   8. BROWSE PAGE SPECIFIC
   ═══════════════════════════════════════════════════════════════ */
.browse-container {
    max-width: 1280px;
    margin: 0 auto;
}

.browse-seo-intro {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #f9fafb 100%);
    border-radius: 12px;
    border-left: 5px solid var(--primary);
    margin-bottom: 3rem;
}

.browse-seo-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--neutral-700);
    margin: 0;
    text-align: justify;
}

.browse-grid {
    display: grid;
    gap: 1.5rem;
}

.browse-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   9. ITEM (PRODUCT) PAGE SPECIFIC
   ═══════════════════════════════════════════════════════════════ */
.item-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
}

.item-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .item-container { padding: 2rem; }
    .item-grid { grid-template-columns: 2fr 1fr; gap: 2rem; }
}

.item-content-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) { .item-content-card { padding: 2rem; } }

.item-section-title {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) { .item-section-title { font-size: 1.25rem; } }

.item-detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, var(--neutral-50) 0%, white 100%);
    border-radius: 6px;
    border-left: 3px solid var(--primary-light);
    margin-bottom: 0.75rem;
}

.item-detail-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--neutral-600);
    font-weight: 600;
}

.item-detail-value {
    font-size: 0.95rem;
    color: var(--neutral-900);
    font-weight: 500;
    word-break: break-word;
}

.item-price-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
}

/* Purchase Card */
.purchase-card-v2 {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.15);
    border: 2px solid var(--primary-light);
}

@media (min-width: 992px) {
    .purchase-card-v2 { padding: 2rem; position: sticky; top: 100px; }
    .purchase-card-mobile { display: none; }
}

@media (max-width: 991px) { .purchase-card-desktop { display: none; } }

/* M-Pesa Form */
.mpesa-input-v2 {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.mpesa-spinner-v2 {
    width: 40px; height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid var(--primary, #047857);
    border-radius: 50%;
    animation: mpesa-spin-v2 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes mpesa-spin-v2 {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mpesa-success-icon-v2 {
    width: 48px; height: 48px; margin: 0 auto 1rem;
    background: #10b981; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.5rem; font-weight: bold;
}

/* Related Items */
.related-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--neutral-200);
}

.related-card-v2 {
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
}

.related-card-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ═══════════════════════════════════════════════════════════════
   10. AUTH PAGES MINOR TWEAKS
   ═══════════════════════════════════════════════════════════════ */
.auth-logo-img {
    height: 48px;
    width: auto;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-forgot-link {
    color: var(--primary);
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   11. BACK TO TOP BUTTON
   ═══════════════════════════════════════════════════════════════ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    color: white;
}

.back-to-top i {
    font-size: 1.25rem;
}
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}
