/* Redesigned Links.css - Inspired by gov.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f8ff;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Common elements */
h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin-bottom: 0.625rem;
    border-bottom: 2px solid #4d94ff;
    padding-bottom: 0.625rem;
    display: inline-block;
}

h2 {
    color: #0066cc;
    margin-bottom: 0.9375rem;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid #4d94ff;
    font-size: clamp(1.3rem, 4vw, 2rem);
}

h3 {
    color: #0066cc;
    margin-bottom: 0.625rem;
    font-size: clamp(1.1rem, 3.5vw, 1.5rem);
}

p {
    margin-bottom: 0.9375rem;
    line-height: 1.8;
}

a {
    color: #0066cc;
    text-decoration: none;
}

/* Page Specific Styles */
.page-header {
    border-bottom: 2px solid #99ccff;
    color: #0066cc;
    text-align: center;
    padding: 1.5625rem 1.875rem;
    margin: 1.25rem auto;
    width: 100%;
}

.breadcrumb {
    font-size: 0.875rem;
    color: #0066cc;
}

/* Main Content Area */
.links-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Introduction Section */
.links-intro {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(77, 148, 255, 0.1);
    margin-bottom: 30px;
}

.links-intro h2 {
    color: #0066cc;
    margin-bottom: 15px;
    border-bottom: 2px solid #4d94ff;
    padding-bottom: 10px;
    display: inline-block;
}

.links-intro p {
    margin-bottom: 0;
    line-height: 1.8;
}

/* Links Category Sections */
.links-category {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(77, 148, 255, 0.1);
    margin-bottom: 30px;
}

.links-category h2 {
    color: #0066cc;
    margin-bottom: 20px;
    border-bottom: 2px solid #4d94ff;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.links-category h2 i {
    color: #4d94ff;
    font-size: 24px;
}

/* Links List */
.links-list {
    display: grid;
    gap: 20px;
}

.link-item {
    background: #e6f2ff;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #4d94ff;
}

.link-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(77, 148, 255, 0.15);
    background-color: #b3d9ff;
}

.link-icon {
    font-size: 24px;
    color: #0066cc;
    flex-shrink: 0;
}

.link-info {
    flex-grow: 1;
}

.link-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #0066cc;
}

.link-info p {
    margin: 0 0 8px;
    color: #555;
    font-size: 14px;
}

.link-url {
    font-size: 14px;
    color: #666;
    word-break: break-all;
    display: block;
}

.link-action {
    flex-shrink: 0;
}

.visit-btn {
    background-color: #0066cc;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
    display: inline-block;
}

.visit-btn:hover {
    background-color: #004d99;
    transform: scale(1.05);
}

/* Emergency Contacts Section */
.emergency-links {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(77, 148, 255, 0.1);
    margin-bottom: 30px;
}

.emergency-links h2 {
    color: #0066cc;
    margin-bottom: 20px;
    border-bottom: 2px solid #4d94ff;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.emergency-links h2 i {
    color: #4d94ff;
    font-size: 24px;
}

.emergency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.emergency-item {
    background: #e6f2ff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s;
    box-shadow: 0 2px 8px rgba(77, 148, 255, 0.1);
}

.emergency-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(77, 148, 255, 0.15);
}

.emergency-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.emergency-icon.police i {
    color: #3498db;
}

.emergency-icon.ambulance i {
    color: #e74c3c;
}

.emergency-icon.fire i {
    color: #4d94ff;
}

.emergency-icon.women i {
    color: #9b59b6;
}

.emergency-icon.child i {
    color: #2ecc71;
}

.emergency-icon.disaster i {
    color: #34495e;
}

.emergency-item h3 {
    margin: 0 0 10px;
    color: #0066cc;
}

.emergency-number {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
    margin: 0 0 10px;
}

.emergency-desc {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Downloads Section */
.downloads-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(77, 148, 255, 0.1);
    margin-bottom: 30px;
}

.downloads-section h2 {
    color: #0066cc;
    margin-bottom: 20px;
    border-bottom: 2px solid #4d94ff;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.downloads-section h2 i {
    color: #4d94ff;
    font-size: 24px;
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.download-item {
    background: #e6f2ff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s;
    box-shadow: 0 2px 8px rgba(77, 148, 255, 0.1);
    border-top: 4px solid #28a745;
}

.download-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(77, 148, 255, 0.15);
}

.download-item i {
    font-size: 40px;
    color: #4d94ff;
    margin-bottom: 15px;
}

.download-item h3 {
    margin: 0 0 10px;
    color: #0066cc;
}

.download-item p {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px;
}

.download-btn {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #218838;
    transform: scale(1.05);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .links-content {
        padding: 0 15px;
    }

    .link-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .link-action {
        width: 100%;
    }

    .visit-btn {
        display: block;
        width: 100%;
    }

    .emergency-grid {
        grid-template-columns: 1fr;
    }

    .downloads-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation for card entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-item, .emergency-item, .download-item {
    animation: fadeInUp 0.5s ease-out;
}

/* Stagger animation for items */
.links-list .link-item:nth-child(2) {
    animation-delay: 0.1s;
}

.links-list .link-item:nth-child(3) {
    animation-delay: 0.2s;
}

.links-list .link-item:nth-child(4) {
    animation-delay: 0.3s;
}

.emergency-grid .emergency-item:nth-child(2) {
    animation-delay: 0.1s;
}

.emergency-grid .emergency-item:nth-child(3) {
    animation-delay: 0.2s;
}

.emergency-grid .emergency-item:nth-child(4) {
    animation-delay: 0.3s;
}

.downloads-grid .download-item:nth-child(2) {
    animation-delay: 0.1s;
}

.downloads-grid .download-item:nth-child(3) {
    animation-delay: 0.2s;
}

.downloads-grid .download-item:nth-child(4) {
    animation-delay: 0.3s;
}