/* ===============================================
   PROJECT PAGE STYLES
   =============================================== */

/* Project Hero Section */
.project-hero {
    margin-top: 60px;
    background: var(--bg-secondary);
}

.project-hero-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-hero-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center -200px;
    max-height: 400px;
}

/* Taller hero image for more zoom out */
.project-hero-image-tall {
    max-height: 500px;
}

.project-hero-image-tall img {
    max-height: 500px;
    object-position: center calc(100% + 200px);
}

/* Top-justified hero image */
.project-hero-image-top img {
    object-position: top;
}

/* Extra tall hero image (550px) */
.project-hero-image-xtall {
    max-height: 550px;
}

.project-hero-image-xtall img {
    max-height: 550px;
}

.project-hero-content {
    background: white;
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

/* Hero without banner image */
.project-hero-no-image .project-hero-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 2rem;
}

.project-hero-no-image .project-hero-content h1,
.project-hero-no-image .project-hero-content .project-subtitle {
    color: white;
}

/* Hero with text overlay on image */
.project-hero-overlay {
    position: relative;
    margin-top: 60px;
    height: 450px;
    overflow: hidden;
}

.project-hero-overlay .project-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: none;
}

.project-hero-overlay .project-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-height: none;
    filter: blur(2px);
}

.project-hero-overlay .project-hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.project-hero-overlay .project-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    border-bottom: none;
    padding: 3rem 2rem;
    z-index: 1;
}

.project-hero-overlay .project-hero-content h1 {
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.project-hero-overlay .project-hero-content .project-subtitle {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Top-justified overlay image (shifted up 50px) */
.project-hero-overlay-top .project-hero-image img {
    object-position: center -50px;
}

/* CAD Gallery - Full width stacked images */
.cad-gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.project-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.project-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.project-award {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    font-style: italic;
}

/* Project Content */
.project-content {
    background: white;
    padding: 4rem 0;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.back-button:hover {
    color: var(--secondary-color);
    transform: translateX(-5px);
}

/* Project Sections */
.project-section {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #e5e7eb;
}

.project-section:last-of-type {
    border-bottom: none;
}

.project-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.project-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Solution Content - Text and Image Side by Side */
.solution-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.solution-text p {
    margin-bottom: 0;
}

.solution-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.solution-image img:hover {
    transform: scale(1.02);
}

/* Constrained solution image - matches text height */
.solution-image-constrained img {
    max-width: 380px;
    width: auto;
    height: auto;
}

/* Video Embed Container */
.video-container {
    position: relative;
    width: 80%;
    padding-bottom: 45%; /* 16:9 aspect ratio adjusted for 80% width */
    margin-top: 1.5rem;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Local Video Container */
.video-container-local {
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.video-container-local video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: contain;
}

/* Full-width local video */
.video-container-local-full {
    max-width: 100%;
}

/* Project Images Grid */
.project-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-images img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Small Single Images */
.project-image-small {
    display: flex;
    justify-content: center;
}

.project-image-small img {
    width: 35%;
    max-width: 500px;
}

/* Image Carousel */
.image-carousel {
    margin-top: 2rem;
    position: relative;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: var(--bg-secondary);
}

.carousel-slide {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    border-radius: 8px;
}

.carousel-slide.active {
    display: block;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.carousel-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.carousel-counter {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Small Carousel */
.carousel-small {
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.carousel-small .carousel-container {
    height: 350px;
}

/* Image Placeholders */
.project-image-placeholder {
    background: var(--bg-secondary);
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 2rem;
}

.solution-content .project-image-placeholder {
    margin-top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Specifications List */
.specs-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.specs-list li {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.specs-list li::before {
    content: "✓";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* Tech Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.tech-tag {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Essential Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.skill-category {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.skill-category h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category h3 .skill-icon {
    font-size: 1rem;
}

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

.skill-category li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 0.3rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.skill-category li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Document Links */
.document-links {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.doc-button {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.doc-button:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.doc-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.doc-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.doc-info strong {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 600;
}

.doc-info small {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.doc-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.doc-button:hover .doc-arrow {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 968px) {
    .project-hero-overlay {
        height: 350px;
    }

    .project-hero-content h1 {
        font-size: 2rem;
    }

    .solution-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-section h2 {
        font-size: 1.75rem;
    }

    .project-section p {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .project-hero-overlay {
        height: 300px;
    }

    .project-hero-overlay .project-hero-content {
        padding: 2rem 1.5rem;
    }

    .project-hero-content {
        padding: 2rem 1.5rem;
    }

    .project-hero-content h1 {
        font-size: 1.75rem;
    }

    .project-subtitle {
        font-size: 1rem;
    }

    .project-content {
        padding: 2rem 0;
    }

    .project-section {
        margin-bottom: 2.5rem;
        padding-bottom: 2rem;
    }

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

    .project-section p {
        font-size: 1rem;
    }

    .project-images {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .specs-list li {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .tech-tags {
        gap: 0.75rem;
    }

    .tech-tag {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skill-category {
        padding: 1rem 1.25rem;
    }

    .skill-category h3 {
        font-size: 0.85rem;
    }

    .skill-category li {
        font-size: 0.9rem;
    }

    .doc-button {
        padding: 1.25rem 1.5rem;
        gap: 1rem;
    }

    .doc-icon {
        font-size: 2rem;
    }

    .doc-info strong {
        font-size: 1rem;
    }

    .doc-info small {
        font-size: 0.85rem;
    }

    .doc-arrow {
        display: none;
    }
}
