/* ===== HomeoHerbal AI Styles ===== */
:root {
    --primary: #1a5f7a;
    --primary-dark: #134b61;
    --primary-light: #2d8bba;
    --accent: #57c5b6;
    --gold: #d4a853;
    --green: #2e7d32;
    --green-light: #4caf50;
    --red: #c62828;
    --purple: #6a1b9a;
    --text: #2c3e50;
    --text-light: #5d6d7e;
    --text-muted: #95a5a6;
    --bg: #f5f7fa;
    --bg-alt: #eef2f5;
    --card: #ffffff;
    --border: #e0e6ed;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

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

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Merriweather', serif;
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
}
.logo span { color: var(--green); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92em;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }

.nav-btn, .nav-btn-outline {
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
}
.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(26,95,122,0.3);
}

.nav-btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}
.nav-btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
}
.mobile-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 0;
}
.mobile-menu.active { display: flex; }

/* ===== HERO ===== */
.hero {
    padding: 120px 24px 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0d3d4d 100%);
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
}

.hero-badge {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--gold);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px 24px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 28px;
}

.hero h1 {
    font-family: 'Merriweather', serif;
    font-size: 3em;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}
.hero h1 .highlight { color: var(--gold); }

.hero-sub {
    font-size: 1.15em;
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary, .btn-outline {
    padding: 16px 36px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1em;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #c49a38);
    color: #1a1a1a;
    box-shadow: 0 4px 16px rgba(212,168,83,0.4);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(212,168,83,0.5);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

.btn-lg {
    padding: 18px 42px;
    font-size: 1.1em;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 900px;
    margin: 60px auto 0;
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.stat {
    padding: 28px 20px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.stat:last-child { border-right: none; }

.stat-icon { font-size: 2em; margin-bottom: 8px; }

.stat-num {
    font-family: 'Merriweather', serif;
    font-size: 2em;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.85em;
    opacity: 0.8;
    margin-top: 6px;
}

/* ===== SECTIONS ===== */
.section {
    padding: 80px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.section-alt {
    background: var(--bg-alt);
    max-width: 100%;
    padding: 80px 24px;
}
.section-alt > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-badge {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 12px;
}

.section-header h2 {
    font-family: 'Merriweather', serif;
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

.section-header p {
    font-size: 1.1em;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== FEATURES ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95em;
    margin-bottom: 16px;
}

.feature-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9em;
}
.feature-link:hover { text-decoration: underline; }

/* ===== CATEGORY PREVIEW ===== */
.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.category-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.cat-icon { font-size: 2em; }
.cat-name { font-weight: 700; color: var(--primary-dark); }
.cat-count { font-size: 0.85em; color: var(--text-muted); }

/* ===== STEPS ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.step-card {
    text-align: center;
    padding: 24px;
}

.step-num {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Merriweather', serif;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step-card h4 {
    font-family: 'Merriweather', serif;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.9em;
    color: var(--text-light);
}

/* ===== ABOUT ===== */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 16px;
    color: var(--text-light);
}

.disclaimer {
    background: rgba(198,40,40,0.08);
    border-left: 4px solid var(--red);
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 0.9em;
    margin-top: 24px;
}

.book-card {
    background: linear-gradient(145deg, #2c3e50, #1a252f);
    border-radius: 16px;
    padding: 40px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(135deg, var(--gold), #c49a38);
}

.book-content {
    padding-left: 20px;
}

.book-content h4 {
    font-family: 'Merriweather', serif;
    font-size: 1.3em;
    margin-bottom: 8px;
}

.book-content p {
    opacity: 0.8;
    margin-bottom: 20px;
}

.book-content ul {
    list-style: none;
}

.book-content li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.95em;
}
.book-content li:last-child { border-bottom: none; }

/* ===== CTA ===== */
.cta-section {
    padding: 80px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    text-align: center;
    color: #fff;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-section h2 {
    font-family: 'Merriweather', serif;
    font-size: 2.5em;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 32px;
}

.cta-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer {
    background: #1a252f;
    color: #fff;
    padding: 60px 24px 30px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    font-size: 1.3em;
    margin-bottom: 12px;
    display: inline-block;
    color: #fff;
}
.footer-brand .logo span { color: var(--accent); }

.footer-brand p {
    font-size: 0.9em;
    opacity: 0.8;
    max-width: 280px;
    margin-bottom: 8px;
}

.footer-small {
    font-size: 0.8em;
    opacity: 0.6;
}

.footer-col h5 {
    font-family: 'Merriweather', serif;
    font-size: 1em;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 0.9em;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    opacity: 0.7;
    flex-wrap: wrap;
    gap: 16px;
}

/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0d3d4d 100%);
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: var(--card);
    border-radius: 20px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    font-size: 1.6em;
    margin-bottom: 16px;
    display: inline-block;
}

.auth-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 1.6em;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.2s;
    background: #fff;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26,95,122,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,95,122,0.3);
}
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.95em;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.85em;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-divider span { padding: 0 16px; }

.social-btn {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}
.social-btn:hover {
    border-color: var(--text-muted);
    background: var(--bg);
}

.error-message, .success-message {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9em;
    margin-bottom: 20px;
    display: none;
}
.error-message {
    background: rgba(198,40,40,0.1);
    color: var(--red);
}
.success-message {
    background: rgba(46,125,50,0.1);
    color: var(--green);
}
.error-message.show, .success-message.show { display: block; }

/* ===== MATERIA MEDICA ===== */
.mm-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0d3d4d 100%);
    color: white;
    padding: 100px 40px 60px;
    text-align: center;
}

.mm-hero h1 {
    font-family: 'Merriweather', serif;
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.mm-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
}

.search-box {
    background: var(--card);
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s;
}
.search-input:focus { border-color: var(--primary); }

.category-nav {
    background: var(--card);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.category-nav h2 {
    font-family: 'Merriweather', serif;
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-align: center;
}

.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.category-link {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    transition: all 0.3s;
}
.category-link:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    transform: translateY(-2px);
}
.category-link .count {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 5px;
}
.category-link:hover .count {
    background: white;
    color: var(--primary);
}

.mm-section {
    background: var(--card);
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.section-head {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-head h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.count-badge {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.remedy-card {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}
.remedy-card:hover { background: #f8fbfd; }
.remedy-card:last-child { border-bottom: none; }

.remedy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.remedy-name {
    font-family: 'Merriweather', serif;
    font-size: 1.15rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.remedy-short {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: normal;
    margin-left: 8px;
}

.remedy-dose {
    background: linear-gradient(135deg, var(--green), #388e3c);
    color: white;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.remedy-condition {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.8;
    text-align: justify;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.2em; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .category-preview { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .about-content { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }

    .hero h1 { font-size: 1.8em; }
    .hero-stats { grid-template-columns: 1fr 1fr; }

    .features-grid { grid-template-columns: 1fr; }
    .category-preview { grid-template-columns: 1fr 1fr; }
    .steps-grid { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; text-align: center; }

    .form-row { grid-template-columns: 1fr; }
    .auth-card { padding: 32px 24px; }

    .mm-container { padding: 20px; }
    .section-head { flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.5em; }
    .hero-stats { grid-template-columns: 1fr; }
    .hero-btns { flex-direction: column; }
    .hero-btns a { width: 100%; text-align: center; }
    .category-preview { grid-template-columns: 1fr; }
    .cta-btns { flex-direction: column; }
    .cta-btns a { width: 100%; text-align: center; }
}
