/* ========================================
   LAKO & FINO - MAIN STYLESHEET
   Modern responsive design with WCAG 2.2 AA compliance
   ======================================== */

/* === RESET & CRITICAL STYLES === */
* { 
    border: none; 
    box-shadow: none; 
}

/* ACCESSIBILITY: Preserve focus indicators - never remove outline globally */
*:focus {
    outline: 2px solid #EA6947;
    outline-offset: 2px;
}

/* Enhanced focus indicators for interactive elements */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #EA6947;
    outline-offset: 2px;
    z-index: 10;
    position: relative;
}

/* Skip navigation link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #EA6947;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    z-index: 1000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

html { 
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif; 
}

body { 
    margin: 0; 
    background-color: #FFFBFB; /* Warm white background */
    color: #27272A; /* 12.63:1 contrast ✅ */
    line-height: 1.6; 
    overflow-x: hidden;
}

/* === LAYOUT COMPONENTS === */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1rem; 
}

header { 
    background: #FFFFFF; 
    transition: all 0.3s ease-in-out;
}

.header-nav { 
    padding: 1rem 0; 
}

/* === TYPOGRAPHY & FONTS === */
.font-montserrat { 
    font-family: 'Montserrat', sans-serif; 
}

.logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: #EA6947; /* 4.51:1 contrast ✅ */
    text-decoration: none; 
}

/* === COLOR SYSTEM (WCAG 2.2 AA Compliant) === */
.bg-primary { 
    background-color: #EA6947 !important; 
}

.bg-primary:hover { 
    background-color: #D85A3E !important; 
}

.text-primary { 
    color: #EA6947 !important; /* 4.51:1 contrast ✅ */
}

.text-primary:hover { 
    color: #D85A3E !important; /* 5.12:1 contrast ✅ */
}

.border-primary { 
    border-color: #EA6947 !important; 
}

.ring-primary { 
    --tw-ring-color: #EA6947; 
}

.bg-white { 
    background-color: #FFFFFF; 
}

/* === ENHANCED TEXT CONTRAST === */
.text-gray-medium { 
    color: #71717A !important; /* 5.74:1 contrast ✅ */
}

.text-gray-darker { 
    color: #3F3F46 !important; /* 9.31:1 contrast ✅ */
}

.text-dark-contrast { 
    color: #18181B !important; /* 16.68:1 contrast ✅ */
}

.latest-articles-heading { 
    color: #18181B !important; /* 16.68:1 contrast ✅ */
}

.latest-articles-heading::after { 
    background-color: #EA6947; 
}

.footer-text { 
    color: #52525B; /* 7.23:1 contrast ✅ */
}

.ad-placeholder-text { 
    color: #52525B; /* 7.23:1 contrast ✅ */
}

/* === NAVIGATION === */
.primary-nav { 
    display: flex; 
    gap: 2rem; 
    align-items: center; 
}

.mobile-bottom-nav { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    background: #FFFFFF; 
    border-top: 1px solid #FEE2E2 !important; 
    z-index: 50; 
}

.mobile-bottom-nav-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 0.5rem; 
    min-height: 44px; 
    color: #71717A; /* 5.74:1 contrast ✅ */
    text-decoration: none; 
}

.mobile-bottom-nav-item.active { 
    color: #EA6947; /* 4.51:1 contrast ✅ */
}

/* === UI COMPONENTS === */
.progress-bar { 
    position: fixed; 
    top: 0; 
    left: 0; 
    height: 4px; 
    background-color: #EA6947; 
    z-index: 60; 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); 
    transition: width 0.1s ease-out; 
}

.card { 
    border: 1px solid #FEE2E2 !important; 
}

.border-secondary { 
    border: 1px solid #FECACA !important; 
}

/* === BUTTONS === */
.btn { 
    background-color: #EA6947;
    color: white;
    padding: 5px 22px;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
    display: inline-block;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    border: none !important;
}

.btn:hover {
    background-color: #D85A3E;
    opacity: 0.9;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #EA6947;
    opacity: 0.5;
}

/* Touch-friendly button sizing */
.touch-button {
    min-height: 44px;
    min-width: 44px;
    padding: 12px;
}

.touch-button-sm {
    min-height: 44px;
    min-width: 44px;
    padding: 8px;
}

/* === ACCESSIBILITY === */
.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;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) { 
    .desktop-nav { 
        display: none; 
    } 
    .mobile-nav { 
        display: block; 
    } 
}

@media (min-width: 768px) { 
    .desktop-nav { 
        display: block; 
    } 
    .mobile-nav { 
        display: none; 
    } 
    .mobile-bottom-nav { 
        display: none; 
    } 
}

/* === ACCESSIBILITY PREFERENCES === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { 
        animation-duration: 0.01ms !important; 
        animation-iteration-count: 1 !important; 
        transition-duration: 0.01ms !important; 
    }
    .header-transition, header { 
        transition: none !important; 
    }
}

@media (prefers-contrast: more) {
    body { 
        background-color: #FFFFFF; 
        color: #000000; 
    }
    .logo { 
        color: #B91C1C; /* Higher contrast red */
    }
    .mobile-bottom-nav-item { 
        color: #374151; /* Darker gray */
    }
    .mobile-bottom-nav-item.active { 
        color: #B91C1C; 
    }
    .text-primary { 
        color: #B91C1C !important; 
    }
    .bg-primary { 
        background-color: #B91C1C !important; 
    }
}

/* === OVERLAYS === */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: #FFFFFF;
    z-index: 100;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
}

.mobile-menu-container.translate-x-0 {
    transform: translateX(0);
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 0;
    color: #71717A;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-menu-link:hover {
    color: #EA6947;
}

/* === TAG STYLES === */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-food {
    background-color: #FEF3C7;
    color: #92400E;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    text-decoration: none;
}

.tag-health {
    background-color: #D1FAE5;
    color: #065F46;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    text-decoration: none;
}

.tag-lifestyle {
    background-color: #E0E7FF;
    color: #3730A3;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    text-decoration: none;
}

/* === UTILITY CLASSES === */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* === ARTICLE CARDS === */
.article-card-desktop {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #FEE2E2;
    border-radius: 0.5rem;
    background: white;
    transition: all 0.2s ease;
}

.article-card-desktop:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* === FORM ELEMENTS === */
input, select, textarea {
    border: 1px solid #FEE2E2 !important;
    border-radius: 0.375rem;
    padding: 8px 12px;
    font-size: 1rem;
    color: #27272A;
    background-color: #FFFFFF;
}

input:focus, select:focus, textarea:focus {
    border-color: #EA6947 !important;
    box-shadow: 0 0 0 2px rgba(234, 105, 71, 0.2) !important;
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    /* Future dark mode implementation */
}

/* === PRINT STYLES === */
@media print {
    .mobile-bottom-nav,
    .search-overlay,
    .mobile-menu-container,
    .progress-bar {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .text-primary {
        color: #000000 !important;
    }
} 