/* Custom CSS for Blog Page - Replacing Tailwind CDN */
/* This file contains only the necessary styles used in blog.html for optimal performance */

/* CSS Variables for Theme Support */
:root {
    /* Light theme variables */
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #374151;
    --text-secondary: #4b5563;
    --text-heading: #111827;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-lg: rgba(0, 0, 0, 0.1);
    --btn-bg: #3b82f6;
    --btn-bg-hover: #2563eb;
    --card-hover-shadow: rgba(0, 0, 0, 0.1);
    
    /* Transition for theme switching */
    --transition-speed: 0.3s;
}

/* Dark theme variables */
[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-card: #1f2937;
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --text-heading: #f9fafb;
    --border-color: #374151;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-color-lg: rgba(0, 0, 0, 0.4);
    --btn-bg: #3b82f6;
    --btn-bg-hover: #2563eb;
    --card-hover-shadow: rgba(0, 0, 0, 0.4);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Removed global transitions for better performance */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    /* Removed body transition for faster rendering */
}

/* Container and Layout */
.max-w-7xl {
    max-width: 80rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

/* Grid System */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-3 {
    gap: 0.75rem;
}

/* Background Colors */
.bg-gray-50 {
    background-color: var(--bg-primary);
}

.bg-white {
    background-color: var(--bg-card);
}

.bg-blue-500 {
    background-color: var(--btn-bg);
}

.bg-blue-600 {
    background-color: var(--btn-bg-hover);
}

/* Text Colors */
.text-gray-900 {
    color: var(--text-heading);
}

.text-gray-600 {
    color: var(--text-secondary);
}

.text-white {
    color: #ffffff;
}

/* Typography */
.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.font-semibold {
    font-weight: 600;
}

/* Spacing */
.mt-2 {
    margin-top: 0.5rem;
}

/* Overflow and Display */
.overflow-hidden {
    overflow: hidden;
}

/* Shadows */
.shadow {
    box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px 0 var(--shadow-color);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px var(--shadow-color-lg), 0 4px 6px -2px var(--shadow-color-lg);
}

/* Border Radius */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* Images */
.w-full {
    width: 100%;
}

.h-48 {
    height: 12rem;
}

.object-cover {
    object-fit: cover;
}

/* Positioning */
.fixed {
    position: fixed;
}

.bottom-6 {
    bottom: 1.5rem;
}

.right-6 {
    right: 1.5rem;
}

/* Opacity and Transitions */
.opacity-0 {
    opacity: 0;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

/* Hover Effects */
.hover\:bg-blue-600:hover {
    background-color: var(--btn-bg-hover);
}

/* SVG Styles */
.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Blog Card - Removed animations for better performance */
.blog-card {
    /* Removed transition for faster loading */
}

.blog-card:hover {
    /* Removed hover effects for better performance */
}

/* Back to Top Button - Removed animations */
#back-to-top {
    /* Removed transition for better performance */
}

#back-to-top:hover {
    /* Removed hover transform for better performance */
    background-color: var(--btn-bg-hover);
}

#back-to-top.show {
    opacity: 1;
}

/* Responsive Design */
@media (min-width: 640px) {
    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .sm\:px-0 {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:px-1 {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Additional Blog-Specific Styles */
.blog-card {
    background: var(--bg-card);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px 0 var(--shadow-color);
    cursor: pointer;
    /* Removed transition for better performance */
    border: 1px solid var(--border-color);
}

.blog-card img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    /* Removed image transition for better performance */
}

.blog-card:hover img {
    /* Removed image scale effect for better performance */
}

.blog-card h2 {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.blog-card p {
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

/* Performance Optimizations - Removed animations for faster loading */
.blog-card {
    /* Removed will-change for better performance */
}

.blog-card img {
    /* Removed will-change for better performance */
}

/* All animations removed for faster page loading */

/* Focus States for Accessibility */
.blog-card:focus {
    outline: 2px solid var(--btn-bg);
    outline-offset: 2px;
}

#back-to-top:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Header styles are inherited from assets/styles.css */


/* Adjust body padding for fixed header */
body {
    padding-top: 70px;
}

body.no-scroll {
    overflow: hidden;
}

/* Footer Styles */
.footer {
    background: #2d3748;
    color: #e2e8f0;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

/* Dark mode footer */
[data-theme="dark"] .footer {
    background: #1a1a1a;
    color: #e2e8f0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    /* Removed transition for better performance */
}

.footer-links a:hover {
    color: var(--btn-bg);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--btn-bg);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    /* Removed transition for better performance */
}

.social-icon:hover {
    /* Removed hover transform for better performance */
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0aec0;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--btn-bg);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    /* Removed transition for better performance */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top-btn:hover {
    background: var(--btn-bg-hover);
    /* Removed hover transform for better performance */
}

.back-to-top-btn.show {
    opacity: 1;
}

/* WhatsApp Contact Button */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: #25d366;
    color: white;
    border-radius: 25px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 200px;
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

.whatsapp-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.whatsapp-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.whatsapp-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.whatsapp-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .whatsapp-btn {
        bottom: 1rem;
        left: 1rem;
        padding: 0.5rem;
        max-width: 50px;
        border-radius: 50%;
        justify-content: center;
    }
    
    .whatsapp-text {
        display: none;
    }
    
    .whatsapp-icon {
        width: 35px;
        height: 35px;
        background: transparent;
    }
}

/* Print Styles */
@media print {
    .blog-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    #back-to-top {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
}
