/* =========================================================
   DOCTO.PK - ILLNESS PAGES MASTER STYLES
   Complete & Fully Responsive - Matches Docto.pk Style
   Final Version - Includes All Components
   ========================================================= */

:root {
    --primary: #08135e;
    --primary-dark: #06104a;
    --primary-light: #e8edf9;
    --secondary: #ff5252;
    --accent: #ffab40;
    --text: #1a202c;
    --text-light: #4a5568;
    --text-muted: #718096;
    --white: #ffffff;
    --bg: #f7fafc;
    --card-bg: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 50px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 64px;
    --nav-height: 65px;
    --success: #4caf50;
    --success-light: #d4edda;
    --warning: #ff9800;
    --warning-light: #fff3cd;
    --danger: #dc3545;
    --danger-light: #f8d7da;
    --whatsapp: #25d366;
    --whatsapp-dark: #128c7e;
    --gold: #ffd700;
    --rating-gold: #f59e0b;
    --rating-gray: #d1d5db;
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding-top: var(--header-height);
    padding-bottom: var(--nav-height);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.gap-3 { gap: 30px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.section-padding { padding: 40px 0; }

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.section-title .highlight {
    color: var(--primary);
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary);
    margin-top: 4px;
    border-radius: 4px;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ========== SCREEN READER ONLY ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ========== HEADER ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.header-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 44px;
    width: auto;
    max-width: 140px;
}

.location-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-badge:hover {
    background: #e2e8f0;
}

.location-badge i {
    font-size: 12px;
    flex-shrink: 0;
}

/* ========== BUTTONS ========== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
    text-decoration: none;
    min-height: 48px;
    min-width: 44px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--primary);
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
    text-decoration: none;
    min-height: 48px;
    min-width: 44px;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline:active {
    transform: scale(0.97);
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--whatsapp);
    color: var(--white);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
    text-decoration: none;
    min-height: 48px;
    min-width: 44px;
}

.btn-whatsapp:hover {
    background: var(--whatsapp-dark);
    transform: translateY(-2px);
    color: var(--white);
}

.btn-whatsapp:active {
    transform: scale(0.97);
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    color: var(--primary);
    padding: 14px 36px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    color: var(--primary);
}

.btn-hero:active {
    transform: scale(0.97);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
    min-height: 36px;
    min-width: 36px;
}

/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1a3a8a 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    margin: 16px 0 24px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-content h1 span {
    color: var(--gold);
}

.hero-content p {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    opacity: 0.92;
    margin-bottom: 16px;
    max-width: 520px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    margin-bottom: 14px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-badge span {
    color: var(--gold);
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 20px;
}

.hero-features span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.hero-features i {
    color: var(--success);
    font-size: 0.8rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.05);
}

/* ========== TRUST BAR ========== */
.trust-bar {
    background: var(--white);
    border-bottom: 1px solid #edf2f7;
    padding: 14px 0;
    box-shadow: var(--shadow-sm);
}

.trust-items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.trust-items span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.9rem;
}

.trust-items i {
    color: var(--primary);
    font-size: 1.1rem;
}

/* ========== CONDITION INFO ========== */
.condition-info {
    padding: 40px 0;
    background: var(--white);
}

.condition-content {
    max-width: 820px;
    margin: 0 auto;
}

.condition-content p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.condition-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.condition-highlights div {
    background: var(--primary-light);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    color: var(--primary);
    border: 1px solid #dce3f8;
    transition: var(--transition);
}

.condition-highlights div:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.condition-highlights i {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 4px;
    color: var(--primary);
}

/* ========== WHY CHOOSE ========== */
.why-choose {
    padding: 40px 0;
    background: var(--bg);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.why-card {
    background: var(--white);
    padding: 24px 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #edf2f7;
}

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.why-card i {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.why-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.why-card p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* ========== SYMPTOMS ========== */
.symptoms-section {
    padding: 40px 0;
    background: var(--white);
}

.symptoms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.symptom-item {
    background: var(--white);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #edf2f7;
    transition: var(--transition);
}

.symptom-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.symptom-item i {
    color: var(--primary);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.symptom-item span {
    color: var(--text-light);
    font-size: 14px;
}

/* ========== CHAT WIDGET ========== */
.consult-section {
    padding: 40px 0;
    background: var(--bg);
}

.consult-sub {
    text-align: center;
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.chat-widget {
    max-width: 680px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid #edf2f7;
    background: var(--white);
}

.chat-header {
    background: var(--primary);
    color: var(--white);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header i {
    font-size: 1.3rem;
}

.chat-header .status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.9;
}

.chat-header .status i {
    font-size: 10px;
    color: var(--success);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.chat-messages {
    background: #f8fafd;
    padding: 16px;
    height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.chat-messages .message {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 80%;
    word-wrap: break-word;
    animation: fadeInUp 0.3s ease;
}

.chat-messages .message.bot {
    background: var(--white);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow);
}

.chat-messages .message.user {
    background: var(--primary);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-messages .message .whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--whatsapp);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-top: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    justify-content: center;
}

.chat-messages .message .whatsapp-btn:hover {
    background: var(--whatsapp-dark);
    transform: scale(1.02);
    color: var(--white);
}

.chat-messages .message .payment-info {
    margin-top: 10px;
    padding: 12px;
    background: #f0f4ff;
    border-radius: var(--radius-sm);
}

.chat-messages .message .payment-info .btn-payment {
    background: var(--whatsapp);
    color: var(--white);
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: var(--transition);
}

.chat-messages .message .payment-info .btn-payment:hover {
    background: var(--whatsapp-dark);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-input {
    display: flex;
    padding: 12px 16px;
    background: var(--white);
    border-top: 1px solid #edf2f7;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #dce0e9;
    border-radius: var(--radius-full);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.chat-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 19, 94, 0.15);
}

.chat-input button {
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-input button:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-disclaimer {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ========== FILE UPLOAD ========== */
.file-upload-container {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    border: none;
    width: 100%;
}

.file-upload-label:hover {
    background: var(--primary-dark);
}

.file-upload-label i {
    font-size: 1rem;
}

.file-upload-input {
    display: none;
}

.file-name {
    font-size: 0.85rem;
    margin-top: 6px;
    color: var(--text-light);
}

/* ========== QR CODE PAYMENT ========== */
.payment-amount {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.qr-code-container {
    text-align: center;
    margin: 12px 0;
}

.qr-code-wrapper {
    position: relative;
    display: inline-block;
}

.qr-code {
    max-width: 180px;
    height: auto;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    background: var(--white);
}

.help-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--primary);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid var(--white);
    font-weight: bold;
    transition: var(--transition);
}

.help-icon:hover {
    transform: scale(1.1);
}

.help-tooltip {
    position: absolute;
    top: 30px;
    right: 0;
    background: var(--white);
    padding: 14px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    width: 250px;
    font-size: 0.85rem;
    line-height: 1.6;
    z-index: 10;
    display: none;
    text-align: left;
    color: var(--text);
}

.help-tooltip.show {
    display: block;
}

.help-tooltip ol {
    padding-left: 20px;
    margin-top: 8px;
}

.help-tooltip li {
    margin-bottom: 4px;
}

.help-tooltip strong {
    color: var(--primary);
}

.payment-instructions {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 8px;
}

/* ========== OPTIONS MESSAGE ========== */
.options-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.option-btn {
    padding: 8px 16px;
    background-color: rgba(8, 19, 94, 0.08);
    border-radius: var(--radius-sm);
    border: 1px solid #d1d5db;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.option-btn:hover {
    background-color: rgba(8, 19, 94, 0.15);
    border-color: var(--primary);
}

.option-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ========== TYPING INDICATOR ========== */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    align-self: flex-start;
    margin-bottom: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingAnimation {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* ========== ERROR MESSAGE ========== */
.error-message {
    background: var(--danger-light);
    color: #721c24;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--danger);
    font-size: 0.9rem;
    align-self: center;
    width: 90%;
}

/* ========== SUCCESS BOX ========== */
.success-box {
    background: linear-gradient(135deg, #38a169, #2f855a);
    color: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    margin: 10px 0;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease;
    align-self: center;
    width: 95%;
}

.success-box h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-box h4 i {
    font-size: 1.4rem;
}

.success-box ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.success-box li {
    padding: 6px 0;
    padding-left: 28px;
    position: relative;
    font-size: 0.9rem;
    color: var(--white);
}

.success-box li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #c6f6d5;
    font-weight: bold;
}

.success-box p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
}

.message-time {
    font-size: 11px;
    margin-top: 4px;
    text-align: right;
    opacity: 0.7;
}

.message.bot .message-time {
    color: var(--text-light);
}

.message.user .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* ========== SYSTEM MESSAGE ========== */
.system-message {
    align-self: center;
    background: rgba(8, 19, 94, 0.06);
    color: var(--primary);
    font-size: 0.8rem;
    padding: 6px 16px;
    border-radius: 20px;
    margin: 4px 0;
}

/* ========== FAQ ========== */
.faq-section {
    padding: 40px 0;
    background: var(--white);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 1px solid #edf2f7;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    width: 100%;
    padding: 14px 18px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    font-family: inherit;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary);
    flex-shrink: 0;
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 18px;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 18px 16px;
}

/* ========== CTA BANNER ========== */
.cta-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #1a3a8a 100%);
    color: var(--white);
    border-radius: var(--radius);
    padding: 28px 24px;
    margin: 24px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner .cta-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    opacity: 0.08;
    z-index: 0;
}

.cta-banner h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.cta-banner p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.cta-banner .btn-whatsapp {
    background: var(--white);
    color: var(--primary);
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.cta-banner .btn-whatsapp:hover {
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
}

/* ========== FOOTER ========== */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 30px 0 16px;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-about img {
    height: 40px;
    width: auto;
    margin-bottom: 10px;
    background: var(--white);
    padding: 4px 12px;
    border-radius: 6px;
}

.footer-about p {
    opacity: 0.8;
    font-size: 14px;
    line-height: 1.6;
    max-width: 400px;
}

.footer-links h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 16px;
    font-size: 13px;
    opacity: 0.7;
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    gap: 2px;
    padding: 6px 0;
    flex: 1;
    transition: var(--transition);
    border: none;
    background: none;
    cursor: pointer;
}

.nav-item i {
    font-size: 20px;
    transition: var(--transition);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    transform: translateY(-4px);
}

.nav-item:hover:not(.active) {
    color: var(--primary);
}

.nav-brand {
    flex: 0 0 auto;
    background-color: var(--primary);
    color: var(--white);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(8, 19, 94, 0.3);
    text-decoration: none;
    transition: var(--transition);
}

.nav-brand:hover {
    transform: scale(1.05);
}

.nav-brand i {
    font-size: 22px;
    color: var(--white);
}

.nav-brand span {
    font-size: 8px;
    font-weight: 700;
    margin-top: 2px;
    color: var(--white);
}

/* ========== FLOATING CHAT ========== */
.floating-chat {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    right: 16px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(8, 19, 94, 0.4);
    z-index: 99;
    transition: var(--transition);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.floating-chat:hover {
    transform: scale(1.1) translateY(-3px);
    color: var(--white);
    box-shadow: 0 6px 30px rgba(8, 19, 94, 0.5);
}

.floating-chat:active {
    transform: scale(0.95);
}

/* ========== ONLINE STATUS DOT ========== */
.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    animation: blink 1.5s infinite;
    margin-left: 4px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ========== CARD ANIMATIONS ========== */
.card {
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.10s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.20s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.30s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.40s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ===== TABLETS & SMALL LAPTOPS (max-width: 992px) ===== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-features {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        max-width: 220px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-about p {
        max-width: 100%;
    }
}

/* ===== MOBILE LANDSCAPE & SMALL TABLETS (max-width: 768px) ===== */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --nav-height: 60px;
    }

    .hero {
        padding: 24px 18px;
        margin: 12px 0 16px;
        border-radius: var(--radius);
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .hero-badge {
        font-size: 0.85rem;
        padding: 4px 16px;
    }

    .btn-hero {
        padding: 10px 24px;
        font-size: 14px;
    }

    .trust-items {
        gap: 14px;
    }

    .trust-items span {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 18px;
    }

    .section-subtitle {
        font-size: 14px;
    }

    .condition-info {
        padding: 28px 0;
    }

    .condition-content p {
        font-size: 15px;
    }

    .why-choose {
        padding: 28px 0;
    }

    .why-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .why-card {
        padding: 18px 14px;
    }

    .why-card i {
        font-size: 1.8rem;
    }

    .why-card h3 {
        font-size: 14px;
    }

    .why-card p {
        font-size: 13px;
    }

    .symptoms-section {
        padding: 28px 0;
    }

    .symptoms-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .symptom-item {
        padding: 10px 12px;
        font-size: 13px;
    }

    .consult-section {
        padding: 28px 0;
    }

    .consult-sub {
        font-size: 14px;
    }

    .chat-messages {
        height: 300px;
        padding: 12px;
    }

    .chat-messages .message {
        max-width: 90%;
    }

    .chat-input {
        padding: 10px 12px;
    }

    .chat-input input {
        font-size: 14px;
        padding: 8px 12px;
    }

    .chat-input button {
        width: 44px;
        height: 44px;
    }

    .faq-section {
        padding: 28px 0;
    }

    .faq-question {
        font-size: 14px;
        padding: 12px 14px;
    }

    .faq-answer {
        font-size: 13px;
    }

    .cta-banner {
        padding: 20px 16px;
        margin: 16px 0;
    }

    .cta-banner h3 {
        font-size: 16px;
    }

    .cta-banner p {
        font-size: 13px;
    }

    .cta-banner .cta-icon {
        font-size: 40px;
    }

    .grid-3 { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }

    .floating-chat {
        width: 48px;
        height: 48px;
        font-size: 22px;
        bottom: calc(60px + 12px);
        right: 12px;
    }

    .nav-brand {
        width: 48px;
        height: 48px;
        margin-bottom: 16px;
    }

    .nav-brand i {
        font-size: 18px;
    }

    .qr-code {
        max-width: 150px;
    }

    .help-tooltip {
        width: 220px;
        font-size: 0.8rem;
    }

    .file-upload-label {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
}

/* ===== MOBILE PORTRAIT (max-width: 480px) ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .hero {
        padding: 18px 14px;
        border-radius: var(--radius-sm);
    }

    .hero-content h1 {
        font-size: 1.3rem;
    }

    .hero-content p {
        font-size: 0.85rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .hero-features {
        gap: 8px 12px;
    }

    .hero-features span {
        font-size: 0.75rem;
    }

    .btn-hero {
        padding: 8px 18px;
        font-size: 13px;
    }

    .hero-image img {
        max-width: 160px;
    }

    .trust-items {
        gap: 10px;
    }

    .trust-items span {
        font-size: 0.7rem;
        gap: 4px;
    }

    .trust-items i {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 16px;
    }

    .section-subtitle {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .condition-highlights {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .condition-highlights div {
        padding: 10px 12px;
        font-size: 13px;
    }

    .condition-highlights i {
        font-size: 1.3rem;
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .why-card {
        padding: 16px 12px;
    }

    .symptoms-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .symptom-item {
        padding: 10px 12px;
        font-size: 13px;
    }

    .chat-messages {
        height: 260px;
        padding: 10px;
    }

    .chat-messages .message {
        font-size: 14px;
        padding: 8px 12px;
    }

    .chat-input input {
        font-size: 13px;
        padding: 8px 12px;
    }

    .chat-input button {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .chat-disclaimer {
        font-size: 11px;
    }

    .faq-question {
        font-size: 13px;
        padding: 10px 12px;
    }

    .faq-answer {
        font-size: 12px;
        padding: 0 12px;
    }

    .faq-item.open .faq-answer {
        padding: 0 12px 12px;
    }

    .cta-banner {
        padding: 16px 12px;
        border-radius: var(--radius-sm);
    }

    .cta-banner h3 {
        font-size: 14px;
    }

    .cta-banner p {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .cta-banner .btn-whatsapp {
        padding: 10px 20px;
        font-size: 13px;
    }

    .btn-primary,
    .btn-outline,
    .btn-whatsapp {
        padding: 10px 20px;
        font-size: 13px;
        min-height: 42px;
    }

    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }

    footer {
        padding: 20px 0 12px;
    }

    .footer-grid {
        gap: 16px;
        padding-bottom: 14px;
    }

    .footer-about img {
        height: 34px;
    }

    .footer-about p {
        font-size: 13px;
    }

    .footer-links h4 {
        font-size: 14px;
    }

    .footer-links a {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .footer-bottom {
        font-size: 11px;
    }

    .floating-chat {
        width: 44px;
        height: 44px;
        font-size: 20px;
        bottom: calc(60px + 10px);
        right: 10px;
    }

    .bottom-nav {
        height: 56px;
    }

    .nav-item {
        font-size: 9px;
        padding: 4px 0;
    }

    .nav-item i {
        font-size: 18px;
    }

    .nav-brand {
        width: 44px;
        height: 44px;
        margin-bottom: 14px;
    }

    .nav-brand i {
        font-size: 16px;
    }

    .nav-brand span {
        font-size: 7px;
    }

    .qr-code {
        max-width: 130px;
    }

    .help-tooltip {
        width: 200px;
        right: -10px;
        font-size: 0.75rem;
        padding: 10px;
    }

    .file-upload-label {
        font-size: 0.85rem;
        padding: 8px 16px;
    }

    .success-box {
        padding: 14px;
    }

    .success-box h4 {
        font-size: 1rem;
    }

    .success-box li {
        font-size: 0.8rem;
        padding: 4px 0;
        padding-left: 24px;
    }
}

/* ===== EXTRA SMALL DEVICES (max-width: 360px) ===== */
@media (max-width: 360px) {
    .hero-content h1 {
        font-size: 1.1rem;
    }

    .hero-features span {
        font-size: 0.65rem;
    }

    .btn-hero {
        padding: 6px 14px;
        font-size: 12px;
    }

    .trust-items span {
        font-size: 0.6rem;
    }

    .section-title {
        font-size: 14px;
    }

    .condition-highlights {
        grid-template-columns: 1fr;
    }

    .grid-4 { grid-template-columns: 1fr; }

    .chat-messages {
        height: 220px;
    }

    .qr-code {
        max-width: 110px;
    }

    .help-tooltip {
        width: 170px;
        right: -5px;
        font-size: 0.7rem;
        padding: 10px;
    }

    .btn-primary,
    .btn-outline,
    .btn-whatsapp {
        padding: 8px 16px;
        font-size: 12px;
        min-height: 38px;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    header,
    .bottom-nav,
    .floating-chat,
    .consult-section,
    .cta-banner {
        display: none !important;
    }

    body {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        background: white !important;
    }

    .hero {
        background: var(--primary) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        padding: 20px !important;
    }

    .section-padding {
        padding: 20px 0 !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

::selection {
    background: var(--primary);
    color: var(--white);
}

/* ============================================================
   DARK MODE SUPPORT (Optional)
   ============================================================ */
@media (prefers-color-scheme: dark) {
    /* Uncomment if dark mode is desired */
    /*
    :root {
        --bg: #1a202c;
        --white: #2d3748;
        --text: #f7fafc;
        --text-light: #e2e8f0;
        --text-muted: #a0aec0;
        --card-bg: #2d3748;
        --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    
    .chat-messages {
        background: #1a202c;
    }
    
    .chat-messages .message.bot {
        background: #2d3748;
        color: #f7fafc;
    }
    
    .condition-highlights div {
        background: #2d3748;
        border-color: #4a5568;
        color: #f7fafc;
    }
    
    .why-card {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .symptom-item {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .symptom-item span {
        color: #e2e8f0;
    }
    
    .faq-item {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .faq-question {
        color: #f7fafc;
    }
    
    .faq-answer {
        color: #e2e8f0;
    }
    
    .trust-bar {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .trust-items span {
        color: #e2e8f0;
    }
    
    .location-badge {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .chat-input {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .chat-input input {
        background: #1a202c;
        color: #f7fafc;
        border-color: #4a5568;
    }
    */
}