/* Page Layout Styles for Top Navigation Structure */

/* Container System */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    width: 100%;
}

/* Page Container */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Page Header */
.page-header {
    padding: 48px 0 40px !important;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary)) !important;
    border-bottom: 1px solid var(--border-light) !important;
    margin-bottom: 0;
    color: var(--text-primary) !important;
}


.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.header-text {
    width: 100%;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary) !important;
    margin: 0 0 16px 0;
    line-height: 1.1;
    letter-spacing: -1.5px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.35rem;
    color: var(--text-secondary) !important;
    margin: 0;
    font-weight: 500;
    opacity: 0.85;
    line-height: 1.5;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Header actions removed - clean centered design */

/* Page Content */
.page-content {
    flex: 1;
    padding: 48px 0 80px;
    background: var(--bg-secondary);
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 56px;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    padding: 56px 48px;
    border-radius: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.4;
}

.welcome-card h3 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.welcome-card p {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 720px;
    margin: 0 auto 32px auto;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

/* Stats Grid for Home Page */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    margin-top: 32px;
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
    color: var(--text-white);
}

/* Featured Tools Section */
.featured-tools {
    margin: 48px 0;
}

.featured-tools h4 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
}

.view-all-link a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-fast);
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(245, 57, 57, 0.1);
}

.view-all-link a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.featured-tools h4::before {
    content: '';
    width: 8px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(245, 57, 57, 0.3);
}

.featured-tools h4::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--border-light), transparent);
    border-radius: 1px;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

/* Tools List */
.tools-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tool-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tool-item .tool-icon {
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
}

.tool-item .tool-content {
    flex: 1;
    min-width: 0;
}

.tool-item .tool-content h5 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.tool-item .tool-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-item .tool-action {
    flex-shrink: 0;
}

.tool-item .btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    min-width: 80px;
}

/* Responsive Design for Tools List */
@media (max-width: 768px) {
    .tool-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .tool-item .tool-icon {
        font-size: 1.25rem;
        min-width: 32px;
    }
    
    .tool-item .tool-content h5 {
        font-size: 1rem;
    }
    
    .tool-item .tool-content p {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
    }
    
    .tool-item .tool-action {
        width: 100%;
        text-align: right;
    }
    
    .tool-item .btn-sm {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tool-item {
        padding: 12px;
    }
    
    .tool-item .tool-content h5 {
        font-size: 0.95rem;
    }
    
    .tool-item .tool-content p {
        font-size: 0.8rem;
    }
}

/* Tool Card Enhancements */
.tool-card {
    background: var(--bg-primary);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    padding: 32px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    height: fit-content;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: left var(--transition-normal);
}

.tool-card:hover::before {
    left: 0;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(245, 57, 57, 0.2);
}

.tool-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    font-size: 1.8rem;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-fast);
}

.tool-card h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
    line-height: 1.3;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card .btn {
    width: 100%;
    margin-top: auto;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.tool-card:hover .btn {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 24px;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .page-header {
        padding: 40px 0 32px;
    }
    
    .header-content {
        gap: 20px;
    }
    
    .page-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }
    
    .page-subtitle {
        font-size: 1.2rem;
    }
    
    .page-content {
        padding: 32px 0 60px;
    }
    
    .welcome-card {
        padding: 40px 28px;
    }
    
    .welcome-card h3 {
        font-size: 1.85rem;
        margin-bottom: 16px;
    }
    
    .welcome-card p {
        font-size: 1.05rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 20px;
        margin-top: 28px;
    }
    
    .stat-card {
        padding: 20px 16px;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .featured-tools {
        margin: 32px 0;
    }
    
    .featured-tools h4 {
        font-size: 1.8rem;
        margin-bottom: 24px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tool-card {
        padding: 24px;
    }
    
    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .tool-card h5 {
        font-size: 1.3rem;
    }
    
    .tool-card p {
        font-size: 0.95rem;
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .page-title {
        font-size: 2.2rem;
        letter-spacing: -0.8px;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .welcome-card {
        padding: 32px 24px;
    }
    
    .welcome-card h3 {
        font-size: 1.65rem;
        margin-bottom: 14px;
    }
    
    .welcome-card p {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        margin-top: 24px;
    }
    
    .stat-card {
        padding: 18px 12px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .featured-tools h4 {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .featured-tools h4::after {
        display: none;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    .tool-icon {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }
    
    .tool-card h5 {
        font-size: 1.2rem;
    }
}


/* Animation Enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-section,
.featured-tools {
    animation: fadeInUp 0.6s ease-out;
}

.tool-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }

/* Performance Optimizations */
.tool-card {
    will-change: transform;
}

.welcome-card::before {
    will-change: opacity;
}

/* Accessibility Improvements */
.tool-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
