/* Projects Page Specific Styles */

/* Projects Hero Section */
.projects-hero {
    background: linear-gradient(135deg, var(--background-light) 0%, #ffffff 100%);
    padding: 120px 0 80px;
    text-align: center;
}

.projects-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--border-light);
    color: var(--text-light);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Manrope', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Projects Grid Section */
.projects-grid-section {
    background: var(--background-light);
    padding: 4rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-item {
    opacity: 1;
    transform: scale(1);
    transition: all 0.5s ease;
}

.project-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-light);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-medium);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-item:first-child .project-image img {
    object-fit: contain;
    object-position: center;
    background: var(--background-light);
    padding: 1rem;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(1, 38, 101, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-actions {
    display: flex;
    justify-content: center;
}

.project-actions .btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.project-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--shadow-dark);
    color: white;
}

.project-info {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-category {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    width: fit-content;
    margin-bottom: 1rem;
}

.project-info h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.project-info p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tech-tag {
    background: var(--background-light);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
}

/* Popup Modal Styles - New Header Design */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: white;
    border-radius: 20px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 30px;
    color: #333;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.popup-close:hover {
    background-color: rgba(255, 255, 255, 1);
    color: #012665;
    transform: scale(1.1);
}

/* Header with wallpaper */
.popup-header {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.popup-wallpaper {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-wallpaper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(1, 38, 101, 0.7), rgba(0, 0, 0, 0.3));
    z-index: 1;
}

.popup-wallpaper--violet::before {
    background: linear-gradient(135deg, rgba(52, 28, 68, 0.12), rgba(155, 107, 184, 0.28));
}

.popup-wallpaper--violet .popup-title {
    color: #341c44;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.popup-logo {
    position: absolute;
    left: 50px;
    top: 200px;
    transform: translateY(-50%);
    z-index: 1003;
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid #012665;
}

.popup-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
}

.popup-title {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    z-index: 2;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    padding: 0 150px;
}

/* Content Body */
.popup-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 0;
    position: relative;
    z-index: 1;
    margin-top: 40px;
    min-width: 0;
}

.popup-main-content {
    padding: 40px;
    min-width: 0;
    overflow-wrap: break-word;
}

.popup-main-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #012665;
    margin-bottom: 20px;
    margin-top: 0;
}

.popup-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #666;
    margin: 0;
}

.popup-sidebar {
    background: #f8f9fa;
    padding: 40px 30px;
    border-left: 1px solid #e9ecef;
    min-width: 0;
    overflow-wrap: break-word;
}

.popup-features,
.popup-tech {
    margin-bottom: 30px;
}

.popup-features:last-child,
.popup-tech:last-child {
    margin-bottom: 0;
}

.popup-features h4,
.popup-tech h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #012665;
    margin-bottom: 15px;
    margin-top: 0;
}

.popup-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popup-features li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: #666;
    line-height: 1.5;
    font-size: 0.95rem;
}

.popup-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #012665;
    font-weight: bold;
    font-size: 1.1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tech-tag {
    background: linear-gradient(135deg, #012665, #0056b3);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .popup-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .popup-body {
        grid-template-columns: 1fr;
    }

    .popup-sidebar {
        border-left: none;
        border-top: 1px solid #e9ecef;
    }
    
    .popup-image {
        border-radius: 15px 15px 0 0;
        padding: 30px;
        min-height: 250px;
    }
    
    .popup-image img {
        max-height: 200px;
    }
    
    .popup-details {
        padding: 30px;
    }
    
    .popup-details h3 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .popup-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .popup-features h4,
    .popup-tech h4 {
        font-size: 1.1rem;
        margin-top: 20px;
    }
    
    .popup-close {
        top: 15px;
        right: 20px;
        font-size: 25px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 768px) {
    .projects-hero {
        padding: 100px 0 60px;
    }
    
    .projects-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-info {
        padding: 1.5rem;
    }
    
    .popup-content {
        width: 98%;
        border-radius: 10px;
    }
    
    .popup-header {
        height: 150px;
        border-radius: 15px 15px 0 0;
    }
    
    .popup-logo {
        left: 40px;
        top: 150px;
        transform: translateY(-50%);
        padding: 10px;
    }
    
    .popup-logo img {
        width: 60px;
        height: 60px;
    }
    
    .popup-title {
        font-size: 1.8rem;
        padding: 0 100px;
    }
    
    .popup-body {
        grid-template-columns: 1fr;
        max-height: calc(95vh - 150px);
    }
    
    .popup-main-content {
        padding: 30px;
    }
    
    .popup-sidebar {
        padding: 30px;
        border-left: none;
        border-top: 1px solid #e9ecef;
    }
    
    .popup-main-content h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .popup-description {
        font-size: 1rem;
    }
    
    .popup-features h4,
    .popup-tech h4 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .popup-close {
        top: 15px;
        right: 20px;
        font-size: 25px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .projects-hero {
        padding: 80px 0 40px;
    }
    
    .projects-hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
    
    .project-info {
        padding: 1rem;
    }
    
    .project-actions {
        gap: 0.5rem;
    }
    
    .popup-content {
        width: 98%;
        border-radius: 10px;
    }
    
    .popup-header {
        height: 120px;
        border-radius: 10px 10px 0 0;
    }
    
    .popup-logo {
        left: 20px;
        top: 120px;
        transform: translateY(-50%);
        padding: 8px;
    }
    
    .popup-logo img {
        width: 50px;
        height: 50px;
    }
    
    .popup-title {
        font-size: 1.4rem;
        padding: 0 80px;
    }
    
    .popup-main-content {
        padding: 20px;
    }
    
    .popup-sidebar {
        padding: 20px;
    }
    
    .popup-main-content h3 {
        font-size: 1.2rem;
    }
    
    .popup-description {
        font-size: 0.95rem;
    }
    
    .tech-tags {
        gap: 6px;
    }
    
    .tech-tag {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .popup-close {
        top: 10px;
        right: 15px;
        font-size: 20px;
        width: 30px;
        height: 30px;
    }
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.cta-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary-color);
    font-weight: 600;
}

.cta-section .btn-primary:hover {
    background: var(--background-light);
    color: var(--primary-color);
}

.cta-section .btn-outline {
    border-color: white;
    color: white;
}

.cta-section .btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
