/* ========================================
   MUSCAT POLYMERS - CUSTOM ANIMATIONS
   Modern animations for new pages
   ======================================== */

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(66, 153, 225, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(66, 153, 225, 0.8);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   UTILITY ANIMATION CLASSES
   ======================================== */

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

.glow-animation {
    animation: glow 2s ease-in-out infinite;
}

.rotate-slow {
    animation: rotate 20s linear infinite;
}

/* ========================================
   MODERN CARD STYLES
   ======================================== */

.modern-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #4299e1, #3182ce);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.modern-card:hover::before {
    transform: scaleX(1);
}

.modern-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Flip Card - Theme Colors */
.facility-flip-card {
    perspective: 1000px;
    height: 350px;
    margin-bottom: 30px;
}

.facility-flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.facility-flip-card:hover .facility-flip-card-inner {
    transform: rotateY(180deg);
}

.facility-flip-card-front,
.facility-flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.facility-flip-card-front {
    background: var(--primary-color);
    color: white;
}

.facility-flip-card-front .icon-box {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.facility-flip-card-front .icon-box i {
    font-size: 40px;
    color: white;
}

.facility-flip-card-front h3 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 700;
}

.facility-flip-card-front p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

.facility-flip-card-back {
    background: var(--accent-color);
    color: white;
    transform: rotateY(180deg);
}

.facility-flip-card-back h4 {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 700;
}

.facility-flip-card-back ul {
    list-style: none;
    padding: 0;
    text-align: left;
    width: 100%;
}

.facility-flip-card-back ul li {
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.facility-flip-card-back ul li:last-child {
    border-bottom: none;
}

.facility-flip-card-back ul li i {
    margin-right: 10px;
    color: white;
}

/* ========================================
   TIMELINE STYLES - Production Process
   ======================================== */

.production-timeline {
    position: relative;
    padding: 30px 0;
}

.timeline-step {
    margin-bottom: 40px;
    position: relative;
}

.timeline-step .timeline-number {
    position: absolute;
    left: -80px;
    top: 0;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(124, 135, 127, 0.3);
}

.timeline-step .vision-mission-item {
    transition: all 0.3s ease;
}

.timeline-step:hover .vision-mission-item {
    transform: translateX(10px);
}

.timeline-step:hover .timeline-number {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(124, 135, 127, 0.5);
}

/* ========================================
   PROGRESS BARS
   ======================================== */

.circular-progress {
    position: relative;
    width: 150px;
    height: 150px;
}

.circular-progress svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circular-progress circle {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
}

.circular-progress .bg-circle {
    stroke: #e5e7eb;
}

.circular-progress .progress-circle {
    stroke: #4CAF50;
    stroke-dasharray: 440;
    stroke-dashoffset: 440;
    transition: stroke-dashoffset 1.5s ease;
}

.circular-progress-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
}

/* ========================================
   ACCORDION STYLES
   ======================================== */

.accordion-item {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.accordion-header {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    padding: 0 25px;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    padding: 25px;
}

/* ========================================
   BADGE STYLES
   ======================================== */

.certification-badge {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

.certification-badge::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.certification-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.5);
}

/* ========================================
   STATS COUNTER
   ======================================== */

.stat-box {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
}

/* ========================================
   SPECIAL ICON COLORS
   ======================================== */

.accent-icon i {
    color: #FF8C42 !important;
}

.green-icon i {
    color: #4CAF50 !important;
}

/* Counter Animation Support */
.counter {
    display: inline-block;
    font-weight: 700;
}

/* Stats Counter Box - New Design */
.stats-counter-box {
    text-align: center;
    padding: 30px 20px;
    transition: all 0.3s ease;
}

.stats-counter-circle {
    width: 160px;
    height: 160px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.stats-counter-circle::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    background: white;
    border-radius: 50%;
    z-index: 0;
}

.stats-counter-circle::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border: 3px solid rgba(25, 35, 36, 0.1);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.stats-counter-box:hover .stats-counter-circle {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.stats-counter-number {
    position: relative;
    z-index: 1;
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stats-counter-number .counter {
    font-size: 42px;
}

.stats-counter-number .plus-sign {
    font-size: 32px;
    margin-left: 5px;
    color: var(--accent-color);
}

.stats-counter-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stats-counter-content p {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
    margin: 0;
}

/* How We Work Icon White Color */
.how-we-work .how-we-work-item .icon-box i {
    color: white;
    font-size: 50px;
}

/* CTA Box Enhancement */
.cta-box {
    background: #e02042;
    padding: 60px 0;
}

.cta-box .cta-content h3 {
    color: white;
    font-size: 32px;
    margin-bottom: 15px;
}

.cta-box .cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    margin: 0;
}

.cta-box .cta-btn {
    text-align: right;
}

/* CTA Box Button Styling */
.cta-box .btn-default {
    background: #000000;
    color: #ffffff;
}

.cta-box .btn-default::before {
    background-image: url(../images/arrow-white.svg);
}

.cta-box .btn-default::after {
    background: #ffffff;
}

.cta-box .btn-default:hover {
    background: transparent;
    color: #000000;
}

.cta-box .btn-default:hover::before {
    filter: brightness(0);
}

.cta-box .btn-default:hover::after {
    width: 100%;
    transform: skew(0deg);
    left: 0;
}

/* ========================================
   SUSTAINABILITY PAGE - GREEN THEME
   ======================================== */

/* Sustainability Page CTA - Using Default Red Background (Same as Other Pages) */
/* Removed custom styling to match other pages */

/* Green Icon Colors for Sustainability */
.sustainability-page .about-contact-item .icon-box i {
    color: #4CAF50;
}

.sustainability-page .experience-counter {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.sustainability-page .feedback-counter p {
    color: #4CAF50;
}

/* Sustainability Stats Enhancement */
.sustainability-stats-box {
    background: linear-gradient(135deg, #f1f8f4 0%, #e8f5e9 100%);
    padding: 40px;
    border-radius: 15px;
    margin-top: 30px;
    border-left: 5px solid #4CAF50;
}

.sustainability-stats-box h4 {
    color: #4CAF50;
    font-size: 24px;
    margin-bottom: 20px;
}

/* Green Accent Buttons */
.btn-green {
    background: #4CAF50 !important;
    color: white !important;
}

.btn-green:hover {
    background: #45a049 !important;
}

/* RE PRO Badge */
.repro-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Eco Icon Box */
.eco-icon-box {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.eco-icon-box:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.4);
}

.eco-icon-box i {
    font-size: 36px;
    color: white;
}

/* Green Progress Bar */
.green-progress {
    height: 8px;
    background: #e8f5e9;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

.green-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
    border-radius: 10px;
    transition: width 1.5s ease;
}

/* ========================================
   CERTIFICATIONS PAGE - UNIFORM IMAGE SIZES
   ======================================== */

/* Make all certification images same size */
.certifications-page .portfolio-item {
    margin-bottom: 30px;
}

.certifications-page .portfolio-image {
    height: 350px;
    overflow: hidden;
    border-radius: 10px;
}

.certifications-page .portfolio-image figure {
    height: 100%;
    margin: 0;
}

.certifications-page .portfolio-image figure a {
    display: block;
    height: 100%;
}

.certifications-page .portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.certifications-page .portfolio-content {
    text-align: center;
    padding: 20px 10px;
}

.certifications-page .portfolio-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.certifications-page .portfolio-content p {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
    margin: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .facility-flip-card {
        height: auto;
        min-height: 320px;
    }

    .timeline-step .timeline-number {
        position: relative;
        left: 0;
        margin-bottom: 20px;
    }

    .timeline-step:hover .vision-mission-item {
        transform: none;
    }

    .cta-box .cta-btn {
        text-align: center;
        margin-top: 20px;
    }

    .stat-number {
        font-size: 36px;
    }
}
