/* ========== ROOT VARIABLES ========== */
:root {
    --primary-color: #6A3E3F;
    --secondary-blue: #6A3E3F;
    --accent-color: #D4A574;
    --light-bg: #F8FBFF;
    --light-text: #6B7280;
    --heading: #1F2937;
    --paragraph: #4B5563;
}

/* ========== PORTFOLIO HERO SECTION ========== */
.portfolio-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-image: url('../images/portfolio_img/portfolio.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    overflow: hidden;
    margin-top: 0;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(248, 251, 255, 0.1) 100%);
    z-index: 0;
}

.portfolio-hero::after {
    display: none;
}

.portfolio-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    animation: fadeInDown 0.8s ease-out;
}

.portfolio-hero .hero-heading {
    margin: 0 0 1rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.portfolio-hero .hero-subtitle {
    margin: 0;
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: #FFFFFF;
    font-weight: 500;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

/* ========== PORTFOLIO INTRO SECTION ========== */
.portfolio-intro {
    padding: clamp(2rem, 5vh, 4rem) 0;
    background: #FFFFFF;
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-content .section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 2rem;
}

.intro-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--paragraph);
    margin: 0;
}

/* ========== PORTFOLIO FILTER SECTION ========== */
.portfolio-filter-section {
    padding: clamp(2rem, 5vh, 4rem) 0;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%);
    border-bottom: 1px solid rgba(106, 62, 63, 0.08);
}

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

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid rgba(106, 62, 63, 0.2);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--paragraph);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-btn:hover {
    border-color: #6A3E3F;
    color: #6A3E3F;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #6A3E3F;
    color: white;
    border-color: #6A3E3F;
    box-shadow: 0 4px 12px rgba(106, 62, 63, 0.3);
}

/* ========== PORTFOLIO GRID SECTION ========== */
.portfolio-grid-section {
    padding: clamp(3rem, 8vh, 6rem) 0;
    background: #FFFFFF;
}


.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 4vw, 3rem);
}

/* ========== PORTFOLIO ITEM ========== */
.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(106, 62, 63, 0.08);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.portfolio-item.show {
    opacity: 1;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(106, 62, 63, 0.15);
}

.portfolio-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(106, 62, 63, 0.1) 0%, rgba(198, 131, 102, 0.05) 100%);
}

.portfolio-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.08);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(106, 62, 63, 0.85) 0%, rgba(106, 62, 63, 0.75) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-info {
    text-align: center;
    color: white;
    padding: 2rem;
}

.portfolio-title {
    margin: 0 0 0.5rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
}

.portfolio-category {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portfolio-description {
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* ========== PORTFOLIO STATS SECTION ========== */
.portfolio-stats {
    padding: clamp(3rem, 8vh, 6rem) 0;
    background: #C68366;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(2rem, 4vw, 3rem);
}

.stat-card {
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-number {
    margin: 0 0 1rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #FFFFFF;
}

.stat-label {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

/* ========== PORTFOLIO CTA SECTION ========== */
.portfolio-cta {
    padding: clamp(3rem, 8vh, 6rem) 0;
    background: linear-gradient(135deg, #F5F1ED 0%, #F5F1ED 100%);
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-content h2 {
    margin: 0 0 1rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    color: var(--primary-color);
}

.cta-content p {
    margin: 0 0 2rem;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--paragraph);
}

.cta-content .btn {
    display: inline-block;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .portfolio-grid::-webkit-scrollbar {
        display: none;
    }

    .portfolio-item {
        flex: 0 0 85%;
        min-width: 85%;
        scroll-snap-align: center;
        opacity: 1;
    }

    .portfolio-item:hover {
        transform: translateY(-8px);
    }
}

@media (max-width: 480px) {
    .portfolio-item {
        flex: 0 0 90%;
        min-width: 90%;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(20px);
    }
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* ========== PORTFOLIO GRID RESPONSIVE FIX ========== */
@media (min-width: 1025px) {
    .portfolio-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: clamp(2rem, 4vw, 3rem);
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .portfolio-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .portfolio-hero {
        min-height: auto;
        height: auto;
        background-size: contain;
        background-attachment: scroll;
    }

    .portfolio-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .portfolio-grid::-webkit-scrollbar {
        display: none;
    }

    .portfolio-item {
        flex: 0 0 85%;
        min-width: 85%;
        scroll-snap-align: center;
        opacity: 1;
    }

    .portfolio-item:hover {
        transform: translateY(-8px);
    }

    .filter-buttons {
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .portfolio-hero {
        width: 100%;
        aspect-ratio: 3 / 1;
        height: auto;
        min-height: unset;
        max-height: none;
        background-size: 100% auto;
        background-position: center top;
    }

    .portfolio-hero-content {
        display: none;
    }

    .portfolio-hero::before {
        display: none;
    }

    .portfolio-hero::after {
        display: none;
    }

    .portfolio-intro {
        margin-top: 0;
        padding-top: 2rem;
    }

    .intro-content {
        padding: 0 1rem;
    }

    .intro-content .section-title {
        margin: 0 0 1rem;
    }

    .portfolio-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .portfolio-grid::-webkit-scrollbar {
        display: none;
    }

    .portfolio-item {
        flex: 0 0 85%;
        min-width: 85%;
        scroll-snap-align: center;
        border-radius: 16px;
        opacity: 1;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .portfolio-title {
        font-size: 1.2rem;
    }
}
