* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.nav-menu li {
    margin: 0;
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-align: center;
    min-width: 120px;
    position: relative;
    z-index: 2;

    font-family:
        ui-rounded,
        "SF Pro Rounded",
        "SF Compact Rounded",
        "Chalkboard",
        "Segoe Print",
        cursive;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #f5f5f5;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: all 0.3s ease;
    z-index: 1;
}

.nav-menu a.active::before {
    width: 80%;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { width: 0; }
    to { width: 80%; }
}

.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-menu a:active {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(0);
}

main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.content h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-family: 'Constantia', 'Times New Roman', Times, serif;
    font-size: 2.5em;
    font-weight: 600;
}

.content p {
    color: #666;
    font-size: 1.2em;
    line-height: 1.8;

    font-family: 'Constantia', 'Times New Roman', Times, serif;
}

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-menu li {
        margin: 5px 0;
    }
    
    .nav-menu a {
        padding: 12px 15px;
        min-width: auto;
    }
    
    main {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .content {
        padding: 30px 20px;
    }
    
    .content h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .nav-menu a {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .content {
        padding: 20px 15px;
    }
    
    .content h1 {
        font-size: 1.8em;
    }
    
    .content p {
        font-size: 1em;
    }
}

/* Self-help & Rescue Page Specific Styles */
.subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 40px;
    text-align: center;
    font-style: italic;
}

.emergency-section {
    margin-bottom: 50px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border-left: 5px solid #e74c3c;
}

.emergency-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-family: 'Times New Roman', 'Constantia', Times, serif;
    font-size: 1.8em;
}

.emergency-contacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.contact-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.contact-item p {
    color: #666;
    font-size: 1.1em;
    margin: 0;
}

.guidelines-section {
    margin-bottom: 50px;
}

.guidelines-section h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-family: 'Times New Roman', 'Constantia', Times, serif;
    font-size: 1.8em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.disaster-guideline {
    background: white;
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.disaster-guideline h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-family: 'Times New Roman', 'Constantia', Times, serif;
}

.guideline-content h4 {
    color: #34495e;
    margin: 20px 0 10px 0;
    font-size: 1.1em;
    font-weight: 600;
}

.guideline-content ul {
    color: #555;
    line-height: 1.6;
    margin-left: 20px;
}

.guideline-content li {
    margin-bottom: 8px;
}

.kit-section {
    margin-bottom: 50px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.kit-section h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-family: 'Times New Roman', 'Constantia', Times, serif;
    font-size: 1.8em;
    text-align: center;
}

.kit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.kit-category {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.kit-category h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    text-align: center;
}

.kit-category ul {
    color: #555;
    line-height: 1.5;
    margin-left: 15px;
}

.kit-category li {
    margin-bottom: 6px;
}

.rescue-section {
    margin-bottom: 50px;
}

.rescue-section h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-family: 'Times New Roman', 'Constantia', Times, serif;
    font-size: 1.8em;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
}

.rescue-technique {
    background: white;
    margin-bottom: 25px;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #e74c3c;
}

.rescue-technique h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-family: 'Times New Roman', 'Constantia', Times, serif;
}

.technique-content h4 {
    color: #34495e;
    margin: 15px 0 8px 0;
    font-size: 1.1em;
    font-weight: 600;
}

.communication-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.communication-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-family: 'Times New Roman', 'Constantia', Times, serif;
    font-size: 1.8em;
    text-align: center;
}

.communication-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.tip-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tip-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.tip-item ul {
    color: #555;
    line-height: 1.5;
    margin-left: 15px;
}

/* Responsive Design for Self-help Page */
@media (max-width: 768px) {
    .emergency-contacts,
    .kit-grid,
    .communication-tips {
        grid-template-columns: 1fr;
    }
    
    .emergency-section,
    .kit-section,
    .communication-section {
        padding: 20px;
    }
    
    .disaster-guideline,
    .rescue-technique {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .subtitle {
        font-size: 1em;
    }
    
    .emergency-section h2,
    .guidelines-section h2,
    .kit-section h2,
    .rescue-section h2,
    .communication-section h2 {
        font-size: 1.5em;
    }
}