/* STPEG Site Styles - Medical, Professional, Child & Family Friendly */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global heading styles for better spacing */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    color: #1a237e; /* Dark blue for authority */
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.7rem; }
h4 { font-size: 1.4rem; }

/* First heading in a section should have less top margin */
.about-section h1:first-child,
.about-section h2:first-child,
.about-section h3:first-child,
.event-header h1:first-child,
.event-header h2:first-child,
.schedule h1:first-child,
.schedule h2:first-child {
    margin-top: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: #37474f; /* Dark grey for readability */
    background-color: #fafbfc;
    font-weight: 400;
    font-size: 16px;
}

/* First heading in a section should have less top margin */
.about-section h1:first-child,
.about-section h2:first-child,
.about-section h3:first-child,
.event-header h1:first-child,
.event-header h2:first-child,
.schedule h1:first-child,
.schedule h2:first-child {
    margin-top: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #333333;
    background-color: #fafbfc;
    font-weight: 400;
}

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: white;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.site-header .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #1a237e; /* Dark blue */
}

.navbar-logo {
    height: 50px;
    width: auto;
}

.site-title .title-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.site-title .title-text .main-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.site-title .title-text .sub-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    color: #616161; /* Lighter color */
    font-weight: 400;
}

.site-nav {
    margin-top: 0;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.site-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    
}

.site-nav a {
    color: #1a237e; /* Dark blue */
    text-decoration: none;
    font-weight: 600;
    
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.site-nav a:hover {
    border-bottom-color: #ff8f00; /* Orange accent */
}

.site-nav .nav-divider {
    border-left: 2px solid #ff8f00; /* Orange accent */
    height: 20px;
    align-self: center;
}

/* Main Content */
.page-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero-section {
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 0;
    margin-bottom: 3rem;
    border: 1px solid #e0e0e0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero-logo-container {
    text-align: right;
}

.hero-logo {
    max-width: 270px; /* Larger still */
    height: auto;
    display: inline-block;
}

.hero-text-container {
    text-align: left;
}

.hero-title {
    font-size: 3.5rem;
    color: #1a237e;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.hero-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.4rem;
    color: #546e7a;
    font-weight: 400;
    margin: 0;
}

/* Sections */
.about-section {
    background: white;
    padding: 2.5rem;
    border-radius: 0; /* Square corners */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2.5rem;
    border-left: 4px solid #4caf50;
}

.about-section h2 {
    color: #2e7d32;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #81c784;
    padding-bottom: 0.8rem;
    font-weight: 600;
    font-size: 1.8rem;
    letter-spacing: -0.01em;
}

.about-section p {
    margin-bottom: 1.2rem;
    color: #424242;
}

.about-section ul {
    padding-left: 1.5rem;
    margin: 1.5rem 0;
}

.about-section li {
    margin-bottom: 0.8rem;
    color: #424242;
    line-height: 1.6;
}

/* Quick Links Grid */
.quick-links {
    margin-top: 3rem;
}

.quick-links h2 {
    color: #1a237e;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.8rem;
    text-align: center;
}

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

.link-card {
    background: white;
    padding: 2rem;
    border-radius: 0; /* Square corners */
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    border-top: 4px solid #ff8f00; /* Orange accent */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-top-color: #e65100;
}

.link-card h3 {
    font-family: 'Roboto Slab', serif;
    color: #1a237e;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 1.3rem;
}

.link-card h3 .icon {
    color: #1a237e;
    margin-right: 0.5rem;
}

.link-card p {
    color: #546e7a;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Event Page Styles */
.event-page .event-header {
    background: white;
    padding: 3rem 2rem;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.event-page .event-header h1 {
    color: #1a237e;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.event-page .event-header .event-date {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.2rem;
    color: #546e7a;
    margin-bottom: 1.5rem;
}

.event-page .event-location, .event-page .event-host {
    font-size: 1.1rem;
    color: #37474f;
    margin-bottom: 0.5rem;
}

.event-page .event-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Schedule Styles */
.schedule {
    background: #f5f7f9;
    padding: 3rem 2rem;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.schedule h2 {
    text-align: center;
    color: #1a237e;
    margin-top: 0;
    margin-bottom: 2.5rem;
}

.schedule-table {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e0e0e0;
}

.schedule-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-time {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    color: #e65100; /* Orange for time */
    font-size: 1rem;
    text-align: right;
}

.schedule-content strong {
    font-family: 'Roboto Slab', serif;
    color: #1a237e;
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.schedule-content em {
    font-style: normal;
    color: #37474f;
}

.schedule-content small {
    color: #546e7a;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 0; /* Square corners */
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: 1px solid transparent;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

/* Speaker Styles */
.speaker-header {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.speaker-title {
    color: #2e7d32;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.speaker-hospital {
    color: #7f8c8d;
    font-style: italic;
}

.speaker-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.speaker-specialties {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.speaker-specialties ul {
    list-style: none;
    padding: 0;
}

.speaker-specialties li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.speaker-specialties li:before {
    content: "🔬 ";
    margin-right: 0.5rem;
}

.sponsor-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.sponsor-logo {
    max-width: auto;
    height: 50px;
}

/* Event Cards */
.current-event-card {
    background: white;
    padding: 2rem;
    border-radius: 0%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-left: 5px solid #4caf50;
}

.past-events {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.past-event-card {
    background: white;
    border-radius: 0px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.past-event-banner {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.past-event-banner h3 {
    margin-bottom: 0.5rem;
}

.past-event-banner a {
    color: white;
    text-decoration: none;
}

/* Host Pack Styles */
.host-pack h2 {
    color: #2e7d32;
    margin: 2.5rem 0 1.5rem 0;
    border-bottom: 2px solid #81c784;
    padding-bottom: 0.8rem;
    font-weight: 600;
}

.host-pack h3 {
    color: #e65100;
    margin: 2rem 0 1.2rem 0;
    font-weight: 600;
}

.host-pack ul {
    padding-left: 0;
    list-style: none;
}

.host-pack li {
    background: white;
    margin: 0.8rem 0;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    border-left: 4px solid #ff9800;
}

/* Certificate Styles */
.certificate-container {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.certificate {
    border: 8px solid #2e7d32;
    padding: 2rem;
    text-align: center;
    background: #fefefe;
}

.certificate-header {
    margin-bottom: 2rem;
}

.certificate-header h1 {
    color: #2e7d32;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.logo-placeholder {
    width: 100px;
    height: 100px;
    background: #4caf50;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto;
    font-size: 1.5rem;
    font-weight: bold;
}

.name-field {
    margin: 2rem 0;
}

.name-input {
    border: none;
    border-bottom: 3px solid #2e7d32;
    background: transparent;
    font-size: 2rem;
    text-align: center;
    padding: 0.5rem;
    min-width: 300px;
    color: #2e7d32;
    font-weight: bold;
}

.event-title {
    color: #2c3e50;
    font-size: 2.5rem;
    margin: 1rem 0;
}

.event-date, .event-location {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin: 0.5rem 0;
}

.certificate-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
}

.signature-line, .date-line {
    border-bottom: 2px solid #2c3e50;
    width: 200px;
    margin-bottom: 0.5rem;
}

.certificate-controls {
    text-align: center;
    margin-top: 2rem;
}

/* Disabled Notice */
.disabled-notice {
    background: #f39c12;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 2rem;
}

/* QR Code Styles */
.qr-code-container {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.qr-code {
    width: 200px;
    height: 200px;
    background: #ecf0f1;
    display: block;
    margin: 0 auto 1rem auto;
    border-radius: 10px;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-meta {
    text-align: right;
    font-size: 0.9rem;
}

.footer-meta code {
    background: #34495e;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Admonition/Notice Styles */
.notice {
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0;
    border-left: 5px solid;
    background-color: #f8f9fa;
}

.notice p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.notice-important {
    border-color: #ff8f00; /* Orange for important */
    background-color: #fff8e1;
}

.notice-important p {
    color: #e65100;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-nav {
        float: none;
        margin-top: 1rem;
    }
    
    .site-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .event-meta {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .schedule-item {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .link-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .link-card {
        padding: 1.5rem;
    }
    
    .past-events {
        grid-template-columns: 1fr;
    }
    
    .about-section,
    .schedule {
        padding: 1.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .site-header .wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        width: 100%;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #1a237e;
        font-size: 1.5rem;
        cursor: pointer;
        position: absolute;
        top: 25px;
        right: 20px;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #ffffff;
        padding: 0;
        margin: 1rem 0 0 0;
        list-style: none;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .nav-list.nav-open {
        display: flex;
    }

    .site-nav li {
        padding: 1rem;
        border-bottom: 1px solid #e0e0e0;
        width: 100%;
        text-align: left;
    }

    .site-nav li:last-child {
        border-bottom: none;
    }

    .nav-divider {
        display: none;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
    }

    .hero-logo {
        margin-bottom: 1rem;
    }

    .hero-text-container {
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-logo {
        max-width: 200px;
    }

    .event-cards {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-meta {
        margin-top: 1rem;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .nav-list {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        list-style: none;
        padding: 0;
        margin: 0;
    }
}

/* Print Styles */
@media print {
    .site-header, .site-footer, .certificate-controls {
        display: none;
    }
    
    .certificate-container {
        margin: 0;
        box-shadow: none;
    }
    
    body {
        background: white;
    }
}
