/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon svg {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2563eb;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #2563eb;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #2563eb;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Calculator Section */
.calculator-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.calculator-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.calculator-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.calculator-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.calculate-btn {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.calculate-btn:hover {
    background: #1d4ed8;
}

/* Results */
.results-container {
    padding: 2rem;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.result-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
}

/* Category Colors */
.low { background: #dbeafe; color: #1e40af; }
.normal { background: #dcfce7; color: #166534; }
.elevated { background: #fef3c7; color: #92400e; }
.high1 { background: #fed7aa; color: #c2410c; }
.high2 { background: #fecaca; color: #dc2626; }
.crisis { background: #fca5a5; color: #991b1b; }

/* Gauge */
.gauge-container {
    position: relative;
    width: 300px;
    height: 150px;
    margin: 0 auto 1rem;
}

.gauge {
    width: 100%;
    height: 100%;
    border-radius: 150px 150px 0 0;
    background: conic-gradient(
        from 180deg,
        #3b82f6 0deg 30deg,
        #10b981 30deg 60deg,
        #f59e0b 60deg 90deg,
        #f97316 90deg 120deg,
        #ef4444 120deg 150deg,
        #dc2626 150deg 180deg
    );
    position: relative;
}

.gauge::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: white;
    border-radius: 50% 50% 0 0;
}

.gauge-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 120px;
    background: #1f2937;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(0deg);
    transition: transform 0.5s ease;
    z-index: 10;
}

.gauge-needle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #1f2937;
    border-radius: 50%;
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.gauge-label {
    text-align: center;
    flex: 1;
}

.result-explanation {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #2563eb;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: #2563eb;
    color: white;
}

.action-btn.primary:hover {
    background: #1d4ed8;
}

.action-btn.secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.action-btn.secondary:hover {
    background: #e5e7eb;
}

/* Chart Section */
.chart-section {
    padding: 4rem 0;
    background: white;
}

.chart-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.chart-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.bp-chart {
    width: 100%;
    border-collapse: collapse;
}

.bp-chart th,
.bp-chart td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.bp-chart th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

.bp-chart tr:hover {
    background: #f8fafc;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 600;
}

.chart-actions {
    padding: 1.5rem;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.chart-notes {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.chart-notes h3 {
    margin-bottom: 1rem;
    color: #1e40af;
}

.chart-notes ul {
    list-style-position: inside;
    color: #374151;
}

.chart-notes li {
    margin-bottom: 0.5rem;
}

/* Education Section */
.education-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.education-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.education-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.education-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #2563eb;
}

.education-card ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.education-card li {
    margin-bottom: 0.5rem;
}

.education-card a {
    color: #2563eb;
    text-decoration: none;
}

.education-card a:hover {
    text-decoration: underline;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: white;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e5e7eb;
}

.faq-question {
    width: 100%;
    padding: 1.5rem 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: #2563eb;
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 0 1.5rem 0;
    color: #6b7280;
    line-height: 1.6;
}

/* About Section */
.about-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    color: #2563eb;
}

.disclaimer {
    background: #fef3c7;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    margin-top: 2rem;
}

.disclaimer h4 {
    color: #92400e;
    margin-bottom: 0.5rem;
}

.sources {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.sources h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #2563eb;
}

.sources ul {
    list-style: none;
    padding: 0;
}

.sources li {
    margin-bottom: 0.5rem;
}

.sources a {
    color: #2563eb;
    text-decoration: none;
}

.sources a:hover {
    text-decoration: underline;
}

.last-reviewed {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #f3f4f6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    color: white;
    padding: 1rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-notice.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cookie-btn.primary {
    background: #2563eb;
    color: white;
}

.cookie-btn.primary:hover {
    background: #1d4ed8;
}

.cookie-btn.secondary {
    background: #374151;
    color: white;
}

.cookie-btn.secondary:hover {
    background: #4b5563;
}

.cookie-link {
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.875rem;
}

.cookie-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        padding: 1rem 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        gap: 1rem;
    }
    
    .nav.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .chart-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .gauge-container {
        width: 250px;
        height: 125px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .calculator-form,
    .results-container {
        padding: 1.5rem;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .bp-chart {
        font-size: 0.875rem;
    }
    
    .bp-chart th,
    .bp-chart td {
        padding: 0.75rem 0.5rem;
    }
}