/* Projects Page - Premium Level Elegance & Professional Design */

/* Projects Wrapper - Full Width */
.projects-wrapper {
    width: 100%;
    background: #f8f9fa;
    overflow-x: hidden;
}

/* Hero Section */
.projects-hero {
    background: linear-gradient(135deg, #00b590 0%, #006905 100%);
    color: white;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: 60vh;
    position: relative;
    overflow: hidden;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.projects-hero-content {
    text-align: left;
    position: relative;
    z-index: 2;
}

.projects-hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.projects-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.projects-hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.projects-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.projects-hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Main Content */
.projects-main-content {
    width: 100%;
    padding: 0;
    max-width: none;
    box-sizing: border-box;
}

/* Projects Sections */
.projects-section {
    padding: 4rem 2rem;
    margin-bottom: 0;
}

.projects-section:nth-child(even) {
    background: #f8fafc;
}

/* Section Content */
.projects-section-content {
    max-width: none;
    margin: 0;
    width: 100%;
    padding: 0 2rem;
}

.projects-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.projects-section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.projects-section-header h2 i {
    color: #00b590;
}

.projects-section-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Projects Filter */
.projects-filter {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.filter-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.filter-select,
.filter-search {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.filter-select:focus,
.filter-search:focus {
    outline: none;
    border-color: #00b590;
    box-shadow: 0 0 0 3px rgba(0, 181, 144, 0.1);
}

.filter-search {
    min-width: 200px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 100%;
}

.project-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    height: 520px; /* Fixed height for consistency */
    display: flex;
    flex-direction: column;
}

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

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px; /* Fixed height for image container */
    flex-shrink: 0;
}

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

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 181, 144, 0.8), rgba(0, 105, 5, 0.8));
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.emergency-badge {
    background: rgba(220, 38, 38, 0.9);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.category-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #00b590;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
}

.project-actions-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.project-card:hover .project-actions-overlay {
    opacity: 1;
    transform: translateX(0);
}

.project-action-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
}

.project-action-btn:hover {
    background: white;
    color: #00b590;
    transform: scale(1.1);
}

.project-action-primary {
    background: rgba(0, 181, 144, 0.9);
    color: white;
}

.project-action-primary:hover {
    background: #00b590;
    color: white;
}

.project-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-header {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6rem; /* Fixed height for 2 lines */
}

.project-description {
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.825rem; /* Fixed height for 3 lines */
}

.project-meta {
    margin-bottom: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.project-intentions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
    min-height: 1.5rem;
}

.intention-badge {
    background: #f0fdf4;
    color: #166534;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid #bbf7d0;
    white-space: nowrap;
}

.project-countries {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-height: 1.5rem;
}

.country-badge {
    background: #eff6ff;
    color: #1e40af;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid #bfdbfe;
    white-space: nowrap;
}

.project-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
    flex-shrink: 0;
    margin-top: auto;
}

/* Hide the progress stats section */
.project-progress {
    display: none;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-decoration: none;
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.project-btn-primary {
    background: linear-gradient(135deg, #00b590, #006905);
    color: white;
}

.project-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 181, 144, 0.4);
    color: white;
}

.project-btn-outline {
    background: transparent;
    border: 1.5px solid #00b590;
    color: #00b590;
}

.project-btn-outline:hover {
    background: #00b590;
    color: white;
    transform: translateY(-1px);
}

/* No Projects State */
.no-projects {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.08);
    margin: 2rem 0;
}

.no-projects-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #00b590, #006905);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    margin: 0 auto 2rem;
}

.no-projects h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.no-projects p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background: linear-gradient(135deg, #00b590, #006905);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 181, 144, 0.3);
}

/* CTA Actions */
.cta-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.projects-btn-large {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    min-width: 200px;
}

/* HERO BUTTONS - Keep these working for hero section */
.projects-hero .projects-btn {
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    text-align: center;
    min-width: 140px;
}

.projects-hero .projects-btn-primary {
    background: linear-gradient(135deg, #00b590, #006905);
    color: white;
}

.projects-hero .projects-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 181, 144, 0.4);
    color: white;
}

.projects-hero .projects-btn-outline {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.8);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.projects-hero .projects-btn-outline:hover {
    background: white;
    color: #00b590;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.3);
}

/* === PROJECTS CTA - EXACTLY MATCHES ABOUT US === */

/* 1) Section container & background (identical to About) */
.projects-section.projects-section-cta {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    padding: 4rem 0; /* same vertical rhythm as About */
}

.projects-section.projects-section-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 105, 5, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 181, 144, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 107, 53, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.projects-section.projects-section-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23006905' fill-opacity='0.02'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
    pointer-events: none;
}

/* 2) Fix width/centering (override the global max-width:none) */
.projects-section.projects-section-cta .projects-section-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 3) Headline/subtitle styles (identical to About) */
.projects-section.projects-section-cta .projects-section-header h2 {
    font-size: 3rem;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.projects-section.projects-section-cta .projects-section-header h2 i {
    color: #00b590;
    opacity: 0.9;
    font-size: 0.9em;
}

.projects-section.projects-section-cta .projects-section-subtitle {
    font-size: 1.4rem;
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

.projects-section.projects-section-cta .cta-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

/* 4) CTA Buttons – force identical look & kill any "disabled" vibe */
.projects-section.projects-section-cta .projects-btn {
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    min-width: 140px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.projects-section.projects-section-cta .projects-btn-primary {
    background: linear-gradient(135deg, #00b590, #006905);
    color: #fff;
    border: 0;
}

.projects-section.projects-section-cta .projects-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 181, 144, 0.4);
    color: #fff;
}

.projects-section.projects-section-cta .projects-btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    backdrop-filter: blur(10px);
    opacity: 1 !important;
    filter: none !important; /* ensure not dim */
}

.projects-section.projects-section-cta .projects-btn-outline:hover {
    background: #fff;
    color: #00b590;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .projects-hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .projects-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
}

@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .projects-wrapper {
        padding: 0;
    }
    
    .projects-hero {
        padding: 3rem 1rem;
        min-height: 50vh;
    }
    
    .projects-hero-title {
        font-size: 2.5rem;
    }
    
    .projects-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .projects-section {
        padding: 3rem 1rem;
    }
    
    .projects-section-header h2 {
        font-size: 2rem;
    }
    
    .projects-section.projects-section-cta {
        padding: 3rem 1rem;
        min-height: 350px;
    }
    
    .projects-section.projects-section-cta .projects-section-header h2 {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .projects-section.projects-section-cta .projects-section-subtitle {
        font-size: 1.2rem;
    }
    
    .projects-section.projects-section-cta .cta-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .project-card {
        height: 480px;
    }
    
    .projects-hero-actions {
        justify-content: center;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .projects-filter {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .projects-hero {
        padding: 2rem 0.5rem;
    }
    
    .projects-hero-title {
        font-size: 2rem;
    }
    
    .projects-section {
        padding: 2rem 0.5rem;
    }
    
    .projects-section-header h2 {
        font-size: 1.75rem;
    }
    
    .projects-section.projects-section-cta {
        padding: 2.5rem 0.5rem;
        min-height: 300px;
    }
    
    .projects-section.projects-section-cta .projects-section-header h2 {
        font-size: 2rem;
    }
    
    .projects-section.projects-section-cta .projects-section-subtitle {
        font-size: 1.1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-card {
        height: 450px;
    }
    
    .project-actions {
        flex-direction: column;
    }
    
    .project-btn {
        min-width: auto;
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    
    .projects-filter {
        padding: 1rem;
    }
    
    .projects-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-width: 120px;
    }
    
    .projects-btn-large {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-width: 180px;
    }
}