/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px; /* Base font size for rem calculations */
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f8ff;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Common elements */
h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem); /* Responsive font size */
    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 #4d94ff;
    color: #0066cc;
    text-align: center;
    padding: 1.5625rem 1.875rem;
    margin: 1.25rem auto;
    width: 100%;
}

.breadcrumb {
    font-size: 0.875rem;
    color: #0066cc;
}

.about-content {
    margin: 1.875rem auto;
    padding: 0 1.25rem;
    max-width: 1200px;
}

.about-section {
    background: white;
    padding: 1.5625rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.875rem;
}

.mission-vision{
    border: 1px solid #99ccff;
    border-radius: 5px;
    padding: 10px;
    background-color: #e6f2ff;
}

.population-table {
    width: 100%;
    border-collapse: separate;
    margin-top: 1.25rem;
}

.population-table th,
.population-table td {
    border: 1px solid #0066cc;
    border-radius: 3px;
    padding: 0.625rem;
    text-align: left;
}

.population-table th:hover, 
.population-table td:hover {
    background-color: #4d94ff;
    color: white;
    transform: scale(1.03);
    border:none;
}

.history-timeline {
    margin-top: 1.875rem;
}

.timeline-item {
    margin-bottom: 1.25rem;
    padding-left: 1.875rem;
    position: relative;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: #0066cc;
}

.timeline-item h4 {
    color: #0066cc;
    margin-bottom: 0.3125rem;
    font-size: 1.1rem;
}

.timeline-item .year {
    font-weight: bold;
    color: #0066cc;
}

.team-section {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 1.25rem;
}

.team-section h2 {
    color: #0066cc;
    text-align: center;
    margin-bottom: 1.875rem;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5625rem;
}

.team-member {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.team-member:hover {
    transform: translateY(-0.3125rem);
}

.team-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.team-info {
    padding: 1.25rem;
}

.team-info h3 {
    color: #0066cc;
    margin-bottom: 0.3125rem;
}

.team-info .position {
    color: #0066cc;
    font-weight: bold;
    margin-bottom: 0.625rem;
}

.stats-section {
    background: #0066cc;
    color: white;
    padding: 3.125rem 1.25rem;
    margin: 2.5rem 0;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.875rem;
    text-align: center;
}

.stat-item {
    padding: 1.25rem;
}

.stat-number {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: bold;
    color: white;
    margin-bottom: 0.625rem;
}

.stat-text {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
}

/* Map Section */
.map-container {
    max-width: 1200px;
    margin: 1.875rem auto;
    padding: 0 1.25rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
}

.map {
    border: 1px solid #99ccff;
    border-radius: 0.25rem;
    overflow: hidden;
    margin-top: 0.9375rem;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio for responsive map */
    height: 0;
}

.map iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

main {
    padding: 1.5625rem;
    margin: 1.25rem auto;
    background-color: #e6f2ff;
    border: 1px solid #99ccff;
    border-radius: 0.3125rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
}

section {
    margin-bottom: 2em;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.service-item {
    background-color: #f9f9f9;
    padding: 0.9375rem;
    border-radius: 0.625rem;
    border-left: 5px solid #0066cc;
    font-weight: bold;
    transition: all 0.3s ease;
}

.service-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-0.1875rem);
    border-left: 5px solid #0066cc;
}

.service-item ul {
    list-style-type: none;
    padding: 0;
}

.service-item ul li {
    margin-bottom: 0.5em;
}

/* Media Queries for Responsiveness */
@media (min-width: 768px) {
    .mission-vision {
        grid-template-columns: 1fr 1fr;
    }
    
    .about-content {
        padding: 0 2.5rem;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 14px;
    }
    
    .page-header {
        padding: 1.25rem 0.9375rem;
    }
    
    .about-section, 
    .mission, 
    .vision, 
    .map-container {
        padding: 1.25rem 0.9375rem;
        border-radius: 0;
    }
    
    .team-info {
        padding: 0.9375rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr 1fr;
        gap: 0.9375rem;
    }
    
    .stat-item {
        padding: 0.625rem;
    }
    
    main {
        padding: 0.9375rem;
        margin: 0.625rem;
        border-radius: 0;
    }
    
    .population-table th, 
    .population-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    h1, h2, h3 {
        text-align: center;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        padding-left: 1.25rem;
    }
    
    .timeline-item:before {
        width: 0.5rem;
        height: 0.5rem;
    }
    
    .population-table {
        font-size: 0.75rem;
    }
    
    /* Remove hover effects on touch devices */
    @media (hover: none) {
        .population-table th:hover, 
        .population-table td:hover,
        .mission:hover,
        .vision:hover,
        .service-item:hover,
        .team-member:hover {
            transform: none;
        }
    }
}

/* Print styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .team-member,
    .service-item,
    .about-section {
        border: 1px solid #999;
        page-break-inside: avoid;
    }
    
    .stats-section {
        background: white !important;
        color: black !important;
    }
    
    .stat-number {
        color: black !important;
    }
    
    .map {
        display: none;
    }
}

.service-details {
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px auto;
}

.service-details h2 {
    background: #0066cc;
    color: white;
    padding: 20px 25px;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: left;
}

.service-details h2 i {
    margin-right: 12px;
    font-size: 26px;
}

.service-accordion {
    padding: 10px;
}

.accordion-item {
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #4d94ff;
}

.accordion-item:nth-child(2) {
    border-left-color: #4d94ff;
}

.accordion-item:nth-child(3) {
    border-left-color: #4d94ff;
}

.accordion-header {
    background: #f0f0f0;
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: #e0e0e0;
}

.accordion-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.accordion-icon {
    font-size: 20px;
    font-weight: bold;
    color: #4d94ff;
    transition: transform 0.3s ease;
}

.accordion-content {
    max-height: 0;
    padding-left: 20px;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: white;
}

.accordion-content-inner {
    padding: 20px;
}

.accordion-item.active .accordion-content {
    max-height: 700px;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content h4 {
    color: #333;
    margin: 15px 0 8px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.accordion-content h4:first-child {
    margin-top: 0;
}

.accordion-content h4 i {
    margin-right: 8px;
    color: #4d94ff;
    font-size: 14px;
}

.accordion-content p, 
.accordion-content li {
    color: #0066cc;
    line-height: 1.6;
    font-size: 15px;
    border:1px solid #99ccff;
    border-radius:5px;
    padding:10px;
    background:#e6f2ff;
    cursor: pointer;
}

.accordion-content ul {
    padding-left: 20px;
    margin: 10px 0;
}

.accordion-content li {
    margin-bottom: 8px;
    position: relative;
}

.accordion-content li:before {
    content: "";
    color: #4d94ff;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.services {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.services h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #0066cc;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: #e6f2ff;
    padding: 2rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: #0066cc;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    background: #4d94ff;
}

.service-card i {
    font-size: 2.5rem;
    color: #0066cc;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #0066cc;
}

.service-card p {
    color: #0066cc;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}