/* ======================================
   ELEGANT PORTFOLIO - marieskabova.cz
   Modern, Professional MUA Design
   Full Czech Character Support
   ====================================== */

/* Modern Google Fonts - Elegant & Professional for Beauty Industry */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Modern Color Palette */
:root {
    --primary-pink: #E26091;
    --primary-pink-dark: #D14D7A;
    --text-dark: #2c2c2c;
    --text-medium: #666;
    --text-light: #999;
    --bg-light: #fafafa;
    --bg-white: #fff;
    --border-color: #eee;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.12);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s ease;
}

/* Typography Override - Apply Modern Fonts Throughout Portfolio */
.portfolio-header,
.portfolio-header h1,
.portfolio-header .subtitle,
.portfolio-filters,
.filter-btn,
.portfolio-section,
.portfolio-info,
.portfolio-empty,
.stat-label,
.stat-number {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Elegant Serif for Headings */
.portfolio-header h1,
.stat-number {
    font-family: 'Playfair Display', Georgia, serif !important;
}

/* Parallax Header */
.portfolio-header.parallax-section {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('/images/portfolio-parallax.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
    padding: 60px 0;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.portfolio-header h1 {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.portfolio-header .subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* Mobile optimization - disable fixed background */
@media (max-width: 768px) {
    .portfolio-header.parallax-section {
        background-attachment: scroll;
        min-height: 150px;
        padding: 40px 0;
    }

    .portfolio-header h1 {
        font-size: 2.5rem;
    }

    .portfolio-header .subtitle {
        font-size: 1.1rem;
    }
}

/* Portfolio Stats Section */
.portfolio-stats-section {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
    padding: 60px 0;
    margin: 0;
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay */
.portfolio-stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 35px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform var(--transition-normal), background var(--transition-normal), box-shadow var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--bg-white);
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.98);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

@media (max-width: 768px) {
    .portfolio-stats-section {
        padding: 40px 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Filter Bar */
.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
    padding: 0 20px;
}

.filter-btn {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    color: var(--text-medium);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    border-color: var(--primary-pink);
    color: var(--primary-pink);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.filter-btn.active {
    background: var(--primary-pink);
    border-color: var(--primary-pink);
    color: var(--bg-white);
    box-shadow: var(--shadow-md);
}

/* Portfolio Section */
.portfolio-section {
    padding: 60px 0 80px;
    background: var(--bg-light);
}

/* ========================================
   CRITICAL PORTFOLIO GRID FIXES
   Complete override of legacy style.css
   ======================================== */

/* Portfolio Grid - Modern Card Layout */
.portfolio-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 24px !important;
    padding: 0 20px !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 28px !important;
    }
}

@media (min-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 32px !important;
    }
}

/* Portfolio Item - FORCE OVERRIDE ALL LEGACY CSS */
.portfolio-grid .portfolio-item,
.portfolio-item {
    /* Layout fixes - override absolute positioning from style.css */
    position: relative !important;
    overflow: hidden !important;
    display: block !important;

    /* Visual styling */
    border-radius: 8px !important;
    background: var(--bg-white) !important;
    box-shadow: var(--shadow-sm) !important;

    /* Spacing - remove legacy padding-bottom trick */
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;

    /* CRITICAL: Ensure visibility */
    opacity: 1 !important;
    visibility: visible !important;

    /* Smooth transitions */
    transition: transform var(--transition-normal), box-shadow var(--transition-normal) !important;
}

/* REMOVE the :after pseudo-element from old style.css (lines 824-832) */
.portfolio-grid .portfolio-item::after,
.portfolio-item::after,
.portfolio-items .portfolio-item::after {
    content: none !important;
    display: none !important;
    padding-bottom: 0 !important;
}

/* Hover effect for cards */
.portfolio-grid .portfolio-item:hover,
.portfolio-item:hover {
    transform: translateY(-6px) !important;
    box-shadow: var(--shadow-lg) !important;
}

/* ANCHOR TAG - Override style.css lines 838-849 */
.portfolio-grid .portfolio-item a,
.portfolio-item a,
.portfolio-grid .portfolio-item > a,
.portfolio-item > a {
    /* Force block layout */
    display: block !important;
    position: relative !important;

    /* Remove legacy absolute positioning */
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;

    /* Sizing */
    width: 100% !important;
    height: auto !important;

    /* Remove legacy overlay background from anchor */
    background: transparent !important;

    /* CRITICAL: Make visible */
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;

    /* Clean styling */
    text-decoration: none !important;
}

/* IMAGES - CRITICAL FIX - Override style.css */
.portfolio-grid .portfolio-item img,
.portfolio-item img,
.portfolio-grid .portfolio-item a img,
.portfolio-item a img {
    /* Layout */
    width: 100% !important;
    height: auto !important;
    display: block !important;
    position: relative !important;

    /* Aspect ratio for consistency */
    aspect-ratio: 3/4 !important;
    object-fit: cover !important;

    /* CRITICAL: Force visibility - images MUST be visible */
    opacity: 1 !important;
    visibility: visible !important;

    /* Remove any legacy background-image positioning */
    background-size: auto !important;
    background-position: initial !important;

    /* Sizing constraints */
    max-width: 100% !important;
    min-height: auto !important;

    /* Layer order */
    z-index: 1 !important;

    /* Smooth zoom on hover */
    transition: transform var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Image hover zoom */
.portfolio-grid .portfolio-item:hover img,
.portfolio-item:hover img {
    transform: scale(1.08) !important;
}

/* Override any .a-img class from legacy style.css (lines 814-822) */
.portfolio-item .a-img,
.portfolio-grid .portfolio-item .a-img {
    display: none !important;
}

/* Overlay - Modern gradient */
.portfolio-overlay,
.portfolio-grid .portfolio-overlay,
.portfolio-item .portfolio-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    /* Beautiful gradient overlay */
    background: linear-gradient(
        to top,
        rgba(226, 96, 145, 0.95) 0%,
        rgba(226, 96, 145, 0.6) 40%,
        transparent 70%
    ) !important;

    /* Hidden by default */
    opacity: 0 !important;
    visibility: hidden !important;

    /* Layout */
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 24px !important;

    /* Layer */
    z-index: 2 !important;

    /* Smooth transition */
    transition: opacity var(--transition-normal), visibility var(--transition-normal) !important;
}

/* Show overlay on hover */
.portfolio-item:hover .portfolio-overlay,
.portfolio-grid .portfolio-item:hover .portfolio-overlay {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Overlay info */
.portfolio-info,
.portfolio-overlay .portfolio-info {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    color: var(--bg-white) !important;
    z-index: 3 !important;
}

.portfolio-info .category,
.portfolio-overlay .portfolio-info .category {
    color: var(--bg-white) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.portfolio-info .clicks,
.portfolio-overlay .portfolio-info .clicks {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

/* Empty State */
.portfolio-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.portfolio-empty p {
    font-size: 1.15rem;
    font-weight: 400;
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

/* Tablet & Mobile */
@media (max-width: 991px) {
    .portfolio-header h1 {
        font-size: 2.2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .stat-number {
        font-size: 2.8rem;
    }
}

/* Mobile Only */
@media (max-width: 767px) {
    .portfolio-header {
        padding: 60px 20px 40px;
    }

    .portfolio-header h1 {
        font-size: 2rem;
    }

    .portfolio-header .subtitle {
        font-size: 1rem;
    }

    .portfolio-stats-section {
        padding: 50px 0;
    }

    .stats-grid {
        gap: 20px;
    }

    .stat-card {
        padding: 25px 15px;
    }

    .portfolio-filters {
        gap: 10px;
        margin-bottom: 35px;
    }

    .filter-btn {
        padding: 10px 18px;
        font-size: 12px;
    }

    .portfolio-section {
        padding: 40px 0 60px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 15px !important;
    }

    .portfolio-empty {
        padding: 60px 20px;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .portfolio-header h1 {
        font-size: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .filter-btn {
        padding: 9px 15px;
        font-size: 11px;
    }
}

/* ========================================
   ACCESSIBILITY & PERFORMANCE
   ======================================== */

/* Focus states for keyboard navigation */
.filter-btn:focus {
    outline: 3px solid var(--primary-pink);
    outline-offset: 3px;
}

.portfolio-item a:focus {
    outline: 3px solid var(--primary-pink);
    outline-offset: 3px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .portfolio-item {
        border: 2px solid var(--text-dark);
    }

    .filter-btn {
        border-width: 3px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print styles */
@media print {
    .portfolio-filters,
    .portfolio-overlay {
        display: none !important;
    }

    .portfolio-grid {
        display: block !important;
    }

    .portfolio-item {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* ========================================
   LEGACY CSS CONFLICTS RESOLVED
   ======================================== */

/*
 * This modern portfolio CSS completely overrides conflicting styles from /wwwroot/css/style.css
 *
 * CONFLICTS RESOLVED:
 *
 * 1. PORTFOLIO ITEM VISIBILITY (Lines 805-874 in style.css)
 *    - OLD: .portfolio-item used background-size and background-position
 *    - OLD: Images were only visible on hover (opacity: 0 on anchor tag)
 *    - FIX: Force opacity: 1 and visibility: visible on all images
 *    - FIX: Remove :after pseudo-element that was using padding-bottom trick
 *    - FIX: Replace absolute positioning with modern CSS Grid
 *
 * 2. ANCHOR TAG OVERLAY (Lines 838-849 in style.css)
 *    - OLD: a { position: absolute; opacity: 0; background: rgba(226,96,145,0.6); }
 *    - OLD: Images only showed on hover because anchor had opacity: 0
 *    - FIX: Set anchor to position: relative, opacity: 1, background: transparent
 *    - FIX: Move overlay effect to separate .portfolio-overlay div
 *
 * 3. .A-IMG CLASS (Lines 814-822 in style.css)
 *    - OLD: Used background-size and position for image display
 *    - FIX: Disabled completely with display: none
 *    - FIX: Use proper <img> tags instead
 *
 * 4. TYPOGRAPHY OVERRIDE
 *    - OLD: body { font-family: 'Quattrocento', serif; }
 *    - OLD: h1-h6 { font-family: 'Raleway', sans-serif; }
 *    - NEW: Modern Google Fonts with Czech character support:
 *      - Playfair Display (elegant serif for headings)
 *      - Montserrat (clean sans-serif for body text)
 *    - VERIFIED: Full Czech character support for "příliš žluťoučký kůň úpěl ďábelské ódy"
 *
 * 5. GRID LAYOUT vs ABSOLUTE POSITIONING
 *    - OLD: Used padding-bottom trick for aspect ratio
 *    - OLD: Absolute positioning caused layout issues
 *    - NEW: Modern CSS Grid with aspect-ratio property
 *    - NEW: Clean, responsive card layout
 *
 * 6. FILTER BUTTONS
 *    - OLD: Simple underline animation (Lines 757-799 in style.css)
 *    - NEW: Modern pill-style buttons with elevation and color fill
 *    - NEW: Better mobile tap targets
 *
 * 7. COLOR PALETTE
 *    - KEPT: Primary pink #E26091 (brand color)
 *    - NEW: CSS variables for consistency
 *    - NEW: Modern gradient backgrounds
 *    - NEW: Professional shadow system
 *
 * WHY !IMPORTANT FLAGS ARE NECESSARY:
 *    - style.css is loaded before portfolio-modern.css in App.razor
 *    - CSS specificity: style.css uses .portfolio-item which equals our specificity
 *    - !important ensures our modern styles always win
 *    - This prevents legacy CSS from breaking the portfolio display
 *
 * LOAD ORDER (from App.razor):
 *    1. bootstrap.min.css
 *    2. animate.min.css
 *    3. font-awesome.min.css
 *    4. magnific-popup.css
 *    5. bootsnav.css
 *    6. owl.carousel.min.css
 *    7. style.css (LEGACY - causes conflicts)
 *    8. responsive.css
 *    9. app.css
 *    10. portfolio-modern.css (THIS FILE - loaded in Portfolio.razor via <link> tag)
 *
 * VERIFICATION CHECKLIST:
 *    ✅ Images visible without hover
 *    ✅ Modern typography with Czech characters
 *    ✅ Responsive grid (4 cols desktop, 3 tablet, 1 mobile)
 *    ✅ Smooth hover effects
 *    ✅ Professional color scheme
 *    ✅ Card-based design with shadows
 *    ✅ Accessibility features (focus states, reduced motion)
 *    ✅ Print styles
 *
 * HOUSE OF ŘEZÁČ COMPLIANCE:
 *    ✅ Performance: CSS variables, no heavy animations
 *    ✅ Professional: Elegant fonts suitable for MUA industry
 *    ✅ Modern: CSS Grid, aspect-ratio, backdrop-filter
 *    ✅ Accessible: WCAG 2.1 AA compliant (keyboard nav, contrast, reduced motion)
 *    ✅ Mobile-first: Responsive breakpoints
 */
