/* /css/page-portfolio.css */

/* --- Portfolio Hero Section --- */
.portfolio-hero-section {
    background-color: #6221DB;
    min-height: 50vh;
    padding: 10rem 0 6rem 0;
    display: flex;
    align-items: center;
    color: #ffffff;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}
.portfolio-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/texture-overlay.svg');
    background-repeat: no-repeat;
    background-position: top center;
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
}
.portfolio-hero-heading { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; margin-bottom: 0.5rem; }
.portfolio-hero-subheading { font-size: 3rem; font-weight: 700; margin-bottom: 1.5rem; margin-top: 1.5rem; }
.portfolio-hero-description p { font-size: 1.1rem; line-height: 1.6; opacity: 0.9; }
.portfolio-hero-image { width: 100%; height: auto; border-radius: 15px; }
@media (max-width: 991.98px) {
    .portfolio-hero-section { min-height: auto; padding: 8rem 0 4rem 0; text-align: center; }
    .portfolio-hero-image-col { margin-top: 3rem; }
    .portfolio-hero-subheading { font-size: 2.25rem; }
}
.portfolio-hero-heading, .portfolio-hero-subheading, .portfolio-hero-description, .portfolio-hero-image-col { transition: transform 1s ease-out, opacity 1s ease-out; }
.portfolio-hero-subheading { transition-delay: 0.1s; }
.portfolio-hero-description { transition-delay: 0.2s; }
.portfolio-hero-heading, .portfolio-hero-description, .portfolio-hero-subheading, .portfolio-hero-image-col { opacity: 0; }
.portfolio-hero-heading, .portfolio-hero-description { transform: translateX(-100%); }
.portfolio-hero-subheading, .portfolio-hero-image-col { transform: translateX(100%); }
.portfolio-hero-heading.slide-in-left, .portfolio-hero-description.slide-in-left { transform: translateX(0); opacity: 1; }
.portfolio-hero-subheading.slide-in-right, .portfolio-hero-image-col.slide-in-right { transform: translateX(0); opacity: 1; }

/* --- Portfolio Projects Section --- */
.portfolio-projects-section { padding: 6rem 0; background-color: #ffffff; }
.portfolio-projects-title { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; }
.portfolio-projects-subtitle { font-size: 1.1rem; color: #6c757d; margin-bottom: 4rem; }

/* --- Filters --- */
.portfolio-filters {
    margin-bottom: 2.5rem;
    text-align: center;
}
.btn-filter {
    background: transparent;
    border: 2px solid #e0e0e0;
    padding: 0.6rem 1.8rem;
    margin: 0.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #343a40;
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-filter:hover {
    background-color: #f8f9fa;
    border-color: #6221DB;
    color: #6221DB;
}
.btn-filter.active {
    background-color: #6221DB;
    border-color: #6221DB;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(98, 33, 219, 0.3);
}

/* --- Portfolio Grid (Simplified) --- */
.portfolio-grid {
    /* The negative margin is no longer needed */
}
.grid-sizer, .portfolio-item {
    width: 25%;
    box-sizing: border-box; 
}
.portfolio-item {
    padding: 10px;
}
.portfolio-item.item-large { width: 50%; }
.portfolio-item.item-tall { height: 620px; }

.portfolio-item-inner {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    display: block;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.portfolio-item-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.portfolio-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portfolio-item-inner:hover .portfolio-item-img { transform: scale(1.05); }
.portfolio-item-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%); padding: 3rem 1.5rem 1.5rem; color: #fff; opacity: 0; transform: translateY(20px); transition: all 0.4s ease; }
.portfolio-item-inner:hover .portfolio-item-overlay { opacity: 1; transform: translateY(0); }
.portfolio-item-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.25rem; }
.portfolio-item-category { font-size: 0.9rem; opacity: 0.8; }

/* --- Fullscreen Details View & Hero Transition --- */
.portfolio-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0s 0.5s;
}
.portfolio-panel.is-visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
.panel-content {
    height: 100%;
    width: 100%;
    overflow-y: auto;
}
.panel-body {
    padding: 8rem 2rem 4rem;
}
.panel-close {
    position: fixed;
    top: 2rem;
    right: 2.5rem;
    background: #6221DB;
    color: #ffffff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1060;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(98, 33, 219, 0.3);
}
.panel-close:hover {
    transform: rotate(90deg) scale(1.05);
    background-color: #5118b0;
    box-shadow: 0 8px 20px rgba(98, 33, 219, 0.4);
}
.panel-image-target {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
    transition: opacity 0.3s ease;
}
.panel-text-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}
.panel-text-content.is-faded-in {
    opacity: 1;
    transform: translateY(0);
}
.panel-title { font-weight: 700; margin-bottom: 0.5rem; }
.panel-subtitle { color: #6221DB; text-transform: uppercase; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.5px; margin-top: 0; }
.panel-description { margin-top: 1.5rem; }
.panel-description p { margin-bottom: 1rem; line-height: 1.7; }
.panel-features { margin-top: 2rem; }
.panel-features-title { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #343a40; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #6221DB; display: inline-block; }
.panel-features-list { list-style: none; padding-left: 0; margin: 0; }
.panel-features-list li { padding: 0.5rem 0; display: flex; align-items: center; font-weight: 500; color: #495057; }
.panel-features-list li::before { content: '✓'; color: #6221DB; font-weight: 900; margin-right: 0.75rem; }
body.panel-open { overflow: hidden; }

/* Visit Site Button (panel-link) */
.btn-light-theme.panel-link {
    background-color: #6221DB;
    color: #ffffff !important;
    border: 2px solid #6221DB;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(98, 33, 219, 0.3);
}
.btn-light-theme.panel-link:hover {
    background-color: #5118b0;
    border-color: #5118b0;
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(98, 33, 219, 0.4);
}

/* --- Call to Action Section --- */
.portfolio-cta-section {
    background-color: #00042A;
    color: #ffffff;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}
.portfolio-cta-section .cta-title,
.portfolio-cta-section .cta-subtitle,
.portfolio-cta-section .cta-button {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.portfolio-cta-section.is-visible .cta-title {
    opacity: 1;
    transform: translateY(0);
}
.portfolio-cta-section.is-visible .cta-subtitle {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}
.portfolio-cta-section.is-visible .cta-button {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}
.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.cta-subtitle {
    font-size: 1.1rem;
    color: #adb5bd;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
}
.cta-button {
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: #6221DB;
    color: #ffffff !important;
    border-color: #6221DB;
    box-shadow: 0 5px 15px rgba(98, 33, 219, 0.3);
}
.cta-button:hover {
    background-color: #5118b0;
    border-color: #5118b0;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(98, 33, 219, 0.4);
}

/* --- Responsive Grid & Panel --- */
@media (max-width: 991.98px) {
    .grid-sizer, .portfolio-item { width: 33.333%; }
    .portfolio-item.item-large { width: 66.666%; }
}
@media (max-width: 767.98px) {
    .grid-sizer, .portfolio-item, .portfolio-item.item-large { width: 50%; }
}
@media (max-width: 575.98px) {
    .grid-sizer, .portfolio-item, .portfolio-item.item-large { width: 100%; }
    .portfolio-item.item-tall { height: auto; }
    .panel-body { padding: 6rem 1rem 3rem; }
    .panel-close { top: 1rem; right: 1rem; }
}

/* --- Load More Button Style --- */
#load-more-projects {
    display: inline-block;
    background-color: #6221DB; /* Theme purple background */
    color: #ffffff !important; /* White text */
    border: 2px solid #6221DB;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(98, 33, 219, 0.3);
}

#load-more-projects:hover {
    background-color: #5118b0; /* Darker purple on hover */
    border-color: #5118b0;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(98, 33, 219, 0.4);
}