/* ==========================================================================
   WIEF Foundation - World Islamic Economic Forum Foundation
   Main Stylesheet - Restored from Archive.org (2006)
   Mobile-friendly, SEO-optimized
   ========================================================================== */

/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Typography */
body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    color: #506FAD;
    text-decoration: none;
}

a:hover {
    color: #1a5276;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout */
.wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Header */
.header {
    background: #1a5276;
    padding: 10px 0;
    border-bottom: 3px solid #c0392b;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 10px;
}

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

.logo img {
    height: 60px;
    width: auto;
}

.logo-text {
    color: #fff;
    margin-left: 10px;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    line-height: 1.2;
}

.logo-text .tagline {
    font-size: 11px;
    color: #85c1e9;
    font-style: italic;
}

.header-right {
    text-align: right;
    color: #85c1e9;
    font-size: 12px;
}

.header-right a {
    color: #85c1e9;
}

/* Slogan Bar */
.slogan-bar {
    background: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    font-style: italic;
    letter-spacing: 1px;
}

/* Navigation */
.nav-bar {
    background: #506FAD;
    border-bottom: 2px solid #3d5a80;
}

.nav-bar ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 960px;
    margin: 0 auto;
    padding: 0;
}

.nav-bar li {
    position: relative;
}

.nav-bar li a {
    display: block;
    color: #fff;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.nav-bar li a:hover,
.nav-bar li a.active {
    background: #3d5a80;
    text-decoration: none;
}

/* Dropdown */
.nav-bar li .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.nav-bar li:hover .dropdown {
    display: block;
}

.nav-bar li .dropdown a {
    color: #506FAD;
    padding: 8px 15px;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.nav-bar li .dropdown a:hover {
    background: #DEE3EF;
    color: #333;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: #506FAD;
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-weight: bold;
}

/* Main Content Area */
.main-content {
    display: flex;
    flex-wrap: wrap;
    max-width: 960px;
    margin: 0 auto;
    padding: 15px 10px;
    gap: 15px;
}

/* Left Sidebar */
.sidebar-left {
    width: 160px;
    flex-shrink: 0;
}

.sidebar-left .sidebar-nav {
    list-style: none;
    padding: 0;
}

.sidebar-left .sidebar-nav li a {
    display: block;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: bold;
    color: #006600;
    text-transform: uppercase;
    border-bottom: 1px solid #e0e0e0;
    text-decoration: none;
}

.sidebar-left .sidebar-nav li a:hover {
    background: #f0f0f0;
    color: #333;
}

.sidebar-left .mission-text {
    margin-top: 15px;
    font-size: 11px;
    color: #333;
    text-align: center;
    line-height: 1.5;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
}

.sidebar-left .mission-text strong {
    display: block;
    margin-bottom: 5px;
    color: #1a5276;
}

/* Content Area */
.content-area {
    flex: 1;
    min-width: 0;
}

/* Right Sidebar */
.sidebar-right {
    width: 220px;
    flex-shrink: 0;
}

/* Section Headers */
.section-header {
    background: #506FAD;
    color: #fff;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header a {
    color: #fff;
    font-size: 11px;
}

/* Page Title */
.page-title {
    background: #506FAD;
    color: #fff;
    padding: 8px 15px;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

.page-subtitle {
    font-size: 14px;
    font-weight: bold;
    color: #1a5276;
    margin: 15px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

/* News Update Section */
.news-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.news-item img {
    width: 180px;
    height: auto;
    flex-shrink: 0;
}

.news-item h3 {
    font-size: 14px;
    color: #506FAD;
    margin-bottom: 5px;
}

.news-item h3 a {
    color: #506FAD;
    text-decoration: underline;
}

.news-item p {
    font-size: 12px;
    color: #333;
    line-height: 1.5;
}

.news-item .read-more {
    display: inline-block;
    margin-top: 5px;
    font-size: 12px;
    color: #506FAD;
    font-weight: bold;
}

/* Features Section */
.feature-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.feature-item img {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
    border-radius: 3px;
}

.feature-item h4 {
    font-size: 12px;
    color: #506FAD;
    margin-bottom: 3px;
}

.feature-item h4 a {
    color: #506FAD;
    text-decoration: underline;
}

.feature-item .author {
    font-size: 11px;
    color: #666;
}

/* Events & Organisations Lists */
.sidebar-list {
    list-style: none;
    padding: 0;
}

.sidebar-list li {
    padding: 5px 0 5px 15px;
    font-size: 12px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.sidebar-list li::before {
    content: "\2022";
    color: #506FAD;
    position: absolute;
    left: 3px;
}

.sidebar-list li a {
    color: #506FAD;
}

/* Message from Chairman */
.chairman-section {
    margin-top: 15px;
}

.chairman-section .chairman-photo {
    width: 80px;
    float: left;
    margin-right: 10px;
    margin-bottom: 5px;
}

.chairman-section p {
    font-size: 12px;
    line-height: 1.5;
}

/* Content Page Styles */
.content-page {
    padding: 15px;
}

.content-page h2 {
    font-size: 18px;
    color: #1a5276;
    margin-bottom: 15px;
}

.content-page h3 {
    font-size: 15px;
    color: #506FAD;
    margin: 20px 0 10px;
}

.content-page p {
    margin-bottom: 12px;
    text-align: justify;
    line-height: 1.6;
}

.content-page ul, .content-page ol {
    margin: 10px 0 15px 25px;
}

.content-page li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.data-table th {
    background: #506FAD;
    color: #fff;
    padding: 8px 12px;
    text-align: left;
    font-size: 12px;
}

.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
}

.data-table tr:nth-child(even) {
    background: #f9f9f9;
}

.data-table tr:hover {
    background: #DEE3EF;
}

/* Members List */
.members-list {
    list-style: decimal;
    margin: 15px 0 15px 30px;
}

.members-list li {
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

/* IAP Panel Members */
.iap-member {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    align-items: flex-start;
}

.iap-member img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #ddd;
}

.iap-member .member-info {
    font-size: 13px;
}

.iap-member .member-info strong {
    color: #506FAD;
}

/* Contact Info Box */
.contact-box {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 15px 0;
    font-size: 12px;
}

.contact-box h4 {
    color: #1a5276;
    margin-bottom: 8px;
    font-size: 13px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 8px 0;
    font-size: 12px;
    color: #666;
    max-width: 960px;
    margin: 0 auto;
    padding-left: 10px;
}

.breadcrumb a {
    color: #506FAD;
}

.breadcrumb span {
    margin: 0 5px;
    color: #999;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #ccc;
    padding: 15px 0;
    font-size: 11px;
    text-align: center;
    margin-top: 20px;
    border-top: 3px solid #c0392b;
}

.footer a {
    color: #85c1e9;
}

.footer .footer-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 10px;
}

.footer .footer-links {
    margin-top: 8px;
}

.footer .footer-links a {
    margin: 0 10px;
}

/* Back to Top */
.back-to-top {
    text-align: center;
    margin: 20px 0;
    font-size: 12px;
}

/* Speech Page */
.speech-content {
    max-width: 700px;
    margin: 0 auto;
}

.speech-content .speech-header {
    text-align: center;
    margin-bottom: 30px;
}

.speech-content .speech-header h2 {
    font-size: 20px;
    color: #1a5276;
    text-transform: uppercase;
}

.speech-content .speech-header h3 {
    font-size: 16px;
    color: #506FAD;
}

.speech-content .speech-header p {
    text-align: center;
}

.speech-content .salutation {
    font-style: italic;
    margin-bottom: 15px;
}

.speech-content .addressees {
    margin-bottom: 20px;
    line-height: 1.8;
}

/* Utility */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .header-right {
        text-align: center;
        margin-top: 5px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-bar ul {
        display: none;
        flex-direction: column;
    }
    
    .nav-bar ul.active {
        display: flex;
    }
    
    .nav-bar li a {
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-bar li .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: #DEE3EF;
    }
    
    .nav-bar li:hover .dropdown {
        display: block;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .sidebar-left,
    .sidebar-right {
        width: 100%;
    }
    
    .sidebar-left .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .sidebar-left .sidebar-nav li a {
        padding: 6px 10px;
        border: 1px solid #e0e0e0;
        border-radius: 3px;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-item img {
        width: 100%;
        max-width: 300px;
    }
    
    .iap-member {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .data-table {
        font-size: 11px;
    }
    
    .data-table th, .data-table td {
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 14px;
    }
    
    .page-title {
        font-size: 14px;
    }
    
    .content-page h2 {
        font-size: 16px;
    }
}

/* Read More Link */
.read-more {
    display: inline-block;
    margin-top: 5px;
    font-size: 12px;
    color: #506FAD;
    font-weight: bold;
}

/* Print Styles */
@media print {
    .nav-bar, .menu-toggle, .sidebar-left, .sidebar-right, .footer, .slogan-bar, .breadcrumb {
        display: none;
    }
    .main-content {
        display: block;
    }
    .content-area {
        width: 100%;
    }
}
