/* Hero Section Styles */
.hero-section {
    min-height: 100vh;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(70px + 5vh) 0 5vh;
}

.hero-image-container {
    width: 50%;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-image {
    width: 100%;
    max-height: 40vh;
    object-fit: contain;
}

@media (max-width: 767px) {
    .hero-section {
        min-height: auto;
        padding: calc(56px + 2rem) 0 2rem;
    }

    .hero-image-container {
        width: 100%;
        margin-top: 1rem;
        padding: 0 15px;
    }

    .hero-image {
        max-height: 25vh;
        width: auto;
        max-width: 100%;
    }

    /* Timeline Mobile Improvements */
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        margin-bottom: 60px;
        position: relative;
        width: 100%;
    }

    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        margin-right: 0 !important;
        position: relative;
    }

    .timeline-dot {
        left: 30px;
        transform: translateX(-50%);
        top: 30px;
    }

    .timeline-year {
        position: absolute;
        left: 60px !important;
        right: auto !important;
        top: -25px !important;
        transform: none !important;
        text-align: left !important;
        background: transparent;
        padding: 0;
        box-shadow: none;
        z-index: 3;
    }

    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        padding: 1.5rem;
        margin-top: 0;
    }

    .timeline-content.timeline-card {
        align-items: flex-start;
        text-align: left;
    }

    .timeline-item:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding-top: calc(56px + 1rem);
    }

    .hero-image-container {
        width: 100%;
        padding: 0 10px;
    }

    .hero-image {
        max-height: 20vh;
        width: auto;
    }

    .display-4 {
        font-size: calc(1.8rem + 1.5vw);
    }

    .lead {
        font-size: 1.1rem;
    }
}

/* Year label for timeline cards */
.timeline-year {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    background: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    z-index: 2;
    transition: transform 0.3s ease;
}

.timeline-content:hover + .timeline-year {
    transform: translateY(-50%) scale(1.05);
}

.timeline-item:nth-child(odd) .timeline-year {
    left: calc(50% + 30px);
    text-align: left;
}

.timeline-item:nth-child(even) .timeline-year {
    right: calc(50% + 30px);
    text-align: right;
}
/* Clean Timeline for About Me Section */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}
.timeline:before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: #e3e3e3;
    z-index: 0;
}
.timeline-item {
    position: relative;
    width: 100%;
    margin-bottom: 60px;
    min-height: 150px;
    display: flex;
}
.timeline-item:nth-child(odd) {
    justify-content: flex-start;
}
.timeline-item:nth-child(odd) .timeline-year {
    left: calc(50% + 30px);
}
.timeline-item:nth-child(even) {
    justify-content: flex-end;
}
.timeline-item:nth-child(even) .timeline-year {
    right: calc(50% + 30px);
}
.timeline-content {
    width: 45%;
    position: relative;
    z-index: 1;
}
.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    box-shadow: 0 0 0 4px #fff;
    z-index: 2;
    transition: transform 0.3s ease;
}

.timeline-content:hover ~ .timeline-dot {
    transform: translate(-50%, -50%) scale(1.2);
}
.timeline-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 2rem;
    width: 45%;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 50px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 50px;
}
.timeline-content.timeline-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.degree-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f8f9fa;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.timeline-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: none;
    box-shadow: none;
}
@media (max-width: 900px) {
    .timeline {
        max-width: 100%;
        padding: 20px 0;
    }
    .timeline-content {
        min-width: 220px;
        max-width: 98vw;
        padding: 1.2rem 1rem;
    }
}
@media (max-width: 767px) {
    .timeline:before {
        left: 16px;
        transform: none;
    }
    .timeline-item {
        flex-direction: column !important;
        margin-bottom: 40px;
    }
    .timeline-dot {
        left: 16px;
        transform: none;
        top: 32px;
    }
    .timeline-content {
        width: 100%;
        margin-left: 40px;
        margin-right: 0;
        padding: 1.2rem 1rem;
    }
}
@media (max-width: 767px) {
    .timeline:before {
        left: 16px;
        transform: none;
    }
    .timeline-item {
        flex-direction: column;
        margin-bottom: 40px;
    }
    .timeline-dot {
        left: 16px;
        transform: none;
    }
    .timeline-content {
        position: relative;
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 40px;
        margin-right: 0;
        padding: 1.5rem 1rem;
    }
}
/* Alternating Slide-in Animations for Degree Cards */
.animate-slide-in-left {
    opacity: 0;
    transform: translateX(-60px);
    animation: slideInLeft 0.7s forwards;
}
.animate-slide-in-right {
    opacity: 0;
    transform: translateX(60px);
    animation: slideInRight 0.7s forwards;
}
.animate-slide-in-left[style*="animation-delay"] {
    animation-delay: 0.4s;
}
.animate-slide-in-right[style*="animation-delay"] {
    animation-delay: 0.2s;
}
@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes slideInRight {
    to {
        opacity: 1;
        transform: none;
    }
}
/* Degree Cards for About Me Section */
.degree-card {
    transition: box-shadow 0.3s;
    border: 1px solid #e3e3e3;
    min-height: 220px;
    position: relative;
    background: #fff;
}
.degree-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #007bff;
}
.degree-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f8f9fa;
    margin-bottom: 1rem;
}

/* Fade-in animation for cards */
.timeline-content {
    position: relative;
    width: 45%;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    padding: 2rem 1.5rem;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    z-index: 1;
    transition: box-shadow 0.3s;
    overflow: hidden;
    word-break: break-word;
}
.timeline-item:nth-child(odd) .timeline-content {
    left: 0;
    margin-right: auto;
    background: linear-gradient(135deg, #f8f9fa 60%, #e3f2fd 100%);
}
.timeline-item:nth-child(even) .timeline-content {
    right: 0;
    margin-left: auto;
    background: linear-gradient(135deg, #f8f9fa 60%, #e8f5e9 100%);
}
.timeline-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: none;
    box-shadow: none;
}
.degree-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f8f9fa;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}


#about, #skills, #projects, #contact {
    padding-top: 80px;
    padding-bottom: 80px;
}

#about { background: #fff; }
#skills { 
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}
#skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
}
#projects { background: #fff; }
#contact { background: #f8f9fa; }

/* Skills Section Specific Styles */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1.5rem 0;
}

.skill-category {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.skill-category h5 {
    color: #1a365d;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.skill-category h5::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #007bff;
}

.skill-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.skill-item:hover {
    background-color: #f8fafc;
}

.skill-icon {
    width: 32px;
    height: 32px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #e1effe 0%, #dbeafe 100%);
}

.skill-text {
    color: #475569;
    font-size: 1rem;
}

footer {
    background: #222;
    color: #fff;
    padding: 1rem 0;
}

/* --- EXPERIENCE SECTION STYLES --- */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.experience-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

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

.experience-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(0%);
    transition: all 0.3s ease;
}

.experience-card:hover .company-logo {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.experience-content {
    flex-grow: 1;
}

.experience-header {
    margin-bottom: 1rem;
}

.experience-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.company {
    display: block;
    color: #007bff;
    font-weight: 500;
    margin: 0.3rem 0;
}

.duration {
    display: block;
    color: #6c757d;
    font-size: 0.9rem;
}

.experience-details {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.experience-details li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.experience-details li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #007bff;
    font-weight: bold;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tags span {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
    border: 1px solid rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .experience-card {
        flex-direction: column;
    }
    
    .experience-icon {
        margin-bottom: 1rem;
    }
}

/* --- PROJECT PAGE STYLES --- */
.project-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 7rem 0 3rem 0; /* Increased top padding to account for fixed navbar */
    margin-bottom: 3rem;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.project-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.project-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.tech-stack-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 0.6rem 1.2rem;
    border-radius: 1.5rem;
    font-size: 0.9rem;
    margin: 0.4rem;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.tech-stack-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tech-stack-icon i {
    color: #007bff;
}

.key-outcomes {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.key-outcomes h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.outcome-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: rgba(255,255,255,0.6);
    border-radius: 0.8rem;
    transition: all 0.3s ease;
}

.outcome-item:hover {
    transform: translateX(5px);
    background: rgba(255,255,255,0.9);
}

.icon-container {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 1rem;
}

.icon-container svg {
    width: 100%;
    height: 100%;
}

.section-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.methodology-list {
    list-style: none;
    padding: 0;
}

.methodology-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.methodology-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.methodology-item strong {
    color: #007bff;
    display: block;
    margin-bottom: 0.5rem;
}

.methodology-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    object-fit: contain;
}

/* Thesis Badge and PDF Download Styles */
.thesis-badge {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.thesis-badge .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.pdf-download-section {
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.pdf-download-section:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.pdf-download-section .btn-primary {
    padding: 0.6rem 1.2rem;
    font-weight: 500;
}

.pdf-download-section .btn-primary svg {
    transition: transform 0.3s ease;
}

.pdf-download-section .btn-primary:hover svg {
    transform: translateY(2px);
}

/* Back to Projects Button */
.back-button {
    color: #fff;
    border: 2px solid rgba(255,255,255,0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.back-button:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
    transform: translateY(-2px);
}

/* --- ORIGINAL STYLES FOR MAIN PAGE --- */

/* Project Card Styles */
.card {
    border: none;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

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

.card-img-top {
    object-fit: cover;
    height: 220px;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 1.8rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
}

.card-text {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.btn-primary {
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(0,123,255,0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.3);
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* Coming Soon Overlay for Project Cards */
.coming-soon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.9) 100%);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 16px;
    backdrop-filter: blur(4px);
}

.card.position-relative:hover .coming-soon-overlay {
    opacity: 1;
}

/* --- ORIGINAL STYLES FOR PROJECT MEDIA FLOW --- */
.card-img-wrapper {
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

#projects {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.media-flow-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.media-flow-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.media-item {
    position: relative;
    flex: 1 1 300px;
    max-width: 450px; 
    background-color: #000; 
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

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

.media-item video,
.media-item img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Restored to original */
}

.media-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
    color: #fff;
    padding: 2rem 1rem 1rem 1rem;
    text-align: left;
    transition: opacity 0.3s ease;
}

.media-title h5 {
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

.flow-arrow svg {
    stroke: #6c757d;
    flex-shrink: 0;
}

/* Contact Section Styles */
.contact-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    text-align: center;
}

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

.contact-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 50%;
    color: white;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.contact-card h5 {
    color: #333;
    font-size: 1.25rem;
}

.contact-card p {
    font-size: 0.95rem;
}

.contact-card .btn {
    border-radius: 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}
@media (max-width: 1100px) {
    .media-flow-container {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .media-item {
        width: 100%;
        max-width: 550px; 
    }
}

@media (max-width: 767px) {
    #hero {
        padding-top: 120px;
        min-height: 60vh;
    }
    #about, #skills, #projects, #contact {
        padding-top: 40px;
        padding-bottom: 40px;
    }
    .card-img-top {
        height: 150px;
    }
}

/* Project 1 selector and panels */
.selector-wrapper { max-width: 900px; margin: 0 auto; }
.selector { display: flex; gap: 0.5rem; background: transparent; padding: 0.25rem; border-radius: 12px; justify-content: center; }
.selector-item { background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); border: 1px solid rgba(0,0,0,0.06); padding: 0.6rem 1.2rem; border-radius: 12px; cursor: pointer; transition: all 0.25s ease; color: #333; font-weight: 600; }
.selector-item:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.selector-item.active { background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); color: #fff; box-shadow: 0 8px 28px rgba(0,123,255,0.18); }

.panel-container { max-width: 1100px; margin: 0 auto; }
.panel { display: none; background: transparent; padding: 0; }
.panel.active { display: block; }

.panel .section-title { margin-top: 0; }

/* Slightly adjust methodology-item look inside these panels */
.panel .methodology-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    list-style: none;
    padding: 0;
}
.panel .methodology-item { 
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); 
    padding: 1rem; 
    border-radius: 0.75rem; 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07); /* Increased shadow */
    margin-bottom: 0;
    border: 1px solid #e9ecef; /* Added border */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Add transition for hover */
}

.panel .methodology-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* If there's an odd number of items, make the last one span both columns */
.panel .methodology-item:last-child:nth-child(odd) {
    grid-column: span 2;
}

.project-card { background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); border: 1px solid rgba(0,0,0,0.06); }
.project-card-img { width: 220px; height: 140px; object-fit: cover; flex-shrink: 0; }

@media (max-width: 768px) {
    .project-card { flex-direction: column; }
    .project-card-img { width: 100%; height: 180px; }
}

/* Image-first card style */
.project-card {
    display: flex !important;
    gap: 1rem;
    align-items: stretch;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid rgba(0,0,0,0.06);
}

/* Feature variant for methodology/project cards where image fills full card height */
.project-card-feature {
    display: flex !important;
    align-items: stretch;
}

.project-card-feature .project-card-img {
    width: 45%;
    height: 100%;
    object-fit: cover;
    border-radius: 0; /* let the card control rounding */
}

.project-card-feature .card-content {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Layout for project-card-feature media area */
.project-card-media {
    width: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.project-card-media .project-card-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Make project-card visually consistent with other cards */
.project-card {
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Ensure feature card image has no extra rounding (card handles rounding) */
.project-card-media .project-card-img {
    border-radius: 0;
}

@media (max-width: 767px) {
    .project-card-feature {
        flex-direction: column !important;
    }
    .project-card-media {
        width: 100%;
        max-height: 220px;
    }
}

.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 475px;
    flex-shrink: 0;
}

.thumbnail-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.project-card-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.project-card-thumbnail:hover {
    transform: scale(1.05);
}

/* Image becomes main visual */
.project-card-img {
    width: 475px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain; /* Changed from cover to contain */
    flex-shrink: 0;
    border-radius: 8px;
    background-color: #f8f9fa; /* Added a background for letterboxing */
}

/* Methodology section feature thumbnail - fills its column and crops cleanly */
.methodology-feature-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-card h5 { font-size: 1.05rem; }
.project-card p { color: #475569; }

@media (max-width: 992px) {
    .project-card-img { width: 400px; height: 250px; }
    .image-gallery { width: 400px; }
}

@media (max-width: 768px) {
    .panel .methodology-list {
        grid-template-columns: 1fr; /* Revert to single column on mobile */
    }
    .panel .methodology-item {
        margin-bottom: 1rem; /* Restore margin for mobile view */
    }
    .panel .methodology-item:last-child:nth-child(odd) {
        grid-column: span 1; /* Reset span for mobile */
    }
    .project-card { flex-direction: column; }
    .image-gallery { width: 100%; }
    .project-card-img { width: 100%; height: auto; object-fit: contain; max-height: 280px; }
}

/* Lightbox modal image styling */
.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    width: auto;
    height: auto;
}

/* Swiper Lightbox Styles */
.lightbox-swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: background-color 0.2s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 24px;
    font-weight: bold;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7);
    width: 10px;
    height: 10px;
}

.swiper-pagination-bullet-active {
    background: #fff;
}

/* Benefit and Trade-off List Styles */
.benefit-item, .tradeoff-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.benefit-item {
    color: #166534; /* A nice green */
}

.tradeoff-item {
    color: #991b1b; /* A nice red */
}

.benefit-item i, .tradeoff-item i {
    flex-shrink: 0;
    margin-top: 3px; /* Align icon with text */
}

/* Comparison Slider Section */
.comparison-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.comparison-viewer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

.comparison-image-wrapper {
    position: relative;
    background-color: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.comparison-image-wrapper img {
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background-color: #f8f9fa;
    transition: transform 0.3s ease; /* Add transition for hover effect */
}

.comparison-image-wrapper:hover img {
    transform: scale(1.03); /* Add a subtle scale effect on hover */
}

.comparison-label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.comparison-controls {
    max-width: 600px;
    margin: 1.5rem auto 0 auto;
}

#x-coordinate-value {
    min-width: 80px;
    display: inline-block;
    text-align: center;
}

@media (max-width: 768px) {
    .comparison-viewer {
        grid-template-columns: 1fr;
    }
    .comparison-container {
        padding: 1.5rem;
    }
}

/* Comparison Legend Styles */
.comparison-legend {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #495057;
}

.legend-color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Side-by-Side Comparison Styles */
.side-by-side-comparison-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.sbs-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.sbs-selector-group .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.sbs-image-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 1rem 1.5rem;
}

.sbs-view-label {
    font-weight: 600;
    text-align: right;
    color: #343a40;
}

.sbs-image-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sbs-image-pair img {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

@media (max-width: 992px) {
    .sbs-image-grid {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .sbs-controls {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .sbs-image-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .sbs-view-label {
        text-align: center;
        margin-top: 1rem;
        padding: 0.5rem;
        background-color: #f1f3f5;
        border-radius: 0.5rem;
    }
}
