/**
 * Frontend Styles
 * 
 * @package LocalCaseStudies
 */

/* ================================
   Single Case Study Page
   ================================ */

.lcs-single-case-study {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
}

.lcs-case-study-article {
    background: #fff;
}

/* Header */
.lcs-case-study-header {
    margin-bottom: 40px;
    border-bottom: 3px solid #f0f0f1;
    padding-bottom: 30px;
}

/* Hero Header Layout */
.lcs-case-study-header.lcs-hero-header {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    min-height: 500px;
    border-bottom: none;
    margin-bottom: 60px;
}

.lcs-hero-overlay {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    opacity: 0.5;
    z-index: 1;
}

.lcs-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    color: #fff;
}

.lcs-hero-content .lcs-business-logo {
    margin-bottom: 30px;
}

.lcs-hero-content .lcs-business-logo img {
    max-width: 250px;
    max-height: 100px;
}

.lcs-hero-content .lcs-case-study-title {
    color: #fff;
}

.lcs-hero-content .lcs-case-study-meta {
    justify-content: center;
}

.lcs-hero-content .lcs-meta-item,
.lcs-hero-content .lcs-meta-item .dashicons {
    color: #fff;
}

/* Full-Width Hero */
.lcs-hero-fullwidth {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    max-width: none;
}

/* Parallax Hero */
.lcs-hero-parallax {
    background-attachment: fixed;
    background-position: center center;
}

.lcs-business-logo {
    margin: 30px 0 20px;
}

.lcs-business-logo img {
    max-width: 200px;
    max-height: 80px;
    width: auto;
    height: auto;
    display: block;
}

.lcs-case-study-title {
    font-size: 2.5em;
    line-height: 1.2;
    margin: 0 0 20px;
    color: #1d2327;
}

.lcs-client-location-heading {
    font-size: 1.4em;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 30px;
    color: #646970;
}

.lcs-case-study-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.95em;
    color: #646970;
}

.lcs-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lcs-meta-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Categories Block - Inline Display */
.lcs-case-study-meta .lcs-categories-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: auto;
    margin-top: 0;
}

.lcs-categories-wrapper .lcs-meta-item {
    width: auto;
}

/* Industry with categories */
.lcs-case-study-meta .lcs-industry {
    width: auto;
    margin-top: 0;
}

/* Featured Image */
.lcs-featured-image {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.lcs-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Content Sections */
.lcs-case-study-content {
    line-height: 1.8;
}

.lcs-section {
    margin-bottom: 50px;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
}

.lcs-section h2 {
    font-size: 1.8em;
    margin: 0 0 20px;
    color: #1d2327;
    position: relative;
    padding-bottom: 15px;
}

.lcs-section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #000, #666);
}

.lcs-section-content {
    font-size: 1.1em;
    color: #3c434a;
}

.lcs-case-study-article .lcs-case-study-content .lcs-section .lcs-section-content p,
.lcs-section-content p {
    margin-bottom: 0.5em !important;
    margin-top: 0 !important;
}

/* Tight Lists with Class */
ul.lcs-tight-list,
ol.lcs-tight-list {
    margin: -30px 0 0.5em 2em !important;
    padding: 0 !important;
    list-style-position: outside !important;
}

ul.lcs-tight-list {
    list-style-type: disc !important;
}

ol.lcs-tight-list {
    list-style-type: decimal !important;
}

ul.lcs-tight-list li,
ol.lcs-tight-list li {
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

/* Legacy support */
.lcs-section-content ul,
.lcs-section-content ol {
    margin: 0.3em 0 0.5em 2em !important;
    padding: 0 !important;
}

.lcs-section-content ul {
    list-style-type: disc !important;
}

.lcs-section-content ol {
    list-style-type: decimal !important;
}

.lcs-case-study-article .lcs-section-content li,
.lcs-section-content li {
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    line-height: 1.3 !important;
    padding: 0 !important;
}

.lcs-section-content ul ul,
.lcs-section-content ol ul {
    list-style-type: circle;
    margin-left: 1.5em;
}

.lcs-section-content ul ul ul,
.lcs-section-content ol ul ul {
    list-style-type: square;
}

/* Challenge Section - Specific Styling */
.lcs-challenge-section {
    background: #f8f8f8;
    padding: 30px;
    border-left: 4px solid #666;
    border-radius: 4px;
}

/* Solution Section - Specific Styling */
.lcs-solution-section {
    background: #f8f8f8;
    padding: 30px;
    border-left: 4px solid #333;
    border-radius: 4px;
}

/* Results Section - Specific Styling */
.lcs-results-section {
    background: #f8f8f8;
    padding: 30px;
    border-left: 4px solid #000;
    border-radius: 4px;
}

/* Gallery */
.lcs-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.lcs-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.lcs-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.lcs-gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* Section Galleries (Challenge, Solution, Results) */
.lcs-section-gallery {
    margin-top: 30px;
}

.lcs-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.lcs-gallery-item-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.lcs-gallery-item-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.lcs-gallery-item-link img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* Testimonial Section */
.lcs-testimonial-section {
    margin: 60px 0;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 0;
    border-left: none;
    border-top: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
}

.lcs-testimonial-content {
    max-width: 800px;
    margin: 0 auto;
}

.lcs-testimonial-quote {
    font-size: 20px;
    line-height: 1.6;
    color: #333;
    font-style: italic;
    margin: 0 0 20px 0;
    padding: 0;
    border: none;
    text-align: left;
}

.lcs-testimonial-quote::before {
    content: '"';
}

.lcs-testimonial-quote::after {
    content: '"';
}

.lcs-testimonial-author {
    font-size: 16px;
    color: #666;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.lcs-testimonial-name {
    font-weight: 600;
    color: #333;
}

.lcs-testimonial-position::before {
    content: ', ';
}

/* Action Buttons */
.lcs-action-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 50px 0 40px;
    flex-wrap: wrap;
}

.lcs-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.lcs-button-primary {
    background: #333;
    color: #fff;
    border: 2px solid #333;
}

.lcs-button-primary:hover {
    background: #000;
    border-color: #000;
    color: #fff;
    transform: translateY(-1px);
}

.lcs-button-secondary {
    background: transparent;
    color: #333;
    border: 2px solid #e0e0e0;
}

.lcs-button-secondary:hover {
    background: #f8f8f8;
    border-color: #333;
    color: #333;
}

/* Old Project Link - kept for compatibility */
.lcs-project-link {
    margin-top: 40px;
    text-align: center;
}

.lcs-project-link .lcs-button {
    background: #333;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
}

.lcs-project-link .lcs-button:hover {
    background: #000;
    color: #fff;
}

/* Footer Navigation */
.lcs-case-study-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f1;
}

.lcs-meta-footnote {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 16px;
    color: #646970;
    margin-bottom: 30px;
    padding: 0 40px 30px 40px;
    border-bottom: 1px solid #f0f0f1;
    text-align: left;
}

.lcs-meta-footnote .lcs-meta-item {
    display: flex;
    gap: 5px;
}

.lcs-meta-footnote .lcs-meta-item strong {
    color: #1d2327;
}

.lcs-case-study-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.lcs-nav-link {
    padding: 10px 20px;
    background: #f6f7f7;
    color: #1d2327;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-weight: 500;
}

.lcs-nav-link:hover {
    background: #333;
    color: #fff;
}

/* ================================
   Archive Page (Grid Layout)
   ================================ */

.lcs-archive-case-studies {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.lcs-archive-header {
    text-align: center;
    margin-bottom: 60px;
}

.lcs-archive-title {
    font-size: 2.5em;
    margin: 0 0 15px;
    color: #1d2327;
}

.lcs-archive-description {
    font-size: 1.1em;
    color: #646970;
    max-width: 700px;
    margin: 0 auto;
}

/* Case Study Cards */
.lcs-case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.lcs-case-study-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.lcs-case-study-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.lcs-card-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.lcs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.lcs-case-study-card:hover .lcs-card-image img {
    transform: scale(1.05);
}

.lcs-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lcs-card-logo {
    margin-bottom: 15px;
}

.lcs-card-logo img {
    max-width: 120px;
    max-height: 60px;
    width: auto;
    height: auto;
    display: block;
}

.lcs-card-title {
    font-size: 1.5em;
    margin: 0 0 15px;
    line-height: 1.3;
}

.lcs-card-title a {
    color: #1d2327;
    text-decoration: none;
    transition: color 0.3s;
}

.lcs-card-title a:hover {
    color: #000;
}

.lcs-card-client {
    margin: 0 0 12px;
    color: #646970;
    font-size: 0.95em;
}

.lcs-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #646970;
}

.lcs-card-location,
.lcs-card-industry {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lcs-card-location .dashicons,
.lcs-card-industry .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.lcs-card-excerpt {
    margin-bottom: 20px;
    color: #3c434a;
    line-height: 1.6;
    flex: 1;
}

.lcs-card-link {
    display: inline-block;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    align-self: flex-start;
}

.lcs-card-link:hover {
    color: #000;
}

/* No Results */
.lcs-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2em;
    color: #646970;
}

/* Pagination */
.lcs-archive-case-studies .pagination {
    margin-top: 40px;
    text-align: center;
}

.lcs-archive-case-studies .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 5px;
    background: #f6f7f7;
    color: #1d2327;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.lcs-archive-case-studies .page-numbers:hover,
.lcs-archive-case-studies .page-numbers.current {
    background: #333;
    color: #fff;
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 1024px) {
    .lcs-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .lcs-case-study-title {
        font-size: 2em;
    }
    
    .lcs-section h2 {
        font-size: 1.5em;
    }
    
    .lcs-testimonial-section {
        padding: 30px 20px;
        margin: 40px 0;
    }
    
    .lcs-testimonial-quote {
        font-size: 18px;
    }
    
    .lcs-testimonial-author {
        font-size: 14px;
    }
    
    .lcs-case-studies-grid {
        grid-template-columns: 1fr;
    }
    
    .lcs-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .lcs-gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .lcs-case-study-meta {
        gap: 8px;
        font-size: 0.85em;
    }
    
    .lcs-meta-item {
        font-size: 1em;
    }
    
    .lcs-meta-item .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
    
    /* Keep hero alignment on mobile */
    .lcs-hero-content .lcs-case-study-meta {
        align-items: center;
    }
    
    /* Make categories more compact on mobile */
    .lcs-case-study-meta .lcs-categories-wrapper {
        gap: 8px;
        margin-top: 5px;
    }
    
    .lcs-case-study-meta .lcs-industry {
        margin-top: 5px;
    }
    
    .lcs-action-buttons {
        flex-direction: column;
    }
    
    .lcs-button {
        width: 100%;
        max-width: 300px;
    }
    
    .lcs-hero-parallax {
        background-attachment: scroll;
    }
    
    .lcs-case-study-navigation {
        flex-direction: column;
    }
    
    .lcs-nav-link {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .lcs-single-case-study,
    .lcs-archive-case-studies {
        padding: 20px 15px;
    }
    
    .lcs-case-study-title {
        font-size: 1.6em;
    }
    
    .lcs-archive-title {
        font-size: 2em;
    }
}

/* ================================
   Lightbox Styles
   ================================ */

.lcs-lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    padding: 50px 20px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lcs-lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    margin: auto;
    animation: lcsZoomIn 0.3s;
}

@keyframes lcsZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lcs-lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
    user-select: none;
    z-index: 1000000;
}

.lcs-lightbox-close:hover,
.lcs-lightbox-close:focus {
    color: #ccc;
}

.lcs-lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #fff;
    padding: 20px;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
}

.lcs-lightbox-prev,
.lcs-lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -30px;
    padding: 16px 20px;
    color: #fff;
    font-weight: bold;
    font-size: 30px;
    transition: all 0.3s;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
}

.lcs-lightbox-prev {
    left: 20px;
}

.lcs-lightbox-next {
    right: 20px;
}

.lcs-lightbox-prev:hover,
.lcs-lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
}

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
    .lcs-lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 40px;
    }
    
    .lcs-lightbox-prev,
    .lcs-lightbox-next {
        font-size: 24px;
        padding: 12px 16px;
        margin-top: -20px;
    }
    
    .lcs-lightbox-prev {
        left: 10px;
    }
    
    .lcs-lightbox-next {
        right: 10px;
    }
    
    .lcs-lightbox-content {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .lcs-lightbox-caption {
        font-size: 14px;
        padding: 15px;
    }
}

/* Cursor hints */
.lcs-gallery-item a,
.lcs-featured-image a {
    cursor: zoom-in;
}

.lcs-lightbox-content {
    cursor: default;
}

.lcs-lightbox {
    cursor: zoom-out;
}
