/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    font-size: 4rem;
    color: #ff6b35;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.loading-content h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.loading-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main Container */
.main-container {
    display: flex;
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.main-container.show {
    opacity: 1;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-toggle:hover {
    background: #34495e;
    transform: scale(1.05);
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-logo i {
    font-size: 2.5rem;
    color: #ff6b35;
    animation: pulse 3s infinite;
}

.logo-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.logo-text p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    margin: 0.5rem 1rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.sidebar-link.active {
    background: #e74c3c;
    color: white;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.sidebar-link i {
    font-size: 1.2rem;
    width: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: #f8f9fa;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #e74c3c, #ff6b35);
    color: white;
    padding: 4rem 2rem;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: slideInUp 1s ease-out;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: slideInUp 1s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: slideInUp 1s ease-out 0.4s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-blynk {
    background: white;
    color: #e74c3c;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-blynk:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Statistics Section */
.stats-section {
    padding: 3rem 2rem;
    background: white;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #ff6b35);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #e74c3c, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-text {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.stat-red .stat-number {
    color: #e74c3c;
}

.stat-orange .stat-number {
    color: #ff6b35;
}

.stat-blue .stat-number {
    color: #3498db;
}

/* Quick Access Section */
.quick-access-section {
    padding: 4rem 2rem;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #ff6b35);
    border-radius: 2px;
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.quick-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.quick-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05), rgba(255, 107, 53, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.quick-card:hover::before {
    opacity: 1;
}

.quick-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.quick-card:hover .quick-icon {
    transform: scale(1.1);
}

.fire-card .quick-icon {
    color: #e74c3c;
}

.gas-card .quick-icon {
    color: #f39c12;
}

.emergency-card .quick-icon {
    color: #e74c3c;
}

.equipment-card .quick-icon {
    color: #3498db;
}

.quick-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
    position: relative;
    z-index: 2;
}

.quick-card p {
    color: #666;
    font-size: 1rem;
    position: relative;
    z-index: 2;
}

/* Emergency Banner */
.emergency-banner {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.emergency-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.05) 10px,
        rgba(255,255,255,0.05) 20px
    );
}

.emergency-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.emergency-icon {
    font-size: 3rem;
    color: #fff;
    animation: pulse 2s infinite;
}

.emergency-text h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.emergency-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.btn-emergency {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-emergency:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Page-specific styles */
.page-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 4rem 2rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.page-header p {
    font-size: 1.3rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.content-section {
    padding: 4rem 2rem;
    background: white;
}

.safety-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.safety-item {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(231, 76, 60, 0.1);
}

.safety-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
}

.safety-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e74c3c, #ff6b35);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.safety-item h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.safety-item p {
    color: #666;
    margin-bottom: 1rem;
}

.safety-item ul {
    list-style: none;
    padding-left: 0;
}

.safety-item li {
    padding: 0.3rem 0;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
}

.safety-item li:before {
    content: "•";
    color: #e74c3c;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.warning-box {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.2);
}

.warning-box i {
    color: #f39c12;
    font-size: 1.2rem;
}

.info-card {
    display: flex;
    gap: 2rem;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-image {
    width: 300px;
    height: 200px;
    object-fit: cover;
}

.info-content {
    padding: 2rem;
    flex: 1;
}

.guideline-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 15px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.guideline-image:hover {
    transform: scale(1.02);
}

.emergency-section {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.emergency-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="emergency" width="50" height="50" patternUnits="userSpaceOnUse"><polygon points="25,5 30,20 45,20 35,30 40,45 25,35 10,45 15,30 5,20 20,20" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23emergency)"/></svg>');
}

.emergency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.emergency-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.emergency-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.emergency-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: white;
}

.emergency-card ul {
    list-style: none;
}

.emergency-card li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.step-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ff6b35;
}

.step-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: white;
}

.step-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #ff6b35;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    padding: 0.3rem 0;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 2rem;
    color: #ff6b35;
}

.footer-logo span {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 100%;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .quick-access-grid {
        grid-template-columns: 1fr;
    }
    
    .emergency-content {
        flex-direction: column;
        text-align: center;
    }
    
    .info-card {
        flex-direction: column;
    }
    
    .info-image {
        width: 100%;
        height: 200px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .stats-section {
        padding: 2rem 1rem;
    }
    
    .quick-access-section {
        padding: 2rem 1rem;
    }
    
    .content-section {
        padding: 2rem 1rem;
    }
    
    .emergency-section {
        padding: 2rem 1rem;
    }
}