/* VPS Tutorial Website - Global Styles */

/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* CSS Variables for theming */
:root {
    --primary-gradient-start: #667eea;
    --primary-gradient-end: #764ba2;
    --primary-color: #667eea;
    --secondary-color: #5568d3;
    --text-dark: #333;
    --text-medium: #666;
    --text-light: #999;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-code: #2d2d2d;
    --border-light: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 2.5rem; }
h3 { font-size: 1.5rem; margin-top: 2rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.navbar-brand:hover {
    color: white;
    text-decoration: none;
    opacity: 0.9;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: var(--transition);
}

.navbar-menu a:hover {
    color: white;
    opacity: 0.8;
    text-decoration: none;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 1.5rem;
}

.hero-meta span {
    margin: 0 1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.content-container {
    max-width: 850px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
}

/* Breadcrumb */
.breadcrumb {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb span {
    margin: 0 0.5rem;
}

/* Tutorial Cards */
.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.tutorial-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tutorial-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tutorial-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.tutorial-card p {
    color: var(--text-medium);
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Difficulty Badges */
.difficulty {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
}

.difficulty.beginner {
    background: #d4edda;
    color: #155724;
}

.difficulty.intermediate {
    background: #fff3cd;
    color: #856404;
}

.difficulty.advanced {
    background: #f8d7da;
    color: #721c24;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    display: inline-block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* Code Blocks */
pre {
    background: var(--bg-code);
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
}

.code-block {
    position: relative;
    margin: 1.5rem 0;
}

.code-block pre {
    margin: 0;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.copy-btn.copied {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.copy-btn svg {
    width: 14px;
    height: 14px;
}

code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

p code, li code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    color: #c7254e;
}

/* Callout Boxes */
.callout {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    border-left: 5px solid;
}

.callout h3, .callout h4 {
    margin-top: 0;
}

.callout-info {
    background: #e7f3ff;
    border-color: #2196F3;
}

.callout-info h3, .callout-info h4 {
    color: #1976D2;
}

.callout-warning {
    background: #fff9e6;
    border-color: #ffc107;
}

.callout-warning h3, .callout-warning h4 {
    color: #f57c00;
}

.callout-success {
    background: #e8f5e9;
    border-color: #4caf50;
}

.callout-success h3, .callout-success h4 {
    color: #2e7d32;
}

.callout-danger {
    background: #ffebee;
    border-color: #f44336;
}

.callout-danger h3, .callout-danger h4 {
    color: #c62828;
}

/* Lists */
ul, ol {
    margin: 1.25rem 0 1.25rem 2rem;
}

li {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-family: 'Inter', sans-serif;
}

table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

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

table tr:hover {
    background: #f0f4ff;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: white;
    padding: 2.5rem;
    text-align: center;
    margin: 3rem 0;
    border-radius: var(--radius-lg);
}

.cta-box h3 {
    color: white;
    margin: 0 0 1rem 0;
}

.cta-box p {
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 4rem;
    font-family: 'Inter', sans-serif;
}

footer a {
    color: white;
    text-decoration: underline;
}

footer p {
    margin-bottom: 0.5rem;
}

/* Category Section */
.category-section {
    margin: 3rem 0;
}

.category-section h2 {
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
        padding: 1rem;
        gap: 1rem;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }

    .container {
        padding: 1rem;
    }

    .content-container {
        padding: 1.5rem;
    }

    .tutorials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    pre {
        font-size: 0.8rem;
        padding: 1rem;
    }

    table {
        font-size: 0.9rem;
    }

    table th, table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-meta span {
        display: block;
        margin: 0.5rem 0;
    }
}

/* Print Styles */
@media print {
    .navbar, .cta-box, footer {
        display: none;
    }

    body {
        background: white;
    }

    .content-container {
        box-shadow: none;
    }

    a {
        text-decoration: underline;
    }
}
