/**
 * JC Solar Cebu - Accreditation Page Styles
 * Mobile-first responsive design with GSAP animations
 */

/* ============================================
   CSS Variables - Design System
   ============================================ */
:root {
    --color-primary: #0E0D1B;
    --color-secondary: #fbc30d;
    --color-light: #F2F4E9;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Base & Reset
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Page Header
   Note: Uses default styles from custom.css
   ============================================ */

/* ============================================
   Hero Section
   ============================================ */
.accreditation-hero {
    padding: 80px 0;
    background: var(--color-light);
}

.accreditation-hero-content {
    text-align: center;
}

.accreditation-hero-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-light);
}

/* ============================================
   Accreditation Showcase
   ============================================ */
.accreditation-showcase {
    padding: 60px 0;
    padding-top: 0px !important;
    background: var(--color-light);
    min-height: 600px;
}

#accreditation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* ============================================
   Mobile Carousel Styles
   ============================================ */
.accreditation-carousel-wrapper {
    display: none;
    overflow: hidden;
    padding: 20px 0;
    position: relative;
}

.accreditation-carousel-wrapper .swiper-wrapper {
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.accreditation-carousel-wrapper .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: auto;
    position: relative;
    padding: 0 6px;
    box-sizing: border-box;
}

/* Carousel Navigation Arrows */
.accreditation-carousel-wrapper .swiper-button-prev,
.accreditation-carousel-wrapper .swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    z-index: 10;
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow-md);
}

.accreditation-carousel-wrapper .swiper-button-prev:disabled,
.accreditation-carousel-wrapper .swiper-button-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.accreditation-carousel-wrapper .swiper-button-prev:disabled:hover,
.accreditation-carousel-wrapper .swiper-button-next:disabled:hover {
    background: var(--color-primary);
    transform: translateY(-50%);
}

.accreditation-carousel-wrapper .swiper-button-prev {
    left: -20px;
}

.accreditation-carousel-wrapper .swiper-button-next {
    right: -20px;
}

.accreditation-carousel-wrapper .swiper-button-prev:hover,
.accreditation-carousel-wrapper .swiper-button-next:hover,
.accreditation-carousel-wrapper .swiper-button-prev:focus,
.accreditation-carousel-wrapper .swiper-button-next:focus {
    background: var(--color-secondary);
    outline: none;
    transform: translateY(-50%) scale(1.1);
}

.accreditation-carousel-wrapper .swiper-button-prev i,
.accreditation-carousel-wrapper .swiper-button-next i {
    color: var(--color-white);
    font-size: 1.2rem;
}

.accreditation-carousel-wrapper .swiper-button-prev::after,
.accreditation-carousel-wrapper .swiper-button-next::after {
    display: none;
}

/* Carousel Pagination */
.accreditation-carousel-wrapper .swiper-pagination {
    position: relative;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.accreditation-carousel-wrapper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(14, 13, 27, 0.2);
    opacity: 1;
    transition: all var(--transition-speed);
    border-radius: 50%;
    cursor: pointer;
}

.accreditation-carousel-wrapper .swiper-pagination-bullet:hover {
    background: rgba(14, 13, 27, 0.5);
}

.accreditation-carousel-wrapper .swiper-pagination-bullet-active {
    width: 30px;
    border-radius: 10px;
    background: var(--color-secondary);
}

/* Hide scrollbar but keep functionality */
.accreditation-carousel-wrapper .swiper-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
    touch-action: pan-y;
}

.accreditation-carousel-wrapper .swiper-wrapper::-webkit-scrollbar {
    display: none;
}

/* Carousel cards adjustments */
.accreditation-carousel-wrapper .accreditation-card {
    height: auto;
    min-height: 100%;
}

/* Touch-friendly swipe indicator */
.accreditation-carousel-wrapper::before {
    content: '';
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: rgba(14, 13, 27, 0.1);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 5;
}

/* Loading state for carousel */
.accreditation-carousel-wrapper.loading .swiper-wrapper {
    opacity: 0;
}

.accreditation-carousel-wrapper.loading .swiper-wrapper::after {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-text-light);
}

/* Accreditation Card */
.accreditation-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed);
    opacity: 1;
    transform: translateY(0);
}

/* Mobile-optimized card padding */
@media (max-width: 767px) {
    .accreditation-card {
        padding: 20px;
    }
}

.accreditation-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.accreditation-card.hidden {
    display: none;
}

.accreditation-card.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

/* Card Header */
.accreditation-card-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

/* Mobile-optimized header spacing */
@media (max-width: 767px) {
    .accreditation-card-header {
        gap: 12px;
        margin-bottom: 15px;
    }
}

.accreditation-logo {
    width: 80px;
    height: 80px;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-light);
    border-radius: 12px;
    padding: 10px;
    transition: all var(--transition-speed);
}

/* Mobile-optimized logo size */
@media (max-width: 767px) {
    .accreditation-logo {
        width: 64px;
        height: 64px;
        min-width: 64px;
        padding: 8px;
    }
}

.accreditation-card:hover .accreditation-logo {
    background: var(--color-secondary);
    transform: rotate(5deg);
}

.accreditation-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.accreditation-logo img.logo-fallback {
    opacity: 0.8;
    padding: 5px;
}

.accreditation-card-title {
    flex: 1;
}

.accreditation-card-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.accreditation-category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-light);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
}

.accreditation-category-badge.government {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.accreditation-category-badge.industry {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.accreditation-category-badge.partners {
    background: rgba(251, 191, 36, 0.15);
    color: #d97706;
}

/* Card Body */
.accreditation-card-body {
    margin-bottom: 20px;
}

/* Mobile-optimized card body spacing */
@media (max-width: 767px) {
    .accreditation-card-body {
        margin-bottom: 15px;
    }
}

.accreditation-card-body p {
    color: var(--color-text-light);
    line-height: 1.7;
    margin: 0;
}

/* Card Details */
.accreditation-card-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 15px;
}

/* Mobile-optimized card details spacing */
@media (max-width: 767px) {
    .accreditation-card-details {
        gap: 10px;
        padding: 12px 0;
        margin-bottom: 12px;
    }
}

.accreditation-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.accreditation-detail-item i {
    width: 20px;
    color: var(--color-secondary);
    text-align: center;
}

.accreditation-detail-item span {
    color: var(--color-text);
}

/* Status Badge - Simplified for privacy */
.accreditation-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(14, 13, 27, 0.08);
    color: var(--color-primary);
}

/* ============================================
   Trust Section
   ============================================ */
.accreditation-trust-section {
    padding: 80px 0;
    background: var(--color-white);
}

.trust-content-body p {
    color: var(--color-text-light);
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.trust-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trust-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--color-text);
    line-height: 1.6;
}

.trust-features li i {
    color: #22c55e;
    font-size: 1.2rem;
    margin-top: 2px;
}

.trust-features li strong {
    color: var(--color-primary);
}

.trust-image {
    position: relative;
}

.trust-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Magnific Popup Custom Styles
   NOTE: Certificate lightbox disabled for data privacy
   These styles retained for potential future use
   ============================================ */

/* ============================================
   Responsive Design
   ============================================ */

/* Small devices (576px and up) */
@media (min-width: 576px) {
    #accreditation-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .accreditation-card-details {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .accreditation-detail-item {
        flex: 1 1 calc(50% - 10px);
    }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
    .accreditation-hero {
        padding: 100px 0;
    }

    .accreditation-showcase {
        padding: 80px 0;
    }

    .accreditation-trust-section {
        padding: 100px 0;
    }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
    #accreditation-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .accreditation-logo {
        width: 100px;
        height: 100px;
        min-width: 100px;
    }

    .accreditation-card {
        padding: 40px;
    }

    .accreditation-card-title h3 {
        font-size: 1.5rem;
    }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
    .accreditation-showcase {
        padding: 100px 0;
    }

    #accreditation-grid {
        gap: 40px;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
    /* Hide grid, show carousel */
    #accreditation-grid {
        display: none !important;
    }

    #accreditation-grid[aria-hidden="true"] {
        display: none !important;
    }

    .accreditation-carousel-wrapper {
        display: block !important;
    }

    .accreditation-carousel-wrapper[aria-hidden="true"] {
        display: none !important;
    }

    .accreditation-carousel-wrapper.swiper[aria-hidden="false"] {
        display: block !important;
    }

    /* Adjust carousel for mobile */
    .accreditation-carousel-wrapper {
        padding: 10px 15px 30px;
    }

    .accreditation-carousel-wrapper .swiper-button-prev {
        left: -5px;
    }

    .accreditation-carousel-wrapper .swiper-button-next {
        right: -5px;
    }

    .accreditation-carousel-wrapper .swiper-button-prev,
    .accreditation-carousel-wrapper .swiper-button-next {
        width: 36px;
        height: 36px;
    }

    .accreditation-carousel-wrapper .swiper-button-prev i,
    .accreditation-carousel-wrapper .swiper-button-next i {
        font-size: 1rem;
    }

    /* Show part of next slide as hint */
    .accreditation-carousel-wrapper .swiper-slide {
        width: 92%;
        opacity: 0.5;
        transition: opacity 0.3s;
    }

    .accreditation-carousel-wrapper .swiper-slide-active {
        opacity: 1;
    }

    .accreditation-carousel-wrapper .swiper-slide-next {
        opacity: 0.7;
    }

    .accreditation-carousel-wrapper .swiper-slide-prev {
        opacity: 0.7;
    }

    .accreditation-hero {
        padding: 60px 0;
    }

    .accreditation-hero-content p {
        font-size: 1rem;
    }

    .accreditation-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Extra small devices */
@media (max-width: 374px) {
    .accreditation-carousel-wrapper {
        padding: 10px 12px 30px;
    }

    .accreditation-carousel-wrapper .swiper-slide {
        width: 94%;
    }

    .accreditation-card {
        padding: 16px;
    }

    .accreditation-logo {
        width: 56px;
        height: 56px;
        min-width: 56px;
    }
}

@media (min-width: 768px) {
    /* Hide carousel on desktop, show grid */
    .accreditation-carousel-wrapper {
        display: none !important;
    }

    .accreditation-carousel-wrapper[aria-hidden="true"] {
        display: none !important;
    }

    #accreditation-grid {
        display: grid !important;
    }

    #accreditation-grid[aria-hidden="false"] {
        display: grid !important;
    }
}

/* ============================================
   Accessibility Enhancements
   ============================================ */

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .accreditation-card,
    .accreditation-logo {
        transition: none;
    }

    .accreditation-card:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .accreditation-card {
        border: 2px solid var(--color-primary);
    }
}

/* ============================================
   Animation Classes
   ============================================ */
.accreditation-card.fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* GSAP-friendly classes */
.gsap-reveal {
    opacity: 0;
    transform: translateY(30px);
}

.gsap-reveal.animated {
    opacity: 1;
    transform: translateY(0);
}
