/* ===================================
   PROJECTS PAGE STYLES
   =================================== */

/* CSS Variables */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #fbbf24;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --text-color: #334155;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.svg') repeat;
    opacity: 0.1;
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.6;
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 12px 24px;
    backdrop-filter: blur(10px);
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--accent-color);
}

.breadcrumb-item.active {
    color: white;
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    border-radius: 2px;
}

.section-title p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
    background: var(--light-color);
}

/* Project Cards */
.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.8), rgba(59, 130, 246, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay .btn {
    transform: translateY(20px);
    transition: var(--transition);
}

.project-card:hover .project-overlay .btn {
    transform: translateY(0);
}

.card-body {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.project-location {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-location i {
    color: var(--secondary-color);
}

.project-status {
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-completed {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.status-planning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-paused {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.project-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.project-description {
    flex: 1;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-date {
    color: var(--text-light);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-date i {
    color: var(--secondary-color);
}

.read-more-btn {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.875rem;
}

.read-more-btn:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.read-more-btn i {
    transition: var(--transition);
}

.read-more-btn:hover i {
    transform: translateX(3px);
}

/* Project Modal */
.project-modal .modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.project-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-bottom: none;
    padding: 1.5rem 2rem;
}

.project-modal .modal-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
}

.project-modal .btn-close {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 1;
    padding: 0.5rem;
    backdrop-filter: blur(10px);
}

.project-modal .btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.project-modal .modal-body {
    padding: 2rem;
}

.project-modal-image img {
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.modal-meta {
    background: var(--light-color);
    border-radius: 15px;
    padding: 1.5rem;
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.modal-meta-item:last-child {
    margin-bottom: 0;
}

.modal-meta-item i {
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
}

.modal-meta-item strong {
    color: var(--primary-color);
    min-width: 100px;
}

.modal-description h6,
.modal-body h6 {
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.modal-description p,
.modal-body p {
    line-height: 1.7;
    color: var(--text-color);
}

.project-modal .modal-footer {
    background: var(--light-color);
    border-top: none;
    padding: 1.5rem 2rem;
}

/* Statistics Section */
.statistics-section {
    background: white;
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 15px;
    background: var(--light-color);
    transition: var(--transition);
    height: 100%;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 1.125rem;
    color: var(--text-light);
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.svg') repeat;
    opacity: 0.1;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Buttons */
.btn-accent {
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-accent:hover {
    background: #fcd34d;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.4);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* Alert Styles */
.alert {
    border-radius: 15px;
    border: none;
    padding: 2rem;
    text-align: center;
}

.alert-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.1));
    color: var(--info-color);
}

.alert h4 {
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .page-header h1 {
        font-size: 3rem;
    }
    
    .section-title h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .page-header {
        padding: 100px 0 60px;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .page-header p {
        font-size: 1.125rem;
    }
    
    .projects-section {
        padding: 80px 0;
    }
    
    .section-title {
        margin-bottom: 3rem;
    }
    
    .section-title h2 {
        font-size: 2.25rem;
    }
    
    .project-image {
        height: 250px;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .cta-section {
        padding: 80px 0;
    }
    
    .cta-section h3 {
        font-size: 2rem;
    }
    
    .statistics-section {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    .project-card {
        margin-bottom: 2rem;
    }
    
    .project-image {
        height: 220px;
    }
    
    .project-title {
        font-size: 1.25rem;
    }
    
    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .project-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .project-modal .modal-body {
        padding: 1.5rem;
    }
    
    .modal-meta {
        padding: 1rem;
    }
    
    .modal-meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cta-section h3 {
        font-size: 1.75rem;
    }
    
    .cta-section p {
        font-size: 1.125rem;
    }
    
    .cta-section .col-lg-4 {
        margin-top: 2rem;
        text-align: center !important;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 80px 0 40px;
    }
    
    .projects-section {
        padding: 60px 0;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .project-modal .modal-dialog {
        margin: 1rem;
    }
    
    .project-modal .modal-body {
        padding: 1rem;
    }
    
    .project-modal .modal-header {
        padding: 1rem;
    }
    
    .project-modal .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .project-modal .modal-footer .btn {
        width: 100%;
    }
    
    .cta-section {
        padding: 60px 0;
    }
    
    .cta-section .btn-accent,
    .cta-section .btn-outline-light {
        width: 100%;
        margin-bottom: 1rem;
        justify-content: center;
    }
    
    .statistics-section {
        padding: 40px 0;
    }
    
    .stat-item {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
}

/* Loading States */
.project-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.project-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
.project-card:focus-within {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.btn:focus,
.read-more-btn:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .page-header,
    .cta-section,
    .project-overlay,
    .btn {
        display: none !important;
    }
    
    .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
    
    .projects-section {
        padding: 20px 0;
    }
}