/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

/* ===== BASE STYLES ===== */
.projects-page {
    font-family: 'Inter', sans-serif;
    background-color: white;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.projects-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 0 20px; /* Significantly reduced from 40px to 10px */
    background-color: white;
}

.projects-grid-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Target only the first project item to reduce its top padding */
.projects-grid-container .projects-item:first-child {
    padding-top: 80px;
}

.projects-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 0;
    border-bottom: 1px solid #0c8cc4;
}

.projects-item:last-child {
    border-bottom: none;
    margin-bottom: 80px;
}

.projects-description {
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
}

.projects-description p {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: black;
    margin: 0;
    padding: 0;
}

.projects-image-container {
    width: 100%;
    max-width: 800px;
    text-align: center;
    transition: transform 0.3s ease;
}

.projects-image-container img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: inline-block;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.projects-image-container:hover img {
    transform: translateY(-5px);
}

.projects-fade-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.projects-fade-animation.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== MOBILE PORTRAIT ===== */
@media (max-width: 767px) {
    .projects-main-content {
        padding: 10px 15px 0 15px; /* Reduced from 40px to 10px */
    }
    
    .projects-grid-container .projects-item:first-child {
        padding-top: 40px; 
    }
    
    .projects-item {
        padding: 30px 0;
    }
    
    .projects-description {
        margin-bottom: 5px;
    }
    
    .projects-description p {
        font-size: 16px;
        line-height: 1.5;
    }
    
    .projects-item:last-child {
        margin-bottom: 60px;
    }
}

/* ===== MOBILE LANDSCAPE ===== */
@media (max-width: 767px) and (orientation: landscape) {
    .projects-main-content {
        padding: 10px 15px 0 15px; /* Reduced from 25px to 10px */
    }
    
    .projects-grid-container .projects-item:first-child {
        padding-top: 30px; 
    }
    
    .projects-item {
        padding: 20px 0;
    }
    
    .projects-description p {
        font-size: 15px;
        line-height: 1.4;
        max-width: 90%;
        margin: 0 auto;
    }
    
    .projects-image-container {
        max-width: 90%;
    }
    
    .projects-item:last-child {
        margin-bottom: 40px;
    }
}

/* ===== TABLET PORTRAIT ===== */
@media (min-width: 768px) and (max-width: 1024px) {
    .projects-main-content {
        padding: 15px 30px 0 30px; /* Reduced from 50px to 15px */
    }
    
    .projects-grid-container .projects-item:first-child {
        padding-top: 60px; 
    }
    
    .projects-description p {
        font-size: 19px;
        max-width: 85%;
        margin: 0 auto;
        line-height: 1.7;
    }
    
    .projects-item {
        padding: 50px 0;
    }
    
    .projects-image-container:hover img {
        transform: translateY(-8px);
    }
}

/* ===== TABLET LANDSCAPE ===== */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .projects-main-content {
        padding-top: 15px; /* Reduced from 40px to 15px */
    }
    
    .projects-grid-container .projects-item:first-child {
        padding-top: 50px; 
    }
    
    .projects-description p {
        max-width: 80%;
        font-size: 18px;
    }
    
    .projects-item {
        padding: 40px 0;
    }
}

/* ===== DESKTOP ===== */
@media (min-width: 1025px) {
    .projects-description p {
        font-size: 20px;
        max-width: 75%;
        margin: 0 auto;
        line-height: 1.8;
    }
    
    .projects-item {
        padding: 60px 0;
    }
}

/* ===== DESKTOP LANDSCAPE ===== */
@media (min-width: 1025px) and (orientation: landscape) {
    .projects-main-content {
        padding-top: 15px; /* Reduced from 50px to 15px */
    }
    
    .projects-grid-container .projects-item:first-child {
        padding-top: 60px; 
    }
    
    .projects-description p {
        max-width: 70%;
        font-size: 19px;
    }
    
    .projects-item {
        padding: 50px 0;
    }
    
    .projects-item:last-child {
        margin-bottom: 100px;
    }
}

/* ===== TOUCH DEVICES ===== */
@media (hover: none) and (pointer: coarse) {
    .projects-image-container:hover img {
        transform: none;
    }
    
    .projects-image-container {
        min-height: 44px;
    }
}

/* ===== UTILITY ===== */
.projects-main-content::before,
.projects-main-content::after {
    display: none;
}