/* Reset and base styles */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7fb;
    color: #222;
}

a {
    color: #0056b3;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* Sidebar styling */
.sidebar {
    height: 100%;
    width: 200px;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #1e3a5f;
    padding-top: 30px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    text-align: center;
    margin-bottom: 15px;
}

.sidebar ul li a {
    color: white;
    padding: 12px;
    display: block;
    font-weight: bold;
    transition: background 0.3s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background-color: #2c4f7a;
}

/* Main content */
.main-content {
    margin-left: 220px;
    padding: 40px;
    background-color: #fff;
    min-height: 100vh;
}

.profile-photo {
    display: block;
    margin: 0 auto 20px auto;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 1.5px solid #1e3a5f;
}

h1, h2 {
    text-align: center;
    margin: 5px 0;
}

.contact-info {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #333;
    font-size: 15px;
}

h3 {
    margin-top: 40px;
    color: #1e3a5f;
    font-size: 24px;
}

hr {
    border: none;
    height: 1px;
    background-color: #ccc;
    margin: 30px 0;
}

.about-text p {
    text-align: justify;
    line-height: 1.65;
}

.about-text {
    max-width: 100%; /* was 'flex' */
    margin: 0 auto;
}


/* Flex layout for research page if needed elsewhere */
.research-flex {
    display: flex;
    flex-wrap: wrap;
}

/* -------- Slideshow -------- */

.slideshow-container {
    margin: 0 auto 32px auto;
    max-width: 100%; /* was 'flex' */
    aspect-ratio: 16 / 6.5;
    max-height: 350px;
    background-color: #f7f8fb;
    border: 1px solid #d4d9e5;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

#slideshow {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slideshow-controls {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    padding: 3px 8px;
    display: inline-flex;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.slideshow-controls button {
    background: transparent;
    border: 1px solid #c4cad8;
    color: #1e3a5f;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.slideshow-controls button:hover {
    background: #e6ecf8;
    border-color: #1e3a5f;
}

/* Right-side content */
.research-text {
    flex: 1;
    min-width: 300px;
}

/* Sub-tab menu */
.subtab-menu {
    margin-bottom: 20px;
    text-align: center;
}

.subtab {
    background-color: #e6eef9;
    color: #1e3a5f;
    border: 1px solid #ccc;
    padding: 8px 16px;
    margin: 3px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.2s;
}

.subtab:hover {
    background-color: #cddff4;
}

.active-subtab {
    background-color: #1e3a5f;
    color: white;
    border-color: #1e3a5f;
}

/* Sub-tab content */
.tab-section {
    display: none;
    margin-top: 20px;
}

/* ---------- Research projects: two column grid ---------- */
.research-section-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 45px;
    margin-bottom: 15px;
}

.research-blue {
    color: #b4690e;
}

.research-green {
    color: #176d45;
}

.research-purple {
    color: #5a3e9b;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 12px;
    margin-bottom: 24px;
}

/* Alternating subtle variant for contrast */
.project-grid .project-box:nth-child(even) {
    background: #eef2f8;
    border-color: #e2e6f2;
}

/* Base style for all cards */
.project-box {
    background: #f7f9ff;
    border: 1px solid #d6dcea;
    border-radius: 6px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Hover effect stays the same for both */
.project-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.project-box-title {
    font-weight: bold;
    color: #1e3a5f;
    margin-bottom: 4px;
}

.project-box-role {
    font-size: 0.9em;
    color: #555;
    margin-top: 6px;
}

/* Generic project list */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* Student supervision layout */

.students-intro {
    max-width: 100%;   /* was 'flex' */
    line-height: 1.6;
    margin-top: 8px;
    margin-bottom: 18px;
    text-align: justify;
}

.student-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 20px;
    max-width: 100%;   /* was 'flex' */
}

.student-group {
    flex: 1;
    min-width: 280px;
    background: #f9faff;
    border: 1px solid #dde3f1;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Teaching section */
.teaching-intro {
    max-width: 100%;   /* was 'flex' */
    line-height: 1.65;
    text-align: justify;
    margin-bottom: 18px;
}


/* -------- Collaborators section -------- */

.collab-intro {
    max-width: 100%;   /* was 'flex' */
    line-height: 1.6;
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: justify;
}

.collab-highlights {
    max-width: 100%;   /* was 'flex' */
    margin-top: 12px;
    margin-bottom: 18px;
    padding-left: 18px;
    list-style-type: disc;
    line-height: 1.6;
    text-align: justify;
}

.collab-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(450px, 1fr));
    gap: 20px;
    margin-top: 18px;
    max-width: 100%;   /* was 'flex' */
    margin-left: 0;
    margin-right: 0;
}

.collab-card {
    background: #f7f9ff;
    border: 1px solid #d6dcea;
    border-radius: 6px;
    padding: 12px 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* alternating colors for collaborator cards */
.collab-grid .collab-card:nth-child(even) {
    background: #eef2f8;
    border-color: #c8d0e0;
}

.collab-name {
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 4px;
}

.collab-focus {
    font-size: 0.95rem;
    color: #444;
    text-align: justify;
}


/* ---------- Publications tab layout ---------- */
.publications-wrapper {
    max-width: 100%;   /* was 'flex' */
    margin: 0 auto;
    padding-left: 10px;
}

.pub-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-top: 30px;
    margin-bottom: 10px;
}

.pub-list {
    list-style-type: disc;
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
    text-align: justify;
}

/* Highlight Dr. Azab in publication lists */
.author-azab {
    font-weight: 700;
    text-decoration: underline;
    color: #1e3a5f;
}

#pubs .research-blue {
    color: #1e3a5f;
}

#pubs .research-green {
    color: #176d45;
}

#pubs .research-purple {
    color: #5a3e9b;
}

/* -------- Technical hobbies base layout -------- */

.hobby-intro {
    max-width: 100%;   /* was 'flex' */
    line-height: 1.6;
    text-align: justify;
    margin-top: 8px;
    margin-bottom: 18px;
}


/* Generic card */
.hobby-card {
    background: #f9faff;
    border: 1px solid #dde3f1;
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    margin-bottom: 16px;
}

.hobby-title {
    font-weight: 600;
    color: #1e3a5f;
    display: block;
    margin-bottom: 6px;
}

.hobby-desc {
    text-align: justify;
    line-height: 1.6;
    margin-top: 6px;
    margin-bottom: 10px;
}

/* Media wrappers */
.hobby-media {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

/* Video */
.hobby-video {
    display: block;
    margin: 12px 0 18px 0;
    max-width: 100%;   /* was 'flex' */
    width: 50%;
    border-radius: 8px;
    border: 2px solid #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Slider container */
.hobby-slider {
    max-width: 100%;   /* was 'flex' */
    margin: 12px 0 24px 0;
    position: relative;
}

/* Slider image */
.hobby-slider img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* Arrow wrapper */
.slider-wrapper {
    position: relative;
    display: inline-block;
}

/* Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #1e3a5f;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.slider-arrow:hover {
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.slider-arrow.prev {
    left: 6px;
}

.slider-arrow.next {
    right: 6px;
}

/* -------- Electronics inner tabs (side layout) -------- */

.inner-subtab-menu {
    text-align: center;
    margin-top: 12px;
    margin-bottom: 18px;
}

.inner-subtab {
    background-color: #eef3ff;
    color: #1e3a5f;
    border: 1px solid #c4cce5;
    padding: 6px 14px;
    margin: 3px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.inner-subtab:hover {
    background-color: #dbe5ff;
}

.inner-active-subtab {
    background-color: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
}

.inner-tab-section {
    max-width: 100%;   /* was 'flex' */
    display: none;
}

.inner-tab-section.active-inner {
    display: block;
}

/* -------- Travel / Car side inner layout -------- */

.side-inner-layout {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

/* Left column: vertical tabs */
.side-inner-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
}

.side-inner-tab {
    background-color: #ffffff;
    color: #1e3a5f;
    border: 1px solid #c4cce5;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: background 0.15s ease, color 0.15s ease,
                border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Different accents */
.side-inner-tab:nth-child(1) {
    border-left: 4px solid #1e3a5f;
}
.side-inner-tab:nth-child(2) {
    border-left: 4px solid #176d45;
}

.side-inner-tab:hover {
    background-color: #f3f5ff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.10);
}

.side-active-inner-tab {
    background-color: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
}

/* Right column: content */
.side-inner-content {
    flex: 1;
}

.side-inner-section {
    max-width: 100%;   /* was 'flex' */
    display: none;
}

.side-inner-section.active-side-inner {
    display: block;
}

/* Mobile */
@media (max-width: 800px) {
    .side-inner-layout {
        flex-direction: column;
    }

    .side-inner-menu {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: 0;
    }

    .side-inner-tab {
        flex: 1 1 45%;
        text-align: center;
    }
}

/* -------- Electronics layout: tabs on the side -------- */

.electronics-layout {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

/* Left column: vertical inner tabs */
.inner-subtab-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-self: flex-start;
    min-width: 220px;
}

/* Side tab buttons styled as cards */
.inner-subtab {
    background-color: #ffffff;
    color: #1e3a5f;
    border: 1px solid #c4cce5;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: background 0.15s ease, color 0.15s ease,
                border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Colors by position */
.inner-subtab:nth-child(1) { --c: #f4c542; }
.inner-subtab:nth-child(2) { --c: #f6a98f; }
.inner-subtab:nth-child(3) { --c: #b79dfa; }
.inner-subtab:nth-child(4) { --c: #f3a4c4; }
.inner-subtab:nth-child(5) { --c: #e6c27b; }
.inner-subtab:nth-child(6) { --c: #8bd9b3; }

.inner-subtab {
    border-color: var(--c);
    border-left: 4px solid var(--c);
}

.inner-subtab:hover {
    background-color: #eef2f7;
    box-shadow: 0 3px 8px rgba(0,0,0,0.10);
}

.inner-active-subtab {
    background-color: #1e3a5f;
    color: #ffffff;
    border-color: #1e3a5f;
}

/* Keep decorative left bar visible when active */
.inner-active-subtab:nth-child(1),
.inner-active-subtab:nth-child(2),
.inner-active-subtab:nth-child(3),
.inner-active-subtab:nth-child(4),
.inner-active-subtab:nth-child(5),
.inner-active-subtab:nth-child(6) {
    border-left-color: #ffd45a;
}

/* Right column: content */
.inner-tab-container {
    flex: 1;
}

/* Inner tab sections */
.inner-tab-section {
    display: none;
}

.inner-tab-section.active-inner {
    display: block;
}

/* Mobile: stack vertically */
@media (max-width: 800px) {
    .electronics-layout {
        flex-direction: column;
    }

    .inner-subtab-menu {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: 0;
    }

    .inner-subtab {
        flex: 1 1 40%;
        text-align: center;
    }
}
