/* Base Styles */
:root {
    --primary-color: #3ab795;
    --secondary-color: #4ecdc4;
    --accent-color: #ff6b6b;
    --dark-color: #1a2930;
    --light-color: #f7f9f9;
    --text-color: #333;
    --gray-color: #f0f0f0;
    --transition: all 0.3s ease;
    
    /* Additional colors for projects page */
    --gradient-start: #4ecdc4;
    --gradient-end: #3ab795;
    --featured-color: #ff6b6b;
    --net-zero-color: #4cb5ae;
    --passive-house-color: #6a67ce;
    --leed-color: #ffb347;
    --retrofit-color: #20639b;
    
    /* Card and Element Colors */
    --card-bg: white;
    --card-hover-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    
    /* CTA section colors */
    --cta-bg-color: #2f4858;
    --cta-text-color: #ffffff;
    --cta-button-color: #5ab1bb;
    --cta-button-hover: #76c2cc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

h1, h2, h3, h4 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* Header & Footer Placeholders */
.header-placeholder,
.footer-placeholder {
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0;
    text-align: center;
}

/* Main content padding for header visibility */

.breadcrumb-container {
    background-color: #f8f9fa;
    padding: 1rem 0;
    margin-top: 20px;
}
/* Hero Section with 3D Effect */
.hero {
    position: relative;
    padding: 100px 0 80px;
    text-align: center;
    background-color: var(--secondary-color);
    color: white;
    overflow: hidden;
    background: linear-gradient(rgba(26, 41, 48, 0.6), rgba(26, 41, 48, 0.6)), url('../../images/our-projects.jpg') no-repeat center center/cover;
    background-color: var(--secondary-color); /* Fallback color */
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    transform: perspective(500px) translateZ(0);
    transition: transform 0.5s ease;
    position: relative;
    z-index: 2;
    color: white;
}

.hero:hover h1 {
    transform: perspective(500px) translateZ(50px);
}

.hero-text {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    transform: perspective(500px) translateZ(0);
    transition: transform 0.5s ease;
    position: relative;
    z-index: 2;
}

.hero:hover .hero-text {
    transform: perspective(500px) translateZ(30px);
}

.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-decoration span {
    position: absolute;
    opacity: 0.1;
}

.circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: white;
    top: 15%;
    left: 8%;
    animation: float 8s ease-in-out infinite;
}

.square {
    width: 150px;
    height: 150px;
    background-color: white;
    bottom: 10%;
    right: 15%;
    transform: rotate(45deg);
    animation: float 10s ease-in-out infinite;
}

.triangle {
    width: 0;
    height: 0;
    border-left: 75px solid transparent;
    border-right: 75px solid transparent;
    border-bottom: 130px solid white;
    top: 25%;
    right: 10%;
    animation: float 9s ease-in-out infinite 1s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0);
    }
}

/* Hero styling - simplified without stats */
.hero .container {
    padding-bottom: 20px;
    position: relative;
    z-index: 2;
}

/* Interactive Filter Section */
.filter-section {
    padding: 60px 0 20px;
    background-color: var(--light-color);
}

/* Force readable heading colors regardless of OS dark mode */
.filter-section .explore-heading {
    color: #1f2937; /* slate-800 */
}

.projects-section .project-content h3 {
    color: #1f2937; /* slate-800 */
}



.filter-tabs {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
}

.tab-button {
    padding: 15px 25px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #777;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    transition: var(--transition);
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button.active::after {
    width: 80%;
}

/* Tags Filter */
.tags-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.tag-filter {
    padding: 8px 16px;
    background-color: var(--gray-color);
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tag-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.tag-filter:hover::before,
.tag-filter.active::before {
    opacity: 1;
}

.tag-filter:hover,
.tag-filter.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Projects Section */
.projects-section {
    padding: 20px 0 80px;
}

.project-showcase {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Featured Project */
.project-card.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 60px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project-card.featured:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

.project-card.featured .project-image {
    height: 100%;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.project-card.featured .project-content {
    padding: 40px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
    margin: 0 auto;
    /* Add transition for potential height changes if needed */
    /* transition: max-height 0.5s ease-out; */
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
    /* Initially hide cards beyond the limit using JS/CSS */
}

/* Style for initially hidden cards (JS will manage this dynamically based on filters) */
.project-card.initially-hidden {
     display: none; /* Start hidden */
     opacity: 0;
     transform: translateY(20px);
}


/* Style for the See More button container */
.see-more-container {
    text-align: center;
    margin-top: 40px; /* Space above the button */
}

.see-more-btn {
    /* Inherits .cta-button styles, add specifics */
    background-color: var(--primary-color); /* Use primary color */
    border: none;
    padding: 12px 35px;
    font-size: 1rem;
}

.see-more-btn:hover {
    background-color: var(--gradient-end); /* Slightly darker hover */
    transform: translateY(-3px);
}

/* Hide the button when all items are shown */
.projects-grid.show-all + .see-more-container {
    display: none;
}

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

.project-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
    transition: var(--transition);
    opacity: 0;
}

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

.project-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-badges {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
}

.badge.featured {
    background-color: var(--featured-color);
}

.badge.net-zero {
    background-color: var(--net-zero-color);
}

.badge.passive-house {
    background-color: var(--passive-house-color);
}

.badge.leed {
    background-color: var(--leed-color);
}

.badge.retrofit {
    background-color: var(--retrofit-color);
}

.badge.lca {
    background-color: #20b2aa;
}

.badge.mass-timber {
    background-color: #8b4513;
}

.badge.high-rise {
    background-color: #4169e1;
}

.badge.part9 {
    background-color: #7cb342;
}

/* Additional animations for metric icons */
.metric-card .fas.fa-thermometer-half {
    animation: pulse 2s ease-in-out infinite;
}

.metric-card .fas.fa-project-diagram {
    animation: rotate 8s linear infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.project-location {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-description {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.6;
    flex-grow: 1;
}

.project-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    font-size: 0.85rem;
    color: #777;
}

.project-link {
    align-self: flex-start;
    padding: 10px 20px;
    border-radius: 30px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.project-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.project-link i {
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(5px);
}

/* Map Section */
.map-section {
    padding: 80px 0;
    background-color: #fff;
}

.map-section h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 2rem;
}

.section-description {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
    color: #666;
}

.map-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    height: 500px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.map {
    height: 100%;
    width: 100%;
    background-color: #f0f8ff;
    background-image: url('/api/placeholder/1000/500');
    background-size: cover;
    background-position: center;
    position: relative;
}

.map-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.map-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    transition: transform 0.3s ease;
}

.map-pin:hover {
    transform: translate(-50%, -100%) scale(1.1);
    z-index: 2;
}

.pin-dot {
    width: 16px;
    height: 16px;
    background-color: var(--accent-color);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    left: 50%;
    transform: translateX(-50%);
}

.pin-dot::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid var(--accent-color);
    z-index: -1;
}

.pin-label {
    background-color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
}

/* Metrics Section */
.metrics-section {
    padding: 80px 0;
    background-color: var(--light-color);
}

.metrics-section h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 2rem;
}

.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.metric-card {
    background-color: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.metric-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.metric-icon i {
    font-size: 1.8rem;
    color: white;
}

.metric-info {
    margin-bottom: 25px;
}

.metric-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1f2937; /* ensure readable heading on light cards, even in OS dark mode */
}

.metric-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.count-up {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-unit {
    font-size: 1rem;
    color: #777;
}

.metric-bar {
    height: 6px;
    background-color: var(--gray-color);
    border-radius: 3px;
    overflow: hidden;
    margin-top: auto;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    width: 0;
    transition: width 1.5s ease;
    border-radius: 3px;
}

/* CTA Section with Floating Elements */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--cta-bg-color), var(--dark-color));
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

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

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--cta-button-color);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: var(--cta-button-hover);
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}

.cta-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
}

.element-1 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    top: -50px;
    left: 15%;
    animation: float-slow 15s ease-in-out infinite;
}

.element-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 70%);
    bottom: -100px;
    right: 10%;
    animation: float-slow 18s ease-in-out infinite reverse;
}

.element-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%);
    top: 30%;
    right: 30%;
    animation: float-slow 12s ease-in-out infinite 2s;
}

@keyframes float-slow {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, -30px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .project-card.featured {
        grid-template-columns: 1fr;
    }
    
    .project-card.featured .project-image {
        min-height: 300px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-text {
        font-size: 1.1rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
    
    .map-container {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .tab-nav {
        justify-content: flex-start;
    }
    
    .tab-button {
        padding: 12px 18px; /* larger touch target */
        font-size: 0.95rem;
        min-height: 44px;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .project-card.featured .project-content {
        padding: 25px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}