/* ============================================
   SHARED STYLES & ANIMATIONS
   Consolidated from all templates for better performance
   ============================================ */

/* CSS Variables - Shared across all pages */
:root {
    --primary: #2c3e50;
    --secondary: #e74c3c;
    --accent: #3498db;
    --light: #ecf0f1;
    --dark: #2c3e50;
}

/* Typography */
body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    padding-top: 0;
    margin: 0;
}

/* Reset html margin to avoid gaps in some browsers */
html { margin: 0; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section title animation */
.section-title {
    position: relative;
    margin-bottom: 40px;
    padding-bottom: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--secondary);
}

/* Section content animation */
.section-content {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.section-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card animations */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    margin-bottom: 20px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Hero section animations */
.hero,
.blog-hero {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.hero.visible,
.blog-hero.visible {
    opacity: 1;
    transform: translateY(0);
}

/* List item animation */
.list-item-animated {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease;
}

.list-item-animated.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade-up keyframe animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   IMAGE OPTIMIZATION
   ============================================ */

/* Lazy loading placeholder */
img[loading="lazy"] {
    background-color: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .hero,
    .blog-hero {
        padding: 60px 0;
    }
    
    .card-img-top {
        height: 160px;
    }
    
    .section-title {
        margin-bottom: 30px;
    }
}

