/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
    animation: fadeInBody 0.6s ease-out;
}

a {
    text-decoration: none;
    color: #0077cc;
    transition: color 0.3s ease;
}

    a:hover {
        color: #005fa3;
    }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Animations */
@keyframes fadeInBody {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem;
    animation: slideUp 0.5s ease-in;
}

/* Header */



.header-link {
    width: 100vw;
    height: 300px;
    overflow: hidden; /* hide anything outside */
    margin: 0;
    padding: 0;
}

.pharma-header {
    width: 100vw;
    height: 300px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    background-color: #fff; /* Optional fallback color */
}

    .pharma-header img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* Show entire image */
        object-position: top center; /* Align to top */
        display: block;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

/* Hover effect on image inside the link */
.header-link:hover img {
    transform: scale(1.02);
    opacity: 0.95;
}


.header-link:hover .pharma-header {
    transform: scale(1.02);
    opacity: 0.95;
}

@media (max-width: 900px) {
    .header-image {
        max-height: 200px;
    }
}

/* Navigation */
.pharma-nav {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 0.6rem 1.2rem;
    background-color: #1e40af;
    color: #ffffff;
    text-decoration: none;
    border-radius: 9999px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

    .nav-btn:hover {
        background-color: #3b82f6;
        transform: translateY(-2px);
    }

/* Main Content */
.site-main {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin: 0 auto 2rem;
    animation: fadeIn 0.5s ease;
}

/* Headings */
h1, h2, h3, h4 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e3a5f;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
}

/* Blog Post List */
.blog-post-list {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-group-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease-in-out;
}

    .list-group-item:hover {
        box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    }

/* Post Card */
.post-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    background: #fff;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s;
}

    .post-card:hover {
        background-color: #f9f9f9;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .post-card img {
        flex-shrink: 0;
        width: 150px;
        height: 100px;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

/* Post Content */
.post-content {
    flex: 1;
}

    .post-content h2 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .post-content p {
        font-size: 0.95rem;
        color: #555;
        line-height: 1.4;
        margin: 0;
    }

.subtitle {
    font-style: italic;
    color: #666;
    margin-bottom: 0.5rem;
}

/* Tag Styles */
.post-tags .tag,
.tag-link,
.custom-tag-wrapper .tag {
    display: inline-block;
    background-color: #eee;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    margin-right: 0.3rem;
    font-size: 0.85rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

    .post-tags .tag:hover,
    .tag-link:hover,
    .custom-tag-wrapper .tag:hover {
        background-color: #ddd;
    }

/* Blog Summary Grid */
.blog-summary-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-summary-item {
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease-in-out;
}

    .blog-summary-item:hover {
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }

.post-summary-thumb img,
.post-summary-content {
    display: block;
}

.post-summary-content {
    padding: 1rem;
}

.post-summary h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.post-summary .subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

/* Search Form */
.widget-search-form {
    display: flex;
    justify-content: center;
    margin: 3rem auto;
    padding: 0 1rem;
}

    .widget-search-form .widget-body {
        flex: 1;
        max-width: 720px;
    }

    .widget-search-form .input-group {
        display: flex;
        width: 100%;
    }

    .widget-search-form input.form-control {
        flex: 1;
        border-radius: 8px 0 0 8px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border: 1px solid #ccc;
    }

    .widget-search-form .btn {
        border-radius: 0 8px 8px 0;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        background-color: #0077cc;
        color: white;
        border: none;
        transition: background-color 0.2s ease;
    }

        .widget-search-form .btn:hover {
            background-color: #005fa3;
        }

/* Footer */
.site-footer {
    background-color: #1e1e2f;
    color: white;
    padding: 20px 40px;
    font-size: 14px;
    margin-top: 40px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-right a {
    margin-left: 20px;
    color: #bbb;
    text-decoration: none;
    transition: color 0.2s;
}

    .footer-right a:hover {
        color: white;
    }


/* Buttons */
.button, .btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 5px;
    background-color: #0077cc;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

    .button:hover, .btn:hover {
        background-color: #005fa3;
        transform: scale(1.05);
    }

/* Utility - hide .name labels */
.field > .name {
    display: none !important;
}

/* Taxonomy Tag Links */
.taxonomy-tag-term {
    color: #007acc;
    text-decoration: none;
    margin-right: 8px;
    font-weight: 500;
    transition: text-decoration 0.2s;
}

    .taxonomy-tag-term:hover {
        text-decoration: underline;
    }


.field.field-type-mediafield.field-name-blog-post-image {
    max-height: auto;
    overflow: hidden;
}

    .field.field-type-mediafield.field-name-blog-post-image img {
        max-height: 300px;
        object-fit: fill;
        width: 100%;
        display: block;
    }

/* Sidebar */

#overlay-bg {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    z-index: 999;
}

    /* Show when sidebar is open */
    #overlay-bg.show {
        display: block;
    }

/* Sidebar container */
/* Base sidebar style */
.sidebar {
    width: 250px;
    background-color: darkblue;
    height: 100vh;
    padding: 1rem;
    position: fixed;
    left: 0;
    top: 0;
    transition: transform 0.3s ease-in-out;
    z-index: 1000;

}
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh; /* Full viewport height */
    background-color: darkblue;
    z-index: 1000;
    overflow-y: auto;
}


/* Hide by default on mobile */
@media (max-width: 1368px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.expanded {
            transform: translateX(0);
        }

    .open-btn {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        background-color: #0078d4;
        color: white;
        border: none;
        padding: 0.7rem 1rem;
        border-radius: 8px;
        font-size: 1.2rem;
    }

    .toggle-btn {
        display: none; /* hide inner toggle on mobile */
    }
}

/* Desktop override */
@media (min-width: 1368px) {
    #sidebar {
        width: 250px !important;
        height: 100vh;

    }
    .content-area {
        margin-left: 250px;
    }
    .link-text {
        opacity: 1 !important;
        background-color: transparent !important;
    }

    .sidebar-links {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .toggle-btn,
    .open-btn,
    #overlay-bg {
        display: none !important; /* Hide mobile-only elements */
    }

    .content-area {
        margin-left: 250px;
    }
}

.sidebar-links {
  
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

    .sidebar-links a {
        color: white;
        padding: 10px 20px;
        text-decoration: none;
        display: flex;
        align-items: center;
        transition: background 0.2s;
       
    }

        .sidebar-links a:hover {
            background-color: #2f2f3f;
        }

/* Hide link text when collapsed */
.link-text {
    margin-left: 10px;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Show link text when expanded */
.sidebar.expanded .link-text {
    opacity: 1;
    background-color: #2f2f3f;
}


/* Layout wrapper for sidebar + content */
.layout-wrapper {
    display: flex;
    background-color: #2f2f3f;
}

/* Main content area beside sidebar */
.content-area {
    margin-left: 60px; /* match default sidebar width */
    flex: 1;
    transition: margin-left 0.3s;
}

/* When sidebar is expanded */
.sidebar.expanded ~ .content-area {
    margin-left: 200px; /* match expanded width */
}


#event-list-container.collapsed #event-list {
    display: none;
}
/* collapsed event list */

#event-list-container {
    position: fixed;
    top: 0;
    right: 0;
    height: auto;
    overflow-wrap: break-word;
    box-sizing: border-box;
    background: lavender;
    border-left: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    font-family: sans-serif;
    border-radius: 20px;
    margin: 1rem;
    padding: 0.5rem;
    transition: width 0.3s ease;
}

#event-list-container.expanded {
    width: 75%;
    max-width: 400px;
}

#event-list-container.collapsed {
    width: 60px; /* looks like a button */
    overflow: hidden;
    background-color: lightcoral;
}

.content-blog-post {
    overflow: visible !important; /* ensures nothing gets clipped */
    height: auto !important; /* allows the image to grow naturally */
    max-height: none !important; /* disables max-height limit */
}