/* 
 * Pillar & Pew - Main Stylesheet
 * Last Updated: January 28, 2025 - Version 2 (Icon & Image Fixes)
 */

/* Custom scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Feather Icons styling - ensure proper display */
i[data-feather] {
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Custom animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.section-animate {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Article card hover effect - now actually used on index.html */
article.bg-white {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

article.bg-white:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Improved focus states for accessibility */
a:focus,
button:focus,
input:focus,
details:focus {
    outline: 2px solid #c8102e;
    outline-offset: 2px;
}

/* Better form styling */
input[type="email"] {
    border: 2px solid #e5e7eb;
    transition: border-color 0.3s;
}

input[type="email"]:focus {
    border-color: #c8102e;
}

/* Details/Summary enhancement for FAQ */
details summary {
    cursor: pointer;
    user-select: none;
    transition: color 0.3s;
}

details summary:hover {
    color: #c8102e;
}

details[open] summary {
    color: #c8102e;
    margin-bottom: 1rem;
}

/* Loading state for images */
img {
    background-color: #f3f4f6;
}

/* Article card images specific styling */
article img {
    min-height: 192px; /* Ensures h-48 equivalent */
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

/* Image loading animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

article img[src*="unsplash"] {
    animation: shimmer 2s infinite;
    background: linear-gradient(
        90deg,
        #f3f4f6 0%,
        #e5e7eb 20%,
        #f3f4f6 40%,
        #f3f4f6 100%
    );
    background-size: 1000px 100%;
}

/* Custom scrollbar (optional, for modern browsers) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c8102e;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a00d26;
}

/* Responsive typography improvements */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 1.75rem;
    }
}

/* Print styles */
@media print {
    nav, footer, .mobile-menu-button {
        display: none;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="#"]::after {
        content: "";
    }
}

/* Utility class for skip-to-content link (accessibility) */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}
