/* Enhanced Public CSS with Upload Progress Support - FIXED RESPONSIVE VERSION */
:root {
    --primary-color: #2c5aa0;
    --secondary-color: #1e3a8a;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --progress-color: #3b82f6;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --text-color: #333;
    --light-gray: #e9ecef;
    --grid-gap: 1rem;
    --border-radius: 10px;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
    --upload-progress-height: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    font-weight: 700;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

nav a:hover,
nav a.active {
    background: var(--accent-color);
    color: var(--text-color);
    transform: translateY(-2px);
}

main {
    background: var(--white);
    margin: 2rem auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    min-height: 600px;
    overflow: hidden;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
    padding: 2rem;
    min-height: 500px;
}

.grid-block {
    background: var(--white);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 120px;
    border: 1px solid var(--light-gray);
    position: relative;
}

.grid-block:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.block-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.block-text h1, 
.block-text h2, 
.block-text h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.block-text h1 { font-size: 2.5rem; }
.block-text h2 { font-size: 2rem; }
.block-text h3 { font-size: 1.5rem; }

.block-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-color);
}

.block-text ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.block-text li {
    margin-bottom: 0.5rem;
}

.block-text strong {
    color: var(--primary-color);
}

/* Upload Progress Styles */
.upload-progress {
    width: 100%;
    height: var(--upload-progress-height);
    background: var(--light-gray);
    border-radius: calc(var(--upload-progress-height) / 2);
    overflow: hidden;
    margin: 1rem 0;
    position: relative;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--progress-color), var(--success-color));
    border-radius: calc(var(--upload-progress-height) / 2);
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.upload-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-color);
}

.upload-status.success {
    color: var(--success-color);
}

.upload-status.error {
    color: #ef4444;
}

.media-preview {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.block-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.block-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--white);
}

footer {
    background: var(--text-color);
    color: var(--white);
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(8, 1fr);
        padding: 1.5rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
        padding: 1rem;
        gap: 0.75rem;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    nav a {
        text-align: center;
    }
    
    main {
        margin: 1rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .block-text h1 { font-size: 2rem; }
    .block-text h2 { font-size: 1.6rem; }
    .block-text h3 { font-size: 1.3rem; }
    
    .block-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    header {
        padding: 1rem 0;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .block-content {
        padding: 0.75rem;
    }
}

/* Animation enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid-block {
    animation: fadeInUp 0.6s ease forwards;
}

.grid-block:nth-child(2) { animation-delay: 0.1s; }
.grid-block:nth-child(3) { animation-delay: 0.2s; }
.grid-block:nth-child(4) { animation-delay: 0.3s; }

/* Print styles */
@media print {
    header, footer, nav { display: none; }
    main { box-shadow: none; margin: 0; }
    .grid-block { break-inside: avoid; }
    .upload-progress { display: none; }
}