.project-container {
    background: #ffffff;
    min-height: 100vh;
    padding: 120px 20px 60px;
    position: relative;
    overflow: hidden;
}

.rocket-design {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.milestone-row {
    display: grid;
    grid-template-columns: 1fr 100px 1fr;
    gap: 40px;
    align-items: center;
    margin: 40px 0 60px 0;
    min-height: 200px;
    position: relative;
}

/* Layout visibility controls */
.mobile-layout {
    display: none;
}

.desktop-layout {
    display: grid;
}

.mobile-section {
    margin: 20px 0;
}

/* Main rocket design */
.main-rocket {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 180px;
    height: 3200px;
    width: 100px;
    z-index: 5;
    pointer-events: none;
}

.rocket-body {
    width: 60px;
    height: 2800px;
    background: linear-gradient(to bottom, #1a1a1a, #000000, #1a1a1a, #000000, #1a1a1a, #000000, #1a1a1a);
    border-radius: 0 0 5px 5px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    animation: rocketGlow 2s ease-in-out infinite alternate;
    margin: 0 auto;
    top: 120px;
    z-index: 1;
}

.rocket-trail {
    position: relative;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}



/* Logo styling */
.agnipaksha-logo {
    position: absolute;
    width: 60px;
    height: 60px;
    background: url('../assets/logo.png') no-repeat center, 
                radial-gradient(circle, #ffffff, #f0f0f0);
    background-size: 40px 32px, cover;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    border: 4px solid #000000;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3), 
                inset 0 0 10px rgba(0, 0, 0, 0.1),
                0 0 40px rgba(0, 0, 0, 0.2);
    animation: logoGlow 2s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% { 
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2), 
                   inset 0 0 5px rgba(0, 0, 0, 0.1),
                   0 0 30px rgba(0, 0, 0, 0.15);
    }
    100% { 
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.3), 
                   inset 0 0 10px rgba(0, 0, 0, 0.2),
                   0 0 50px rgba(0, 0, 0, 0.25);
    }
}

.logo-milestone1 { top: 150px; }
.logo-milestone2 { top: 400px; }
.logo-milestone3 { top: 800px; }
.logo-milestone4 { top: 1100px; }
.logo-milestone5 { top: 1400px; }

/* Rocket components */
.rocket-nose {
    width: 60px;
    height: 120px;
    background: radial-gradient(ellipse at center bottom, #1a1a1a 0%, #333333 50%, #1a1a1a 100%);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    clip-path: ellipse(50% 100% at 50% 100%);
    z-index: 15;
}

.flame {
    width: 40px;
    height: 100px;
    background: linear-gradient(to bottom, #333333, #666666, #cccccc);
    border-radius: 50% 50% 0 0;
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    animation: flameFlicker 0.3s ease-in-out infinite alternate;
    z-index: 8;
}

@keyframes rocketGlow {
    0% { box-shadow: 0 0 30px rgba(0, 0, 0, 0.3); }
    100% { box-shadow: 0 0 50px rgba(0, 0, 0, 0.5); }
}

@keyframes flameFlicker {
    0% { height: 100px; opacity: 0.8; }
    100% { height: 120px; opacity: 1; }
}

/* Reduced motion for better mobile performance and accessibility */
@media (prefers-reduced-motion: reduce) {
    .rocket-body {
        animation: none;
    }
    
    .flame {
        animation: none;
        height: 110px;
        opacity: 0.9;
    }
    
    .thumbnail {
        transition: none;
    }
    
    .modal-image {
        transition: none;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    .rocket-body {
        animation-duration: 3s; /* Slower animation for better battery life */
    }
    
    .flame {
        animation-duration: 0.5s; /* Slower flame flicker */
    }
    
    /* Reduce shadow complexity on mobile */
    .thumbnail:hover {
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    }
    
    .modal-image {
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
    }
}

/* Milestone styling */
.milestones-section {
    color: #1a1a1a;
}

.milestone {
    background: rgba(0, 0, 0, 0.03);
    border-left: 4px solid #000000;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 0 10px 10px 0;
    backdrop-filter: blur(10px);
}

.milestone h3 {
    color: #000000;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2em;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.milestone-number {
    background: #000000;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.milestone-date {
    color: #666666;
    font-size: 0.9em;
    margin-bottom: 10px;
    font-style: italic;
}

.milestone-details {
    margin-bottom: 10px;
}

.milestone-details p {
    line-height: 1.6;
    margin: 5px 0;
    color: #1a1a1a;
}

.milestone-summary {
    background: rgba(0, 0, 0, 0.02);
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #000000;
    font-weight: 600;
    color: #000000;
}

/* Milestone status styles */
.milestone.completed {
    background: rgba(46, 125, 50, 0.1);
    border-left-color: #2e7d32;
}

.milestone.completed h3 {
    color: #2e7d32;
}

.milestone.completed .milestone-number {
    background: #2e7d32;
}

.milestone.completed .milestone-summary {
    background: rgba(46, 125, 50, 0.05);
    border-left-color: #2e7d32;
    color: #2e7d32;
}

.milestone.in-progress {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.milestone.in-progress h3 {
    color: #f57c00;
}

.milestone.in-progress .milestone-number {
    background: #ffc107;
    color: #000;
}

.milestone.in-progress .milestone-summary {
    background: rgba(255, 193, 7, 0.05);
    border-left-color: #ffc107;
    color: #f57c00;
}

.milestone.not-started {
    background: rgba(211, 47, 47, 0.1);
    border-left-color: #d32f2f;
}

.milestone.not-started h3 {
    color: #d32f2f;
}

.milestone.not-started .milestone-number {
    background: #d32f2f;
}

.milestone.not-started .milestone-summary {
    background: rgba(211, 47, 47, 0.05);
    border-left-color: #d32f2f;
    color: #d32f2f;
}

/* Picture gallery styling */
.pictures-section {
    color: #1a1a1a;
}

.picture-group {
    background: rgba(245, 245, 245, 0.9);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.picture-group h3 {
    color: #000000;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1em;
    margin-bottom: 15px;
    text-align: center;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

/* Mobile-first responsive grid */
@media (max-width: 480px) {
    .thumbnail-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .thumbnail-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 7px;
    }
}

.thumbnail {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
    border-radius: 8px;
    border: 2px solid #cccccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    font-size: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.thumbnail::before {
    content: '📷';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 8px;
    opacity: 0.7;
}

.thumbnail:hover {
    border-color: #000000;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05));
    color: #000000;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.thumbnail:active,
.thumbnail:focus {
    transform: scale(0.95);
    border-color: #000000;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.1));
    outline: none;
}

/* Mobile-specific thumbnail sizing */
@media (max-width: 768px) {
    .thumbnail {
        font-size: 10px;
        min-height: 48px; /* Larger touch target on mobile */
    }
    
    .thumbnail::before {
        font-size: 10px;
        top: 3px;
        right: 3px;
    }
}

@media (max-width: 480px) {
    .thumbnail {
        font-size: 9px;
        min-height: 50px;
    }
}

/* Project title styling */
.project-title {
    text-align: center;
    margin-bottom: 80px;
}

.project-title h1 {
    font-family: 'Rajdhani', sans-serif;
    color: #000000;
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: none;
}

.project-title p {
    color: #333333;
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Image modal styling */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.image-modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Mobile modal optimizations */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 95%;
        margin: 10px;
    }
    
    .modal-image {
        border-radius: 8px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 98%;
        max-height: 98%;
        margin: 5px;
    }
}

.modal-image.loading {
    opacity: 0.3;
}

.modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333333;
    font-size: 18px;
    display: none;
}

.modal-loading.active {
    display: block;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.modal-close:hover {
    background: #333333;
    transform: scale(1.1);
}

.modal-close:active,
.modal-close:focus {
    background: #333333;
    transform: scale(0.9);
    outline: none;
}

/* Mobile close button improvements */
@media (max-width: 768px) {
    .modal-close {
        top: -50px;
        right: -10px;
        width: 48px;
        height: 48px;
        font-size: 28px;
        background: rgba(0, 0, 0, 0.9);
    }
}

@media (max-width: 480px) {
    .modal-close {
        top: -55px;
        right: -15px;
        width: 52px;
        height: 52px;
        font-size: 32px;
    }
}

.modal-info {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
}

/* Responsive design */

/* Tablet landscape */
@media (max-width: 1024px) {
    .desktop-layout {
        display: none;
    }
    
    .mobile-layout {
        display: block;
    }
    
    .main-rocket {
        display: none;
    }
    
    .rocket-trail {
        display: none;
    }
    
    .project-title h1 {
        font-size: 2em;
    }
    
    .project-container {
        padding: 120px 15px 40px;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .project-container {
        padding: 110px 10px 30px;
    }
    
    .project-title {
        margin-bottom: 40px;
    }
    
    .project-title h1 {
        font-size: 1.8em;
        text-shadow: 0 0 15px rgba(193, 18, 31, 0.4);
    }
    
    .project-title p {
        font-size: 1em;
        line-height: 1.5;
    }
    
    .milestone-row {
        margin: 30px 0 40px 0;
        gap: 15px;
    }
    
    .milestone {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .milestone h3 {
        font-size: 1.1em;
    }
    
    .picture-group {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .modal-info {
        bottom: -35px;
        font-size: 13px;
        padding: 8px;
    }
}

/* Mobile landscape */
@media (max-width: 640px) {
    .project-container {
        padding: 100px 8px 25px;
    }
    
    .milestone-row {
        margin: 25px 0 35px 0;
    }
    
    .rocket-trail {
        height: 80px;
        margin: 15px 0;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .project-container {
        padding: 90px 5px 20px;
    }
    
    .project-title h1 {
        font-size: 1.5em;
        margin-bottom: 8px;
    }
    
    .project-title p {
        font-size: 0.9em;
        padding: 0 10px;
    }
    
    .project-title {
        margin-bottom: 30px;
    }
    
    .milestone-row {
        margin: 20px 0 30px 0;
        gap: 12px;
    }
    
    .milestone {
        padding: 12px;
        margin-bottom: 15px;
        border-radius: 0 8px 8px 0;
    }
    
    .milestone h3 {
        font-size: 1em;
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .milestone-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    .milestone-date {
        font-size: 0.8em;
        text-align: center;
    }
    
    .milestone-details p {
        font-size: 0.9em;
        text-align: center;
    }
    
    .milestone-summary {
        font-size: 0.9em;
        text-align: center;
    }
    
    .picture-group {
        padding: 12px;
        margin-bottom: 15px;
        border-radius: 12px;
    }
    
    .picture-group h3 {
        font-size: 1em;
        margin-bottom: 12px;
    }
    
    .rocket-trail {
        height: 60px;
        margin: 10px 0;
    }
    
    .modal-info {
        bottom: -30px;
        font-size: 12px;
        padding: 6px;
    }
}

/* Small mobile devices */
@media (max-width: 360px) {
    .project-title h1 {
        font-size: 1.3em;
    }
    
    .project-title p {
        font-size: 0.85em;
    }
    
    .milestone h3 {
        font-size: 0.95em;
    }
    
    .picture-group h3 {
        font-size: 0.95em;
    }
}
