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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    font-size: 18px;
    overflow-x: hidden;
}

/* iGEM Color Variables */
:root {
    --igem-dark-green: #EEEBE5;
    --igem-medium-green: #EEEBE5;
    --igem-light-green: #253f6e;
    --igem-grey-green: #5a6b4a;
    --igem-gray-100: #f5f5f5;
    --igem-white: #ffffff;
    --igem-black: #1a1a1a;
    --accessibility-blue: #4a90e2;
}

/* Top Navigation */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--igem-dark-green);
    padding: 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.logo img {
    height: 48px;
    width: 112px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.logo:hover img {
    opacity: 1;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--igem-grey-green);
    color: white;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 576px;

    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: -256px;
    left: 0;
    width: 100%;
    height: 1088px;
    z-index: 20;
}

.hero-bg-image {
    width: 100%;
    height: 93%;
    /* object-fit: cover; */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(122, 122, 122, 0.4); /* negru semi-transparent */
  /* background-image: url('https://static.igem.wiki/teams/5246/svg/page-background.svg'); */
  background-color: #EEEBE5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%234B74A0' stroke-width='1'%3E%3Cpath d='M769 229L1037 260.9M927 880L731 737 520 660 309 538 40 599 295 764 126.5 879.5 40 599-197 493 102 382-31 229 126.5 79.5-69-63'/%3E%3Cpath d='M-31 229L237 261 390 382 603 493 308.5 537.5 101.5 381.5M370 905L295 764'/%3E%3Cpath d='M520 660L578 842 731 737 840 599 603 493 520 660 295 764 309 538 390 382 539 269 769 229 577.5 41.5 370 105 295 -36 126.5 79.5 237 261 102 382 40 599 -69 737 127 880'/%3E%3Cpath d='M520-140L578.5 42.5 731-63M603 493L539 269 237 261 370 105M902 382L539 269M390 382L102 382'/%3E%3Cpath d='M-222 42L126.5 79.5 370 105 539 269 577.5 41.5 927 80 769 229 902 382 603 493 731 737M295-36L577.5 41.5M578 842L295 764M40-201L127 80M102 382L-261 269'/%3E%3C/g%3E%3Cg fill='%23253F6E'%3E%3Ccircle cx='769' cy='229' r='5'/%3E%3Ccircle cx='539' cy='269' r='5'/%3E%3Ccircle cx='603' cy='493' r='5'/%3E%3Ccircle cx='731' cy='737' r='5'/%3E%3Ccircle cx='520' cy='660' r='5'/%3E%3Ccircle cx='309' cy='538' r='5'/%3E%3Ccircle cx='295' cy='764' r='5'/%3E%3Ccircle cx='40' cy='599' r='5'/%3E%3Ccircle cx='102' cy='382' r='5'/%3E%3Ccircle cx='127' cy='80' r='5'/%3E%3Ccircle cx='370' cy='105' r='5'/%3E%3Ccircle cx='578' cy='42' r='5'/%3E%3Ccircle cx='237' cy='261' r='5'/%3E%3Ccircle cx='390' cy='382' r='5'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none; /* ca să nu blocheze clicuri */
}

.hero-content {
    position: relative;
    z-index: 30;
    text-align: center;
    margin-top: 80px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: var(--igem-light-green);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.hero-circle {
    position: absolute;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    overflow: hidden;
}

.hero-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main Layout */
.main-layout {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 4fr 1fr;
    gap: 32px;
    padding: 16px 8px;
    /* background-color: var(--igem-gray-100); */
    min-height: calc(100vh - 656px);
     /* background-color: #EEEBE5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%234B74A0' stroke-width='1'%3E%3Cpath d='M769 229L1037 260.9M927 880L731 737 520 660 309 538 40 599 295 764 126.5 879.5 40 599-197 493 102 382-31 229 126.5 79.5-69-63'/%3E%3Cpath d='M-31 229L237 261 390 382 603 493 308.5 537.5 101.5 381.5M370 905L295 764'/%3E%3Cpath d='M520 660L578 842 731 737 840 599 603 493 520 660 295 764 309 538 390 382 539 269 769 229 577.5 41.5 370 105 295 -36 126.5 79.5 237 261 102 382 40 599 -69 737 127 880'/%3E%3Cpath d='M520-140L578.5 42.5 731-63M603 493L539 269 237 261 370 105M902 382L539 269M390 382L102 382'/%3E%3Cpath d='M-222 42L126.5 79.5 370 105 539 269 577.5 41.5 927 80 769 229 902 382 603 493 731 737M295-36L577.5 41.5M578 842L295 764M40-201L127 80M102 382L-261 269'/%3E%3C/g%3E%3Cg fill='%23253F6E'%3E%3Ccircle cx='769' cy='229' r='5'/%3E%3Ccircle cx='539' cy='269' r='5'/%3E%3Ccircle cx='603' cy='493' r='5'/%3E%3Ccircle cx='731' cy='737' r='5'/%3E%3Ccircle cx='520' cy='660' r='5'/%3E%3Ccircle cx='309' cy='538' r='5'/%3E%3Ccircle cx='295' cy='764' r='5'/%3E%3Ccircle cx='40' cy='599' r='5'/%3E%3Ccircle cx='102' cy='382' r='5'/%3E%3Ccircle cx='127' cy='80' r='5'/%3E%3Ccircle cx='370' cy='105' r='5'/%3E%3Ccircle cx='578' cy='42' r='5'/%3E%3Ccircle cx='237' cy='261' r='5'/%3E%3Ccircle cx='390' cy='382' r='5'/%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
    background-size: cover; */
}

/* Background Pattern */
.background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
    pointer-events: none;
    overflow: hidden;
}

.pattern-image {
    position: absolute;
    top: 416px;
    left: -635px;
    width: 3814px;
    height: 3648px;
    transform: scale(1.5);
    opacity: 0.1;
}

/* Left Sidebar */
.left-sidebar {
    position: relative;
    z-index: 40;
}

.sidebar-nav {
    position: fixed;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 256px;
    background-color: var(--igem-white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px;
    max-height: 80vh;
    overflow-y: auto;
}

.section-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--igem-black);
    font-size: 18px;
    font-weight: 400;
    transition: all 0.3s ease;
    cursor: pointer;
    color: black !important;
}

.nav-item:hover {
    background-color: var(--igem-gray-100);
    color: var(--igem-black);
}

.nav-item.active {
    background-color: var(--igem-gray-100);
    font-weight: 700;
}

.nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transform: scale(1.5);
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 40;
    padding: 0 24px;
}

.content-card {
    background-color: var(--igem-white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 24px;
    margin-bottom: 32px;
}

/* Right Sidebar */
.right-sidebar {
    position: relative;
    z-index: 40;
}

/* Content Sections */
.content-section {
    margin-bottom: 32px;
    text-align: justify;
}

.content-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--igem-black);
    margin-bottom: 16px;
}

.section-content {
    font-size: 18px;
    line-height: 1.7;
    color: var(--igem-black);
}

.section-content p {
    margin-bottom: 16px;
}

.section-content strong {
    font-weight: 600;
}

.section-content em {
    font-style: italic;
    color: #6c757d;
}

.section-content a {
    color: #007bff;
    text-decoration: none;
}

.section-content a:hover {
    text-decoration: underline;
}

/* Image Containers */
.image-container {
    margin: 24px 0;
    text-align: center;
}

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

.image-caption {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
    margin-top: 8px;
    text-align: center;
}

.image-caption b {
    font-weight: 600;
}

/* References */
.references-list {
    counter-reset: reference-counter;
    list-style: decimal;
    list-style-position: inside;
    padding-left: 0;
    word-break: break-words;
    white-space: normal;
}

.references-list li {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.references-list li em {
    font-style: italic;
}

.references-list li a {
    color: #007bff;
    text-decoration: none;
}

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

/* Accessibility Panel */
.accessibility-panel {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 60;
}

.accessibility-toggle {
    background: transparent;
    border: none;
    padding: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 80px;
    height: 80px;
    border-radius: 8px;
}

.accessibility-toggle:hover {
    transform: scale(1.05);
}

.accessibility-toggle img {
    width: 56px;
    height: 56px;
}

.accessibility-content {
    position: fixed;
    top: 0;
    left: -321px;
    width: 321px;
    height: 100vh;
    background-color: #d3d3d3;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 9999;
    pointer-events: auto;
}

.accessibility-content.active {
    left: 0;
}

.accessibility-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: var(--accessibility-blue);
    margin-bottom: 8px;
}

.accessibility-header h4 {
    color: white;
    font-weight: 700;
    font-size: 20px;
    margin: 0;
}

.close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.accessibility-section {
    background-color: white;
    border-radius: 12px;
    margin: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    text-align: center;
}

.section-header img {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.section-header h5 {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.option-buttons {
    display: flex;
    background-color: rgba(96, 165, 250, 0.6);
    border-radius: 8px;
    padding: 4px;
    margin: 0 12px 12px;
}

.option-btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
}

.option-btn.active {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.option-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.5);
}

.reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 24px);
    margin: 12px;
    padding: 12px;
    background-color: var(--accessibility-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.reset-btn:hover {
    background-color: #3a7bc8;
}

.reset-btn img {
    width: 20px;
    height: 20px;
}

/* Footer */
.footer {
    position: relative;
    width: 100%;
    background-color: var(--igem-black);
    z-index: 50;
    margin-top: 40px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 0 56px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.footer-logo {
    width: 320px;
    padding: 0 40px;
}

.footer-logo img {
    width: 240px;
    height: 244px;
    object-fit: contain;
}

.footer-sponsors {
    padding: 0 40px;
}

.footer-sponsors h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 16px;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: center;
    padding: 0 40px;
}

.sponsors-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.sponsors-grid a:hover {
    opacity: 0.8;
}

.sponsors-grid img {
    max-width: 173px;
    height: auto;
    object-fit: contain;
}

.footer-bottom {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--igem-grey-green);
    padding: 16px 0;
}

.footer-text {
    text-align: center;
    font-size: 14px;
    color: white;
    margin-bottom: 16px;
    padding: 0 40px;
}

.footer-text a {
    color: white;
    font-weight: 600;
    text-decoration: none;
}

.footer-text a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 16px;
    padding: 0 40px;
}

.social-links a {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 1;
}

.social-links img {
    width: 40px;
    height: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 0.8fr 7fr 1.2fr;
    }

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

    .sidebar-nav {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .main-layout {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .left-sidebar,
    .right-sidebar {
        display: none;
    }

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

    .hero-circle {
        width: 300px;
        height: 300px;
        top: 138px;
    }

    .content-card {
        padding: 16px;
    }

    .content-section h2 {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .sponsors-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-circle {
        width: 200px;
        height: 200px;
        top: 188px;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .sponsors-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Print Styles */
@media print {

    .top-nav,
    .accessibility-panel,
    .footer {
        display: none;
    }

    .hero-section {
        background: none;
        color: #333;
        border-bottom: 2px solid #333;
    }

    .main-layout {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .image-container img {
        max-width: 100%;
        box-shadow: none;
    }
}