/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e74c3c;
    --primary-dark: #c0392b;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==================== Top Bar ==================== */
.top-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 10px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.emergency-numbers {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.emergency-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.emergency-item .icon {
    font-size: 16px;
}

.emergency-item a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.emergency-item a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-icon {
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: transform 0.3s;
}

.social-icon:hover {
    transform: scale(1.2);
}

/* ==================== Navigation Bar ==================== */
.navbar-custom {
    background: white;
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    text-decoration: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 40px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.logo-sub {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.navbar-nav {
    display: flex;
    gap: 5px;
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 8px 15px !important;
    border-radius: 5px;
    transition: all 0.3s;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-color);
    color: white !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 10px 0;
    margin-top: 10px;
}

.dropdown-item {
    padding: 10px 20px;
    transition: all 0.3s;
    color: var(--text-primary);
}

.dropdown-item:hover {
    background: var(--primary-color);
    color: white;
    padding-left: 25px;
}

.navbar-toggler {
    border: none;
    font-size: 28px;
    color: var(--primary-color);
}

/* ==================== Main Content ==================== */
.main-content {
    min-height: calc(100vh - 400px);
}

/* ==================== Hero Section ==================== */
.hero-section {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.95), rgba(192, 57, 43, 0.95)),
                url('https://images.unsplash.com/photo-1551843073-4a9a5b6fcd5f?w=1920') center/cover;
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.hero-search input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
}

.hero-search button {
    padding: 15px 40px;
    background: var(--dark-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.hero-search button:hover {
    background: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* ==================== Section Styles ==================== */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 20px auto 0;
}

/* ==================== Cards ==================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.helpline-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 2px solid transparent;
    text-align: center;
}

.helpline-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 50px;
    margin-bottom: 20px;
    display: block;
}

.card-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.card-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 20px 0;
}

.card-number a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.card-number a:hover {
    color: var(--primary-dark);
}

.card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 25px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.card-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
    color: white;
}

/* ==================== Service Categories ==================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.category-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: white;
}

.category-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.category-count {
    font-size: 14px;
    opacity: 0.8;
}

/* ==================== Info Boxes ==================== */
.info-box {
    background: white;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
    box-shadow: var(--shadow);
}

.info-box.success {
    border-left-color: var(--success-color);
}

.info-box.warning {
    border-left-color: var(--warning-color);
}

.info-box.danger {
    border-left-color: var(--danger-color);
}

/* ==================== Table Styles ==================== */
.helpline-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 30px 0;
}

.helpline-table table {
    width: 100%;
    border-collapse: collapse;
}

.helpline-table th {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.helpline-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.helpline-table tr:last-child td {
    border-bottom: none;
}

.helpline-table tr:hover {
    background: #f8f9fa;
}

.table-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.table-number a {
    color: var(--primary-color);
    text-decoration: none;
}

.table-number a:hover {
    text-decoration: underline;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 0;
    margin-top: 80px;
}

.footer h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer p {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    margin-bottom: 12px;
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social-icon {
    color: white;
    font-size: 24px;
    text-decoration: none;
    transition: transform 0.3s;
}

.footer-social-icon:hover {
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 40px;
    padding: 25px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

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

.text-right {
    text-align: right;
}

/* ==================== Back to Top Button ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: none;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 992px) {
    .navbar-nav {
        flex-direction: column;
        gap: 0;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-search {
        flex-direction: column;
    }

    .section-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .emergency-numbers {
        justify-content: center;
    }

    .hero-section {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section {
        padding: 50px 0;
    }

    .card-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .footer .text-right {
        text-align: left;
        margin-top: 15px;
    }

    .helpline-table {
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .logo-main {
        font-size: 20px;
    }

    .logo-icon {
        font-size: 30px;
    }

    .emergency-numbers {
        flex-direction: column;
        align-items: center;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

/* ==================== Utility Classes ==================== */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-30 {
    margin-top: 30px;
}

.mt-50 {
    margin-top: 50px;
}
