/* SafeWatch Community - Stylesheet */
:root {
    --primary: #1a3a5c;
    --primary-light: #2c5282;
    --accent: #2b7a78;
    --accent-light: #3aafa9;
    --background: #f7f9fc;
    --surface: #ffffff;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
    --danger: #c53030;
    --warning: #d69e2e;
    --success: #2f855a;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    background: var(--primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    border-bottom-color: var(--accent-light);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-light);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Features */
.features {
    padding: 4rem 0;
}

.features h2,
.recent-alerts h2,
.emergency-info h2,
.page-section h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Recent Alerts */
.recent-alerts {
    padding: 4rem 0;
    background: var(--surface);
}

.alerts-list {
    max-width: 700px;
    margin: 0 auto;
}

.alert-item {
    padding: 1.25rem;
    border-left: 4px solid var(--accent);
    margin-bottom: 1rem;
    background: var(--background);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.alert-date {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.alert-type {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    text-transform: uppercase;
}

.type-property {
    background: #fef3cd;
    color: #856404;
}

.type-vehicle {
    background: #d1ecf1;
    color: #0c5460;
}

.type-general {
    background: #d4edda;
    color: #155724;
}

.alert-item p {
    margin-top: 0.5rem;
    color: var(--text);
}

/* Emergency Contacts */
.emergency-info {
    padding: 4rem 0;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.contact-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.contact-card .phone {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.contact-card p:last-child {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
}

footer p + p {
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* Page Sections (used on sub-pages) */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
}

.page-section {
    padding: 3rem 0;
}

/* Form Styles */
.form-container {
    max-width: 650px;
    margin: 0 auto;
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(43, 122, 120, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.form-note {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #2a4365;
}

/* Resource Cards */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.resource-card h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.resource-card ul {
    list-style: none;
    padding: 0;
}

.resource-card ul li {
    padding: 0.4rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text);
}

.resource-card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* How It Works */
.how-it-works {
    padding: 4rem 0;
    background: var(--surface);
}

.how-it-works h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.step-card {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.step-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.step-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Community Stats */
.community-stats {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
}

.community-stats h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2.5rem;
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-light);
    margin-bottom: 0.25rem;
}

.stat-item .stat-label {
    display: block;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 200px;
    margin: 0 auto;
}

/* Myth Busting */
.section-intro {
    text-align: center;
    color: var(--text-light);
    max-width: 600px;
    margin: -1rem auto 2rem;
    font-size: 1.05rem;
}

.myths-list {
    max-width: 750px;
    margin: 0 auto;
}

.myth-item {
    background: var(--background);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.myth-label {
    font-weight: 700;
    color: var(--danger);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.myth-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.fact-label {
    font-weight: 700;
    color: var(--success);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.fact-text {
    color: var(--text);
    line-height: 1.7;
}

/* Immigration Facts */
.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.fact-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.fact-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.fact-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.fact-card ul {
    list-style: none;
    padding: 0;
}

.fact-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text);
    line-height: 1.5;
    border-bottom: 1px solid var(--border);
}

.fact-card ul li:last-child {
    border-bottom: none;
}

.fact-card ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.fact-card a {
    color: var(--accent);
    text-decoration: underline;
}

.fact-card a:hover {
    color: var(--accent-light);
}

/* Testimonials */
.testimonials {
    padding: 4rem 0;
}

.testimonials h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

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

.testimonial-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent);
}

.testimonial-card blockquote {
    font-style: italic;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.testimonial-card cite {
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 600;
}

/* Ad Containers */
.ad-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    text-align: center;
}

.step-ad {
    margin: 1.5rem 0;
    padding: 0;
}

/* Multi-step Form */
.multistep-form {
    max-width: 700px;
}

.step-progress {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.step-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 3px;
    width: 0%;
    transition: width 0.4s ease;
}

.step-indicator {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-step h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.step-subtitle {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.step-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-between;
}

.step-actions .btn {
    flex: 0 0 auto;
}

/* Education Cards */
.education-card {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.education-card h2,
.education-card h3 {
    color: #92400e;
    margin-bottom: 0.75rem;
}

.education-card h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

.education-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.education-card ul {
    margin: 0.75rem 0 0.75rem 1.5rem;
}

.education-card ul li {
    padding: 0.3rem 0;
    line-height: 1.6;
}

.education-card a {
    color: var(--accent);
    text-decoration: underline;
}

.education-inline {
    margin-top: 1.5rem;
    background: #f0fdf4;
    border-color: #86efac;
}

.education-inline h3 {
    color: var(--success);
}

.stat-block {
    text-align: center;
    padding: 1.5rem;
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: var(--text);
    max-width: 400px;
    margin: 0 auto;
}

.explanation-list {
    list-style: none;
    padding: 0;
}

.explanation-list li {
    padding: 0.6rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.explanation-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.final-card {
    background: #eff6ff;
    border-color: #93c5fd;
}

.final-card h2 {
    color: var(--primary);
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Form Messages */
.form-message {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}

.form-message ul {
    margin: 0.5rem 0 0 1.25rem;
}

.form-error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: var(--danger);
}

.form-success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: var(--success);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .navbar .container {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding-top: 1rem;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: none;
        font-size: 1.1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero {
        padding: 2.5rem 0;
    }

    .features,
    .recent-alerts,
    .emergency-info,
    .page-section {
        padding: 2rem 0;
    }

    .features h2,
    .recent-alerts h2,
    .page-section h2 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

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

    .resource-grid {
        grid-template-columns: 1fr;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 1.25rem;
    }

    /* Touch-friendly buttons */
    .btn {
        padding: 1rem 1.75rem;
        font-size: 1rem;
        min-height: 48px;
    }

    .step-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .step-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* Form elements - larger touch targets */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.9rem;
        font-size: 16px; /* Prevents iOS zoom */
    }

    /* Education cards on mobile */
    .education-card {
        padding: 1.25rem;
    }

    .stat-block {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    /* Ad containers */
    .ad-container {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }

    .step-ad {
        margin: 1rem 0;
    }

    /* Page header */
    .page-header {
        padding: 2rem 0;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    /* Alert items */
    .alert-item {
        padding: 1rem;
    }

    /* Hero actions stacked on mobile */
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Myth items */
    .myth-item {
        padding: 1.25rem;
    }

    .myth-text {
        font-size: 1rem;
    }

    .facts-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .logo-text {
        font-size: 1.1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .form-step h2 {
        font-size: 1.25rem;
    }

    .education-card h2 {
        font-size: 1.2rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .resource-card {
        padding: 1.5rem;
    }
}
