/* Gracex Customer Feedback - Dark Theme with Orange Accents */

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

/* Modern Color Palette */
:root {
    --primary-gradient: linear-gradient(135deg, #ff9500 0%, #ff6b35 100%);
    --secondary-gradient: linear-gradient(135deg, #ff8c00 0%, #ff4500 100%);
    --accent-gradient: linear-gradient(135deg, #ffa500 0%, #ff7f00 100%);
    --success-gradient: linear-gradient(135deg, #ff9500 0%, #ff6b35 100%);
    
    --primary-color: #ff9500;
    --secondary-color: #ff6b35;
    --accent-color: #ffa500;
    --success-color: #ff9500;
    --warning-color: #ff8c00;
    --danger-color: #ff4500;
    
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #404040;
    --bg-card: #333333;
    --bg-hover: #4a4a4a;
    
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #b0b0b0;
    --text-light: #808080;
    
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-dark: #94a3b8;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --bg-card: #1e293b;
        --bg-hover: #334155;
        
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --text-light: #64748b;
        
        --border-light: #334155;
        --border-medium: #475569;
        --border-dark: #64748b;
    }
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Header */
.header {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header .container {
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Navigation */
.nav {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    left: 0;
}

.nav-link:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-link.active {
    background: var(--primary-gradient);
    color: white;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Content Layout */
.main-content {
    flex: 1;
    padding: 2rem 0;
    background: var(--bg-secondary);
    min-height: calc(100vh - 200px);
}

.main-content .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* Mobile layout - content first, then sidebar */
@media (max-width: 1024px) {
    .main-content .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .sidebar {
        order: 2;
    }
    
    .content {
        order: 1;
    }
}

/* Content Area */
.content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

/* Sidebar */
.sidebar {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 0.75rem;
}

.sidebar h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3rem;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
}

/* Sidebar Widget */
.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

/* Recent Posts */
.recent-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recent-posts li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.recent-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts li:hover {
    transform: translateX(8px);
}

.post-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.5;
    display: block;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
}

.post-link::before {
    content: '→';
    position: absolute;
    left: -1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--accent-color);
}

.recent-posts li:hover .post-link::before {
    opacity: 1;
    left: -1rem;
}

.post-link:hover {
    color: var(--primary-color);
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.4;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary-gradient);
    color: white;
    padding: 0.875rem 1.75rem;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-medium);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.btn-success {
    background: var(--success-gradient);
}

.btn-warning {
    background: var(--secondary-gradient);
}

.btn-danger {
    background: var(--danger-color);
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    margin-top: auto;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
    max-width: 400px;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Posts List */
.posts-list {
    list-style: none;
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
}

.post-item {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 0;
}

.post-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.post-image {
    overflow: hidden;
    position: relative;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-content h3 {
    margin-bottom: 1rem;
}

.post-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-content h3 a:hover {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Article Content */
.article-content {
    position: relative;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.article-content img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 4rem 0;
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1;
}

.error-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.error-page p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.error-actions {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.error-suggestions {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.error-suggestions h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.error-suggestions ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.error-suggestions li a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    font-weight: 500;
}

.error-suggestions li a:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.content,
.sidebar {
    animation: fadeInUp 0.6s ease-out;
}

.post-item {
    animation: slideInLeft 0.6s ease-out;
}

.post-item:nth-child(1) { animation-delay: 0.1s; }
.post-item:nth-child(2) { animation-delay: 0.2s; }
.post-item:nth-child(3) { animation-delay: 0.3s; }
.post-item:nth-child(4) { animation-delay: 0.4s; }
.post-item:nth-child(5) { animation-delay: 0.5s; }

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .sidebar {
        position: static;
        order: 2;
    }
    
    .content {
        order: 1;
    }
    
    .post-item {
        grid-template-columns: 1fr;
    }
    
    .post-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav {
        gap: 0.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border-light);
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    
    .main-nav.mobile-open {
        display: block;
    }
    
    .main-nav.mobile-open .nav {
        flex-direction: column;
        width: 100%;
        padding: 1rem 0;
    }
    
    .main-nav.mobile-open .nav-link {
        text-align: center;
        padding: 1rem 1.5rem;
        border-radius: 0;
        margin: 0;
    }
    
    .main-nav.mobile-open .nav-link:hover {
        background: var(--bg-hover);
        transform: none;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .sidebar {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-section {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-description {
        max-width: 100%;
    }
    
    .error-code {
        font-size: 6rem;
    }
    
    .error-page h1 {
        font-size: 2rem;
    }
    
    .error-page p {
        font-size: 1rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .error-suggestions ul {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .content,
    .sidebar {
        padding: 1rem;
    }
    
    .nav {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        text-align: center;
        padding: 0.75rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    .post-content {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
a:focus,
.btn:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .sidebar {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .content {
        box-shadow: none;
        border: none;
        padding: 0;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}

table th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
    color: var(--text-primary);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

table tr:hover {
    background-color: var(--bg-hover);
    transition: background-color 0.2s ease;
}

/* List Styles */
ul, ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    line-height: 1.6;
}

ul li, ol li {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.6;
}

ul li:last-child, ol li:last-child {
    margin-bottom: 0;
}

ul li strong, ol li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Nested lists */
ul ul, ol ol, ul ol, ol ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Table mobile styles */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 0.8rem;
        margin: 1rem 0;
    }
    
    table th,
    table td {
        padding: 0.75rem 0.5rem;
        min-width: 120px;
    }
    
    table th {
        font-size: 0.75rem;
        padding: 0.75rem 0.5rem;
    }
    
    /* List mobile styles */
    ul, ol {
        padding-left: 1.5rem;
        margin: 1rem 0;
    }
    
    ul li, ol li {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Nested lists mobile */
    ul ul, ol ol, ul ol, ol ul {
        padding-left: 1rem;
        margin: 0.25rem 0;
    }
}

@media (max-width: 480px) {
    table {
        font-size: 0.75rem;
    }
    
    table th,
    table td {
        padding: 0.5rem 0.25rem;
        min-width: 100px;
    }
    
    table th {
        font-size: 0.7rem;
    }
    
    ul, ol {
        padding-left: 1.25rem;
    }
    
    ul li, ol li {
        font-size: 0.85rem;
    }
}