/* Overview Page Styles */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
}

/* Overview Content Layout */
.overview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.text-section {
    padding-right: 2rem;
}

.text-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    color: #fff;
}

.verse-line {
    white-space: nowrap;
    overflow-x: auto;
}

.text-section p:last-child {
    margin-bottom: 0;
}

.image-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Founding Content Layout */
.founding-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 4rem;
}

.founding-image-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.founding-image-section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.founding-text-section {
    padding-left: 2rem;
}

.founding-text-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    color: #fff;
    text-align: justify;
}

.founding-text-section p:last-child {
    margin-bottom: 0;
}

/* Milestone Content Layout */
.milestone-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 4rem;
}

.milestone-image-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.milestone-image-section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.milestone-text-section {
    color: #fff;
}

.milestone-text-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
}

.milestone-text-section p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    color: #fff;
}

.milestone-text-section p:last-child {
    margin-bottom: 0;
}

/* Milestone 1 & 3: Text left, Image right */
.milestone-1 .milestone-text-section,
.milestone-3 .milestone-text-section {
    padding-right: 2rem;
}

/* Milestone 2 & 4: Image left, Text right */
.milestone-2 .milestone-text-section,
.milestone-4 .milestone-text-section {
    padding-left: 2rem;
}

/* SMI 2025 Image Section */
.smi-2025-section {
    margin-top: 4rem;
    margin-bottom: 4rem;
    padding: 2rem 0;
    text-align: center;
}

.smi-2025-section h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 1px;
}

.smi-2025-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    max-width: 800px;
}

.smi-2025-image {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.smi-2025-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Map Section Styles */
.map-section {
    padding: 6rem 0;
    background: none;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-header p {
    font-size: 1.2rem;
    color: white;
    max-width: 600px;
    margin: 0 auto;
}

.map-container {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.map-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.map-filter {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #6c757d;
}

.map-filter:hover {
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-2px);
}

.map-filter.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.churches-map {
    width: 100%;
    height: 600px;
    border: 2px solid #758171;
    border-radius: 8px;
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-weight: 500;
}

.legend-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.legend-marker.church {
    background: #28a745;
}

.legend-marker.station {
    background: #ffc107;
}

.legend-marker.international {
    background: #dc3545;
}

/* Organization Structure Section */
.org-structure-section {
    margin-top: 4rem;
    text-align: center;
}

.org-structure-section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.org-structure-section > p {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.org-diagram-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 4rem auto;
    max-width: 800px;
}

.org-structure-img {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.org-structure-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Organization Grid */
.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    text-align: left;
}

.org-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.org-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.org-header {
    background: linear-gradient(135deg, #456ba8 0%, #5a7bc8 100%);
    padding: 1.5rem;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

/* Organization Header Color Categories */
.org-header.grey {
    background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
}

.org-header.pink {
    background: linear-gradient(135deg, #E4A0B7 0%, #f0b5c4 100%);
}

.org-header.light-blue {
    background: linear-gradient(135deg, #63e5ff 0%, #7de9ff 100%);
}

.org-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.org-content {
    padding: 1.5rem;
    color: #333;
}

.org-history {
    font-style: italic;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.95rem;
}

.org-description {
    font-weight: 500;
    margin-bottom: 1rem;
    color: #444;
}

.org-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.org-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.org-content li::before {
    content: "•";
    color: #456ba8;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.leadership {
    margin-bottom: 1rem;
}

.leader-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.leader-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #456ba8;
}

.leader-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.facilities h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #456ba8;
    font-weight: 600;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .org-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .overview-content,
    .founding-content,
    .milestone-content {
        gap: 2rem;
    }
    
    .text-section,
    .founding-text-section {
        padding: 0 1rem;
    }
    
    .milestone-1 .milestone-text-section,
    .milestone-3 .milestone-text-section {
        padding-right: 1rem;
    }
    
    .milestone-2 .milestone-text-section,
    .milestone-4 .milestone-text-section {
        padding-left: 1rem;
    }
    
    .map-controls {
        gap: 0.5rem;
    }

    .map-filter {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .org-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }
    
    .container h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .overview-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 1.5rem;
    }
    
    .text-section {
        padding: 0 1rem;
        order: 2;
    }
    
    .image-section {
        order: 1;
        padding: 0 1rem;
    }
    
    .text-section p {
        font-size: 1rem;
        line-height: 1.7;
        color: #fff;
        text-align: left;
    }
    
    .verse-line {
        white-space: normal;
        overflow-x: visible;
        word-wrap: break-word;
    }

    .founding-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 3rem;
    }
    
    .founding-text-section {
        padding: 0 1rem;
        order: 2;
    }
    
    .founding-image-section {
        order: 1;
        padding: 0 1rem;
    }
    
    .founding-text-section p {
        font-size: 1rem;
        line-height: 1.7;
        text-align: left;
        color: #fff;
    }

    /* Mobile Milestone Layout */
    .milestone-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 3rem;
    }

    .milestone-1 .milestone-text-section,
    .milestone-3 .milestone-text-section {
        padding: 0 1rem;
        order: 2;
    }

    .milestone-1 .milestone-image-section,
    .milestone-3 .milestone-image-section {
        order: 1;
        padding: 0 1rem;
    }

    .milestone-2 .milestone-text-section,
    .milestone-4 .milestone-text-section {
        padding: 0 1rem;
        order: 2;
    }

    .milestone-2 .milestone-image-section,
    .milestone-4 .milestone-image-section {
        order: 1;
        padding: 0 1rem;
    }

    .milestone-text-section h1 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .milestone-text-section p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Mobile SMI 2025 Image */
    .smi-2025-section {
        margin-top: 3rem;
        margin-bottom: 3rem;
        padding: 1.5rem 0;
    }

    .smi-2025-section h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
        line-height: 1.3;
    }

    .smi-2025-image-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .smi-2025-image {
        max-width: 100%;
    }

    /* Mobile Organization Structure */
    .org-diagram-container {
        max-width: 100%;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .org-structure-img {
        max-width: 100%;
    }

    .org-structure-section h2 {
        font-size: 2rem;
        padding: 0 1rem;
    }

    .org-structure-section > p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .org-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .org-header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        height: auto;
        min-height: 80px;
        padding: 1rem;
    }

    .org-header h3 {
        font-size: 1.1rem;
        text-align: center;
        line-height: 1.3;
    }

    .org-content {
        padding: 1.2rem;
    }

    .leader-profile {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .leader-photo {
        width: 50px;
        height: 50px;
    }
    
    .leader-info h4 {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .org-content li {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .org-history,
    .org-description {
        font-size: 0.9rem;
    }

    /* Mobile Map Section */
    .map-section {
        padding: 4rem 0;
    }

    .section-header h2 {
        font-size: 2rem;
        padding: 0 1rem;
    }

    .section-header p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .map-container {
        margin: 0 1rem;
        padding: 1.5rem;
    }

    .churches-map {
        height: 400px;
    }

    .map-legend {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .container h1 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .text-section,
    .founding-text-section,
    .milestone-text-section {
        padding: 0 0.5rem;
    }
    
    .image-section,
    .founding-image-section,
    .milestone-image-section {
        padding: 0 0.5rem;
    }
    
    .text-section p,
    .founding-text-section p,
    .milestone-text-section p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .milestone-text-section h1 {
        font-size: 1.3rem;
    }
    
    .smi-2025-section h1 {
        font-size: 1.3rem;
        padding: 0 0.5rem;
    }
    
    .smi-2025-image-container {
        padding: 0 0.5rem;
    }
    
    .org-structure-section h2 {
        font-size: 1.8rem;
        padding: 0 0.5rem;
    }
    
    .org-structure-section > p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    
    .org-grid {
        padding: 0 0.5rem;
        gap: 1rem;
    }
    
    .org-header {
        padding: 0.8rem;
        min-height: 70px;
    }
    
    .org-header h3 {
        font-size: 1rem;
    }
    
    .org-content {
        padding: 1rem;
    }
    
    .org-content li {
        font-size: 0.85rem;
        padding-left: 1.2rem;
    }
    
    .leader-photo {
        width: 45px;
        height: 45px;
    }
    
    .leader-info h4 {
        font-size: 0.85rem;
    }
    
    .org-history,
    .org-description {
        font-size: 0.85rem;
    }

    /* Mobile Map Controls */
    .map-container {
        margin: 0 0.5rem;
        padding: 1rem;
    }

    .churches-map {
        height: 300px;
    }

    .map-controls {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .map-filter {
        width: 100%;
        max-width: 200px;
        text-align: center;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .map-legend {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .legend-item {
        font-size: 0.85rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
        padding: 0 0.5rem;
    }
    
    .section-header p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0.25rem;
    }
    
    .text-section,
    .founding-text-section,
    .milestone-text-section {
        padding: 0 0.25rem;
    }
    
    .image-section,
    .founding-image-section,
    .milestone-image-section {
        padding: 0 0.25rem;
    }
    
    .text-section p,
    .founding-text-section p,
    .milestone-text-section p {
        font-size: 0.85rem;
    }
    
    .milestone-text-section h1 {
        font-size: 1.2rem;
    }
    
    .smi-2025-section h1 {
        font-size: 1.2rem;
        padding: 0 0.25rem;
    }
    
    .smi-2025-image-container {
        padding: 0 0.25rem;
    }
    
    .org-structure-section h2 {
        font-size: 1.6rem;
        padding: 0 0.25rem;
    }
    
    .org-structure-section > p {
        font-size: 0.9rem;
        padding: 0 0.25rem;
    }
    
    .org-grid {
        padding: 0 0.25rem;
    }
    
    .org-header h3 {
        font-size: 0.9rem;
    }
    
    .org-content li {
        font-size: 0.8rem;
    }
    
    .leader-photo {
        width: 40px;
        height: 40px;
    }
    
    .leader-info h4 {
        font-size: 0.8rem;
    }
    
    .org-history,
    .org-description {
        font-size: 0.8rem;
    }
    
    .map-container {
        margin: 0 0.25rem;
        padding: 0.8rem;
    }
    
    .churches-map {
        height: 250px;
    }
    
    .map-filter {
        max-width: 180px;
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
        padding: 0 0.25rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
        padding: 0 0.25rem;
    }
}

/* Critical fix for screens below 364px width */
@media (max-width: 364px) {
    .container {
        padding: 0.15rem;
        width: 100%;
        min-width: 320px;
    }
    
    .container h1 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
        padding: 0 0.15rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .text-section,
    .founding-text-section,
    .milestone-text-section {
        padding: 0 0.15rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .image-section,
    .founding-image-section,
    .milestone-image-section {
        padding: 0 0.15rem;
    }
    
    .text-section p,
    .founding-text-section p,
    .milestone-text-section p {
        font-size: 0.8rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .verse-line {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .milestone-text-section h1 {
        font-size: 1.1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .smi-2025-section h1 {
        font-size: 1.1rem;
        padding: 0 0.15rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .smi-2025-image-container {
        padding: 0 0.15rem;
    }
    
    .smi-2025-image {
        max-width: 100%;
        height: auto;
    }
    
    .org-structure-section h2 {
        font-size: 1.4rem;
        padding: 0 0.15rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .org-structure-section > p {
        font-size: 0.85rem;
        padding: 0 0.15rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .org-diagram-container {
        padding: 0 0.15rem;
    }
    
    .org-grid {
        padding: 0 0.15rem;
        gap: 0.8rem;
    }
    
    .org-header {
        padding: 0.6rem;
        min-height: 60px;
    }
    
    .org-header h3 {
        font-size: 0.85rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .org-content {
        padding: 0.8rem;
    }
    
    .org-content li {
        font-size: 0.75rem;
        line-height: 1.4;
        padding-left: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .leader-profile {
        gap: 0.3rem;
    }
    
    .leader-photo {
        width: 35px;
        height: 35px;
    }
    
    .leader-info h4 {
        font-size: 0.75rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .org-history,
    .org-description {
        font-size: 0.75rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .facilities h4 {
        font-size: 0.8rem;
    }
    
    .facilities ul {
        margin-left: 0;
        padding-left: 1rem;
    }
    
    .facilities li {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    /* Map section fixes for very small screens */
    .map-section {
        padding: 2rem 0;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
        padding: 0 0.15rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .section-header p {
        font-size: 0.85rem;
        padding: 0 0.15rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .map-container {
        margin: 0 0.15rem;
        padding: 0.6rem;
        border-radius: 8px;
    }
    
    .churches-map {
        height: 200px;
        border-radius: 4px;
    }
    
    .map-controls {
        gap: 0.3rem;
    }
    
    .map-filter {
        max-width: 160px;
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        border-radius: 20px;
    }
    
    .map-legend {
        gap: 0.3rem;
    }
    
    .legend-item {
        font-size: 0.75rem;
    }
    
    .legend-marker {
        width: 12px;
        height: 12px;
    }
    
    /* Ensure all images scale properly */
    .image-section img,
    .founding-image-section img,
    .milestone-image-section img,
    .org-structure-img {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
    }
    
    /* Fix any potential horizontal scroll issues */
    body {
        overflow-x: hidden;
    }
    
    .container {
        overflow-x: hidden;
    }
    
    /* Ensure text doesn't overflow containers */
    * {
        box-sizing: border-box;
    }
    
    /* Fix for organization cards that might be too wide */
    .org-card {
        min-width: 0;
        width: 100%;
    }
    
    /* Ensure proper text wrapping in all elements */
    h1, h2, h3, h4, h5, h6, p, li, span, div {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
} 