/**
 * PCES Homepage Custom Styles
 * Version: 1.0
 * 
 * This file contains all custom styles for the PCES homepage shortcodes.
 * It works alongside Bootstrap 5.3.0 for layout and components.
 */

/* ===== HERO SECTION STYLES ===== */
.pces-hero {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.pces-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.pces-hero .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-tagline {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-primary {
    background-color: #0066cc;
    border-color: #0066cc;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0052a3;
    border-color: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pces-hero .btn-primary {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #007bff;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.pces-hero .btn-primary:hover {
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ===== SERVICES SECTION STYLES ===== */
.pces-services {
    background-color: #f8f9fa;
}

.pces-services h2 {
    color: #333;
    font-weight: 700;
    font-size: 2.5rem;
}

.service-card {
    position: relative;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 3px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.service-card h4 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.service-card p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.service-card .d-flex {
    transition: transform 0.3s ease;
}

.service-card:hover .d-flex {
    transform: translateX(4px);
}

.service-card img {
    transition: transform 0.3s ease;
}

.service-card:hover img {
    transform: scale(1.1);
}

.service-card:hover .service-icon {
    color: #0056b3;
    transform: scale(1.1);
}

/* ===== DIFFERENTIATORS SECTION STYLES ===== */
.pces-differentiators {
    background-color: #ffffff;
}

.pces-differentiators h2 {
    color: #333;
    font-weight: 700;
    font-size: 2.5rem;
}

.differentiator-card {
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.differentiator-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.differentiator-icon {
    color: #007bff;
    transition: all 0.3s ease;
}

.differentiator-card:hover .differentiator-icon {
    color: #0056b3;
    transform: scale(1.1);
}

.differentiator-card h5 {
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.differentiator-card p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 0;
}

/* ===== CLIENT LOGOS SECTION STYLES ===== */
.pces-clients {
    background-color: #f8f9fa;
}

.pces-clients h2 {
    color: #333;
    font-weight: 700;
    font-size: 2.5rem;
}

.client-logo-wrapper {
    padding: 20px;
    transition: all 0.3s ease;
}

.client-logo {
    max-height: 80px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
    object-fit: contain;
}

.client-logo-wrapper:hover .client-logo {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.client-logo-wrapper:hover {
    transform: translateY(-2px);
}

/* Ensure logos are properly centered and sized */
.client-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .pces-hero {
        padding: 60px 0;
        background: url('path-to-your-hero-image.jpg') no-repeat center center;
        background-size: cover;
        position: relative;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-tagline {
        font-size: 1.1rem;
    }
    
    .pces-services h2 {
        font-size: 2rem;
    }
    
    .pces-differentiators h2 {
        font-size: 2rem;
    }
    
    .pces-clients h2 {
        font-size: 2rem;
    }
    
    /* Fix service card logo sizing on mobile */
    .service-card img {
        width: 32px !important;
        height: 32px !important;
    }
    
    .service-card h4 {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .pces-hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .pces-services h2 {
        font-size: 1.75rem;
    }
    
    .pces-differentiators h2 {
        font-size: 1.75rem;
    }
    
    .pces-clients h2 {
        font-size: 1.75rem;
    }
    
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    /* Further reduce service card logo sizing on very small screens */
    .service-card img {
        width: 28px !important;
        height: 28px !important;
    }
    
    .service-card h4 {
        font-size: 1rem;
    }
    
    .service-card .d-flex {
        align-items: flex-start !important;
    }
    
    .service-card .d-flex img {
        margin-top: 2px;
        flex-shrink: 0;
    }
    
    .differentiator-card {
        margin-bottom: 1.5rem;
        min-height: 180px;
    }
    
    .client-logo {
        max-height: 60px;
    }
    
    .client-logo-wrapper {
        min-height: 100px;
        padding: 15px;
    }
}

/* ===== HEADER STYLES ===== */
.pces-header {
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease;
}

.pces-header .navbar-brand {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.pces-header .navbar-brand img {
    transition: all 0.3s ease;
}

.pces-header .navbar-nav {
    margin-left: 2rem;
}

.pces-header .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.pces-header .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.pces-header .nav-link:hover::after,
.pces-header .nav-link:focus::after {
    transform: scaleX(1);
}

.pces-header .btn {
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.pces-header .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Mobile menu styles */
.pces-header .navbar-toggler {
    padding: 0.5rem;
    border: 1px solid;
    border-radius: 4px;
}

.pces-header .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.1);
    outline: none;
}

.pces-header .navbar-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .pces-header .navbar-collapse {
        padding: 1rem 0;
        margin-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .pces-header .nav-link {
        padding: 0.75rem 0;
    }
    
    .pces-header .nav-link::after {
        display: none;
    }
    
    .pces-header .d-flex {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }
}

/* Sticky header effect */
.pces-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    animation: slideDown 0.5s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Add padding to body when header is sticky */
body.admin-bar .pces-header.sticky {
    top: 32px; /* Account for WordPress admin bar */
}

/* ===== GROWTH METRICS SECTION STYLES ===== */
.pces-metrics {
    background-color: #ffffff;
}

.pces-metrics h2 {
    color: #333;
    font-weight: 700;
    font-size: 2.5rem;
}

.metrics-chart {
    padding: 20px;
    transition: all 0.3s ease;
}

.metrics-chart h4 {
    color: #333;
    font-weight: 600;
    font-size: 1.25rem;
}

.chart-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.metrics-chart:hover .chart-image {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Ensure consistent chart sizing */
.chart-image {
    max-height: 400px;
    object-fit: contain;
}

/* Responsive adjustments for metrics */
@media (max-width: 768px) {
    .pces-metrics h2 {
        font-size: 2rem;
    }
    
    .metrics-chart {
        margin-bottom: 2rem;
    }
    
    .chart-image {
        max-height: 300px;
    }
}

@media (max-width: 576px) {
    .pces-metrics h2 {
        font-size: 1.75rem;
    }
    
    .metrics-chart h4 {
        font-size: 1.1rem;
    }
    
    .chart-image {
        max-height: 250px;
    }
}

/* ===== FOOTER STYLES ===== */
.pces-footer {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    position: relative;
    z-index: 10;
}

.pces-footer a {
    transition: color 0.3s ease, opacity 0.3s ease;
    text-decoration: none;
}

.pces-footer a:hover {
    opacity: 0.8;
}

.pces-footer .social-links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.pces-footer .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: white;
    color: #ffffff ; /* Force white color for all icons */
}

.pces-footer .social-link:hover {
    background-color: rgb(255, 255, 255);
    transform: translateY(-2px);
}

.pces-footer .social-link i {
    color: inherit;
}

.pces-footer h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.pces-footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: currentColor;
    opacity: 0.7;
}

.pces-footer ul.list-unstyled li {
    margin-bottom: 0.75rem;
}

.pces-footer ul.list-unstyled a {
    display: inline-block;
    padding: 0.25rem 0;
    position: relative;
}

.pces-footer ul.list-unstyled a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.pces-footer ul.list-unstyled a:hover::after {
    width: 100%;
}

.pces-footer address i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

/* Footer Logo */
.pces-footer .footer-logo {
    max-height: 70px !important;
    width: auto;
    transition: all 0.3s ease;
}

/* Make logo even larger on larger screens */
@media (min-width: 992px) {
    .pces-footer .footer-logo {
        max-height: 80px;  /* Even larger on desktop */
    }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .pces-footer .col-lg-4 {
        margin-bottom: 2rem;
    }
}

@media (max-width: 767.98px) {
    .pces-footer {
        text-align: center;
    }
    
    .pces-footer .social-links {
        justify-content: center !important;
    }
    
    .pces-footer h5::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ===== UTILITY CLASSES ===== */
.min-vh-75 {
    min-height: 75vh;
}

/* ===== GENERAL IMPROVEMENTS ===== */
.pces-services .container,
.pces-hero .container {
    max-width: 1200px;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
.btn:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.hero-shape {
    width: 100%;
    height: 100%;
    background-color: #0052a3;
    clip-path: polygon(
        0 0,       /* top-left */
        70% 0,     /* top horizontal */
        100% 0,    /* top-right */
        100% 100%, /* bottom-right */
        70% 100%,  /* bottom horizontal */
        39% 100%,  /* left bottom inner */
        39% 56%,   /* up inner */
        0 56%      /* back to left */
    );
    border-radius: 20px; /* rounded corners */
}
