/* Mediguard Connect Main Styles */

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    /* Fallback */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(227, 242, 253, 0.9) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 82, 204, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    /* Bolder logo */
    font-size: 1.5rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--emergency);
    filter: drop-shadow(0 2px 4px rgba(255, 59, 48, 0.3));
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-lead);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    opacity: 1;
}

/* Active Indicator */
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 2px 5px rgba(0, 82, 204, 0.4);
}


.nav-btn {
    background-color: var(--primary);
    color: white !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: var(--radius-full);
    transition: transform 0.2s ease !important;
}

.nav-btn:hover {
    transform: translateY(-2px);
    background-color: var(--primary-dark);
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    transition: color 0.3s ease;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        /* Show hamburger on mobile */
    }

    .nav-links {
        display: none;
        /* Hide links by default */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        align-items: center;
    }

    .nav-links.active {
        display: flex;
        /* Show when toggled */
        animation: slideDown 0.3s forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Hero Section - The Emergency Hub */
.hero {
    position: relative;
    padding: 8rem 0 4rem;
    background: transparent;
    /* Rely on body gradient */
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

/* Background Abstract Shapes */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    mix-blend-mode: overlay;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--dark);
    line-height: 1.1;
}

.hero-text .highlight {
    color: var(--primary);
}

.hero-text .tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* Emergency Button */
.emergency-wrapper {
    position: relative;
    display: inline-block;
}

.btn-emergency {
    background: var(--emergency-gradient);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px var(--emergency-glow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-emergency:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--emergency-glow);
}

/* Pulse Animation */
.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    border: 2px solid var(--emergency);
    opacity: 0;
    animation: pulse 2s infinite;
}

.pulse-ring:nth-child(1) {
    animation-delay: 0s;
}

.pulse-ring:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes pulse {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.8;
    }

    100% {
        width: 110%;
        height: 150%;
        opacity: 0;
    }
}

/* Hero Visual - Monitoring Panel Mockup */
.hero-visual {
    position: relative;
}

.monitor-card {
    background: rgba(227, 242, 253, 0.6);
    /* Bluer Glass */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 52, 102, 0.15);
    max-width: 450px;
    margin: 0 auto;
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.status-badge {
    background: rgba(54, 179, 126, 0.1);
    color: var(--success);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.vitals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.vital-item {
    background: rgba(255, 255, 255, 0.6);
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.2s;
}

.vital-item:hover {
    background: white;
    transform: scale(1.02);
}

.vital-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.vital-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.heart-rate {
    color: var(--emergency);
}

.pressure {
    color: var(--primary);
}

/* Services Section - The Merger */
.services {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.zone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(227, 242, 253, 0.5);
    /* Bluer Glass */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 82, 204, 0.1);
    padding: 2rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 15px 30px rgba(0, 82, 204, 0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

/* Zone Specifics */
.zone-critical {
    border-color: var(--emergency);
}

.zone-critical .card-icon {
    background: rgba(255, 59, 48, 0.1);
    color: var(--emergency);
}

.zone-outpatient {
    border-color: var(--primary);
}

.zone-outpatient .card-icon {
    background: rgba(0, 82, 204, 0.1);
    color: var(--primary);
}

.zone-admin {
    border-color: var(--success);
}

.zone-admin .card-icon {
    background: rgba(54, 179, 126, 0.1);
    color: var(--success);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text .tagline {
        margin: 0 auto 2.5rem;
    }

    .nav-links {
        display: none;
        /* simple mobile hide for now */
    }
}

/* Feature: Prolanis Digital Dashboard */
.prolanis-section {
    background: transparent;
    padding: 6rem 0;
    overflow: hidden;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.dashboard-sidebar .card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.reminder-list {
    margin-top: 1rem;
}

.reminder-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.reminder-item.missed {
    border-left-color: var(--emergency);
}

.reminder-item.taken {
    border-left-color: var(--success);
}

.reminder-time {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 50px;
}

.graph-card {
    background: rgba(255, 255, 255, 0.5);
    /* Semi-transparent */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 82, 204, 0.1);
    min-height: 400px;
    /* Ensure height for graph */
    display: flex;
    flex-direction: column;
    /* Restored for stack layout */
}

/* CSS-only Bar Graph Mockup */
.chart-container {
    height: 300px;
    /* Explicit height needed for percentage childs */
    width: 100%;
    margin-top: 2rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    position: relative;
    border-bottom: 2px solid rgba(0, 82, 204, 0.2);
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 40px;
    height: 100%;
    /* Occupy full container height */
    justify-content: flex-end;
    z-index: 2;
}

.bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 8px 8px 0 0;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 12px;
    box-shadow: 0 -4px 10px rgba(26, 115, 232, 0.3);
    cursor: pointer;
    /* Continuous Breathing Animation */
    animation: breathe 3s ease-in-out infinite alternate;
}

@keyframes breathe {
    0% {
        transform: scaleY(1);
    }

    100% {
        transform: scaleY(1.05);
    }
}

.bar:hover {
    filter: brightness(1.2);
    transform: scaleY(1.1);
    /* Hover boost */
}

/* Hotline & Emergency Tweaks */
.emergency-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.emergency-hotline {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
}

.emergency-hotline i {
    color: var(--emergency);
}

/* Glassmorphism & Gradient Polish */
.hero {
    background: radial-gradient(circle at 10% 20%, rgba(212, 233, 255, 0.4) 0%, rgba(255, 255, 255, 0) 50%),
        radial-gradient(circle at 90% 80%, rgba(227, 242, 253, 0.4) 0%, rgba(255, 255, 255, 0) 50%),
        var(--light-gray);
}


.bar:hover::after {
    content: attr(data-value);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.bar.alert {
    background: var(--emergency);
}

.day-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Education Section (Zackly) */
.education-section {
    padding: 6rem 0;
    background: rgba(255, 255, 255, 0.3);
    /* Slight overlay */
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.article-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.article-thumb {
    height: 180px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 3rem;
}

.article-content {
    padding: 1.5rem;
}

.category-tag {
    background: #e3f2fd;
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* --- Article Interactive Visuals --- */

/* 1. Heart Attack: Pulsing Heart */
.visual-heart-container {
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    position: relative;
}

.visual-heart {
    font-size: 5rem;
    color: var(--emergency);
    animation: irregular-beat 2s infinite;
    filter: drop-shadow(0 0 10px rgba(255, 59, 48, 0.5));
    cursor: help;
}

.visual-heart:hover {
    animation: rapid-beat 0.5s infinite;
    /* Simulates panic/attack on hover */
}

.pain-point {
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--warning);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--warning);
    animation: pain-flash 1s infinite alternate;
}

@keyframes irregular-beat {

    0%,
    100% {
        transform: scale(1);
    }

    10% {
        transform: scale(1.1);
    }

    20% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.2);
    }

    /* Irregular rhythm */
    50% {
        transform: scale(1);
    }
}

@keyframes rapid-beat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

@keyframes pain-flash {
    from {
        opacity: 0.2;
        transform: scale(1);
    }

    to {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* 2. Diabetes: Interactive Plate */
.visual-plate-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.plate {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 8px solid white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    background: white;
}

.plate-section {
    position: absolute;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.plate-section:hover {
    opacity: 0.9;
    transform: scale(1.05);
    /* Highlight section */
    z-index: 10;
}

/* 50% Veggies (Half Circle) */
.plat-veg {
    width: 50%;
    height: 100%;
    left: 0;
    background: var(--success);
    /* Green */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    /* Simple half fill for demo */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 25% Carbs */
.plat-carb {
    width: 50%;
    height: 50%;
    top: 0;
    right: 0;
    background: var(--warning);
    /* Yellow/Orange */
}

/* 25% Protein */
.plat-prot {
    width: 50%;
    height: 50%;
    bottom: 0;
    right: 0;
    background: var(--emergency);
    /* Red/Meat color */
}

/* 3. Stroke: Exercise Anim */
.visual-exercise-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

.exercise-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
    box-shadow: var(--shadow-md);
    position: relative;
}

.anim-stretch i {
    animation: stretch-side 2s infinite ease-in-out;
}

.anim-walk i {
    animation: walk-bounce 1s infinite;
}

@keyframes stretch-side {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-15deg);
    }

    75% {
        transform: rotate(15deg);
    }
}

@keyframes walk-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Article Detail Styles */
.article-detail-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.85);
    /* Slightly more opaque for reading */
    backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-lg);
    margin-top: -6rem;
    /* Overlap hero */
    position: relative;
    z-index: 10;
}

.article-hero {
    padding: 10rem 0 8rem;
    text-align: center;
    background: radial-gradient(circle at 50% 50%, rgba(212, 233, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-lead);
}

.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    border-radius: var(--radius-md);
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

/* Pricing Section (Abriysam) */
.pricing-section {
    padding: 6rem 0;
    background: transparent;
}

.pricing-table {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.pricing-card {
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 350px;
    text-align: center;
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 82, 204, 0.2);
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.9);
}

.pricing-card.featured::before {
    content: 'POPULER';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin: 1.5rem 0;
}

.price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.feature-list {
    text-align: left;
    margin-bottom: 2rem;
}

.feature-list li {
    margin-bottom: 0.75rem;
    color: var(--text-lead);
}

.feature-list i {
    color: var(--success);
    margin-right: 0.75rem;
}

/* Pricing Buttons */
.btn-pricing-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    width: 100%;
    padding: 0.8rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-pricing-outline:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 82, 204, 0.2);
    transform: translateY(-2px);
}

.btn-pricing-primary {
    background: var(--primary);
    color: white;
    width: 100%;
    padding: 0.8rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 82, 204, 0.2);
}

.btn-pricing-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 82, 204, 0.3);
}

/* Pricing Card Hover Effect */
.pricing-card {
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 350px;
    text-align: center;
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 40px rgba(0, 82, 204, 0.15);
    border-color: var(--primary-light);
}

/* Contact CTA */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    border-radius: var(--radius-lg);
    margin: 0 2rem 4rem;
    /* Floating card style */
    box-shadow: 0 20px 40px rgba(0, 82, 204, 0.3);
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
}


/* Registration Form */
.registration-section {
    padding: 6rem 0;
    background: transparent;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.85);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid white;
    backdrop-filter: blur(15px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(38, 132, 255, 0.2);
}

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

/* Responsive */
@media (max-width: 1024px) {

    /* Force stack earlier (Tablets/Small Laptops) */
    .dashboard-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
}

@media (max-width: 991px) {
    .container {
        padding: 0 1.5rem;
    }

    /* 
   

*/
    .hero-text h1 {
        font-size: 2.8rem;
    }

    .nav-links {
        display: none;
    }

    /* Hide nav */
}

@media (max-width: 768px) {
    .hero {
        padding-top: 6rem;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .graph-card {
        padding: 1.5rem;
    }

    /* Better Header Alignment on Mobile */
    .graph-card h4 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    /* Fix Graph Responsiveness */
    .chart-container {
        height: 220px;
        overflow-x: auto;
        /* Allow scrolling */
        padding-top: 1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }

    .btn-emergency {
        width: 100%;
        justify-content: center;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    /* Ensure graph fits small screens */
    .bar-group {
        width: 25px;
        margin: 0 5px;
    }

    .day-label {
        font-size: 0.7rem;
    }

    /* Float Button Visible on Mobile */
    .floating-panic-btn {
        display: flex !important;
    }

    .article-detail-container {
        padding: 0;
        padding-bottom: 2rem;
    }

    .article-content {
        padding: .5rem
    }
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.heartbeat-loader {
    font-size: 4rem;
    color: var(--emergency);
    animation: loader-pulse 1.2s infinite;
    margin-bottom: 1rem;
}

@keyframes loader-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    5% {
        transform: scale(1.1);
        opacity: 1;
    }

    39% {
        transform: scale(0.85);
        opacity: 0.7;
    }

    45% {
        transform: scale(1);
        opacity: 1;
    }

    60% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.7;
    }
}

#preloader p {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Floating Panic Button */
.floating-panic-btn {
    display: none;
    /* Hidden by default on desktop */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    background: var(--emergency-gradient);
    box-shadow: 0 5px 20px rgba(255, 59, 48, 0.5);
    border: 2px solid white;
}

/* Custom Emergency Modal */
.emergency-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.emergency-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.emergency-modal {
    background: var(--white);
    width: 90%;
    max-width: 450px;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 59, 48, 0.1);
}

.emergency-modal-overlay.active .emergency-modal {
    transform: scale(1);
}

/* Modal Content */
.modal-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 59, 48, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.modal-icon i {
    font-size: 2.5rem;
    color: var(--emergency);
}

.pulse-icon {
    animation: simple-pulse 1.5s infinite;
}

@keyframes simple-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.modal-body {
    background: var(--light-gray);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.modal-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* subtle divider */
    padding-bottom: 0.5rem;
}

.modal-info-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    font-weight: 700;
    color: var(--dark);
    text-align: right;
}

.text-danger {
    color: var(--emergency) !important;
}

.text-success {
    color: var(--success) !important;
}

.modal-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
    line-height: 1.4;
    font-style: italic;
}

.btn-close-modal {
    background: var(--dark);
    color: white;
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.btn-close-modal:hover {
    background: black;
}