body {
    font-family: 'PT Sans', Arial, sans-serif;
    background-color: #fff8f0;
    color: #1c1c1c;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

header {
    background-color: #eca72c;
    color: #1c1c1c;
    padding: 56px 32px;
    text-align: center;
}

.header-bg {
    background-image: url('../images/AdobeStock_1393664097.jpeg');
    background-size: cover;
    background-position: center;
    padding: 100px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
}

header h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}

header p {
    font-size: 15px;
    margin: 16px 0 0 0;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 5px;
    display: inline-block;
}

/* Header Content Layout */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    flex-shrink: 0;
}

.header-logo {
    height: 120px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.title-container {
    text-align: center;
    flex: 1;
}

.title-container h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}

.title-container p {
    font-size: 15px;
    margin: 16px 0 0 0;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 5px;
    display: inline-block;
}

nav {
    background-color: #eca72c;
    padding: 16px 0;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav li {
    margin: 0 10px;
}

nav a {
    color: #1c1c1c;
    text-decoration: none;
    font-weight: 400;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: rgba(28, 28, 28, 0.1);
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #eca72c;
    min-width: 200px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    margin-top: 8px;
}

.dropdown-menu li {
    margin: 0;
    border-bottom: 1px solid rgba(28, 28, 28, 0.1);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: rgba(28, 28, 28, 0.2);
}

.dropdown:hover .dropdown-menu {
    display: block;
}

main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 32px;
}

section {
    margin-bottom: 62px;
}

section h2 {
    font-size: 34px;
    font-weight: 700;
    margin: 48px 0 16px 0;
    text-align: center;
    color: #46342d;
}

section p {
    font-size: 15px;
    color: #515151;
    margin-bottom: 16px;
}

#welcome {
    background-color: #fff8f0;
    padding: 48px;
    border-radius: 8px;
    margin-bottom: 48px;
}

#announcements {
    background-color: #fff8f0;
    padding: 32px;
    border-radius: 8px;
}

#announcements ul {
    list-style-type: square;
    padding-left: 20px;
}

#announcements a {
    color: #14588d;
    text-decoration: underline;
}

.board-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.member {
    text-align: center;
    background-color: #fff8f0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.member:hover {
    transform: translateY(-5px);
}

.member img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid #eca72c;
}

.member h4 {
    margin: 10px 0 5px 0;
    font-size: 18px;
    font-weight: 700;
    color: #46342d;
}

.member p {
    margin: 5px 0;
    font-size: 14px;
    color: #515151;
    line-height: 1.4;
}

.member p:first-of-type {
    font-weight: 600;
    color: #eca72c;
    font-size: 16px;
}

footer {
    background-color: #eca72c;
    color: #1c1c1c;
    text-align: center;
    padding: 16px 0;
    font-size: 12px;
}

/* Additional mobile fixes */
@media only screen and (max-width: 479px) {
    .header-bg {
        padding: 30px 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .header-logo {
        height: 40px;
        max-width: 90%;
        width: auto;
        margin: 0 auto;
        display: block;
    }
    
    .title-container h1 {
        font-size: 24px;
        text-align: center;
    }
    
    .title-container p {
        font-size: 12px;
        text-align: center;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    nav li {
        margin: 5px 0;
    }
    main {
        padding: 32px 16px;
    }
}

@media only screen and (min-width: 480px) and (max-width: 767px) {
    .header-content {
        gap: 20px;
    }
    
    .header-logo {
        height: 80px;
    }
    
    .title-container h1 {
        font-size: 41px;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1279px) {
    .header-content {
        gap: 25px;
    }
    
    .header-logo {
        height: 110px;
    }
    
    .title-container h1 {
        font-size: 48px;
    }
}

/* Conferences page styles */
.conferences-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.conferences-table th, .conferences-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    vertical-align: top;
}

.conferences-table th {
    background-color: #eca72c;
    color: #1c1c1c;
    font-weight: 700;
}

.conferences-table img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.conferences-table h3 {
    font-size: 18px;
    margin: 10px 0;
}

.conferences-table p {
    margin: 5px 0;
}

/* Resources page styles */
.newsletter-list {
    list-style: none;
    padding: 0;
}

.newsletter-list li {
    margin: 10px 0;
}

.newsletter-list a {
    color: #1c1c1c;
    text-decoration: none;
    font-weight: 400;
}

.newsletter-list a:hover {
    text-decoration: underline;
}

/* Conferences page styles */
.program-list {
    list-style: none;
    padding: 0;
}

.program-list li {
    margin: 10px 0;
}

.program-list a {
    color: #1c1c1c;
    text-decoration: none;
    font-weight: 400;
}

.program-list a:hover {
    text-decoration: underline;
}

/* Contact Section Styling */
#contact {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#contact h2 {
    color: #003366;
    border-bottom: 3px solid #003366;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.contact-method {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #003366;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.contact-method h4 {
    color: #003366;
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.contact-method p {
    margin: 5px 0;
    line-height: 1.5;
}

.email-obfuscated {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: monospace;
    color: #856404;
}

.email-obfuscated:hover {
    background: #ffeaa7;
    cursor: pointer;
}

.security-note {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 12px;
    margin-top: 20px;
    font-size: 0.9em;
    color: #0c5460;
}

/* Math Interactive Section */
#math-interactive {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.interactive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.interactive-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    text-align: center;
    transition: transform 0.2s;
}

.interactive-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.interactive-card h3 {
    color: #003366;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.interactive-card p {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.4;
}

.interactive-demo {
    margin-top: 15px;
}

#fractal-canvas, #graph-canvas {
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    margin-bottom: 10px;
}

.prime-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    margin-bottom: 10px;
    max-width: 200px;
    margin: 0 auto;
}

.prime-cell {
    width: 15px;
    height: 15px;
    background: #e9ecef;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    color: #333;
}

.prime-cell.prime {
    background: #28a745;
    color: white;
}

.prime-cell.composite {
    background: #dc3545;
    color: white;
}

.demo-button {
    background: #003366;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.3s;
}

.demo-button:hover {
    background: #005580;
}

.function-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    font-family: monospace;
    font-size: 0.9em;
}

.math-quote {
    font-style: italic;
    color: #003366;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #003366;
    border-radius: 0 5px 5px 0;
    position: relative;
}

.math-quote:before {
    content: '"';
    font-size: 3em;
    color: #003366;
    position: absolute;
    top: -10px;
    left: 10px;
    opacity: 0.3;
}

@media (max-width: 768px) {
    .interactive-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #math-interactive {
        padding: 20px;
    }

    .interactive-card {
        padding: 15px;
    }
}

/* Responsive design for 640px and below */
@media only screen and (max-width: 640px) {
    header {
        padding: 40px 16px;
    }
    .header-bg {
        padding: 60px 10px;
    }
    header h1 {
        font-size: 32px;
    }
    header p {
        font-size: 14px;
    }
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    nav li {
        margin: 5px 0;
    }
    main {
        padding: 24px 12px;
    }
    section h2 {
        font-size: 28px;
    }
    .board-members {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .member {
        margin: 10px 0;
        text-align: center;
    }
    .conferences-table {
        font-size: 14px;
    }
    .conferences-table th, .conferences-table td {
        padding: 5px;
    }
    .newsletter-list, .program-list {
        text-align: center;
    }
}

/* Prime Sieve Grid */
#prime-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    max-width: 300px;
    margin: 0 auto;
}

.prime-cell {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.prime-cell.prime {
    background-color: #eca72c;
    color: white;
    border-color: #d49a23;
}

.prime-cell.composite {
    background-color: #666;
    color: white;
    border-color: #555;
}

/* Math Interactive Section */
#math-interactive {
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.interactive-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.interactive-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.interactive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.interactive-card h3 {
    color: #003366;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.interactive-demo {
    margin-top: 15px;
}

.interactive-demo canvas {
    border: 2px solid #eee;
    border-radius: 8px;
    margin: 10px 0;
    max-width: 100%;
    height: auto;
}

.demo-button {
    background: #eca72c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
    margin: 5px;
}

.demo-button:hover {
    background: #d49a23;
}

.math-quote {
    font-style: italic;
    color: #555;
    margin: 15px 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design for Interactive Elements */
@media (max-width: 768px) {
    .interactive-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .interactive-card {
        padding: 15px;
    }

    .interactive-card h3 {
        font-size: 1.1em;
    }
}