/* 
 * Si7a DZ - Main Stylesheet (v2.0)
 * Modern Healthcare Discovery & recommendation platform
 */

:root {
    --primary: #20c997;      /* Health Teal */
    --primary-dark: #12b886;
    --secondary: #3498db;   /* Sky Blue */
    --secondary-dark: #2980b9;
    --accent: #f48c06;
    --bg-light: #f8f9fa;
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --radius: 12px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* --- Hero Section & Slider --- */
.hero-section {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    overflow: hidden;
    background: #000; /* Fallback */
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: heroSlideFade 15s infinite;
    filter: brightness(0.6); /* Darkens the image so text POPs */
}

/* Three professional images cycling */
.hero-slide:nth-child(1) {
    background-image: url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?w=1600&auto=format&fit=crop');
    animation-delay: 0s;
}
.hero-slide:nth-child(2) {
    background-image: url('https://images.unsplash.com/photo-1538108197023-5eac878adb36?w=1600&auto=format&fit=crop');
    animation-delay: 5s;
}
.hero-slide:nth-child(3) {
    background-image: url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?w=1600&auto=format&fit=crop');
    animation-delay: 10s;
}

@keyframes heroSlideFade {
    0% { opacity: 0; }
    10% { opacity: 1; }
    33% { opacity: 1; }
    43% { opacity: 0; }
    100% { opacity: 0; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.search-box-container {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

/* --- Search Results & Cards --- */
.facility-card {
    background: var(--white);
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

.facility-card:hover {
    transform: translateY(-5px);
}

.facility-card .card-img {
    height: 180px;
    object-fit: cover;
}

.satisfaction-badge {
    background: rgba(33, 176, 161, 0.1);
    color: var(--secondary-dark);
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
}

/* --- Detail Page --- */
.detail-header {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.sentiment-meter {
    background: #e9ecef;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.sentiment-meter-bar {
    height: 100%;
}

.sentiment-meter-bar.positive { background: var(--secondary); }
.sentiment-meter-bar.neutral { background: var(--accent); }
.sentiment-meter-bar.negative { background: #d63031; }

/* --- Components & Overrides --- */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.border-primary { border-color: var(--primary) !important; }

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--white);
}

.section-title {
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

/* --- ABSA Result Card --- */
.absa-aspect-card {
    background: var(--bg-light);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.2s ease;
}
.absa-aspect-card:hover {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-color: #dee2e6;
}
.absa-confidence-bar-bg {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}
.absa-confidence-bar {
    height: 100%;
    background: var(--primary);
}
.animate-fade-in {
    animation: fadeIn 0.4s ease-in-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mega Menu --- */
.mega-dropdown {
    position: static !important;
}
.mega-menu {
    width: 100%;
    max-width: 900px;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border: none;
    border-radius: var(--radius);
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    padding: 0;
    margin-top: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    display: block;
    transition: all 0.3s ease;
}

@media (min-width: 992px) {
    .mega-dropdown:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        margin-top: 0;
    }
}

.mega-menu-banner {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mega-link {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s ease;
}
.mega-link:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}
.mega-link i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 15px;
    margin-top: 2px;
}
.mega-link h6 {
    margin-bottom: 3px;
    font-weight: 600;
}
.mega-link p {
    margin-bottom: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Dynamic Service Pages --- */
.service-hero {
    background: linear-gradient(135deg, #0b2239 0%, #1a365d 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}
.service-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    animation: rotateBg 30s linear infinite;
}
@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-float {
    animation: floatUpDown 6s ease-in-out infinite;
}
@keyframes floatUpDown {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* Chatbot Animations */
.animate-pulse-ring {
    position: relative;
}
.animate-pulse-ring::after {
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: pulseRing 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
    opacity: 0;
}
@keyframes pulseRing {
    0% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary);
    animation: typing 3s steps(40, end) infinite, blink-caret .75s step-end infinite;
}
@keyframes typing {
    0% { width: 0 }
    50% { width: 100% }
    100% { width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary) }
}
