/* HTML Blocks Tutorial - Elegant Blue Design */

:root {
    /* Main colors - sophisticated blue palette */
    --primary: #1976d2;
    /* Rich blue */
    --primary-dark: #0d47a1;
    /* Deep navy blue */
    --primary-light: #42a5f5;
    /* Sky blue */
    --accent: #00acc1;
    /* Cyan accent */
    --accent-dark: #00838f;
    /* Dark cyan */
    --accent-light: #4dd0e1;
    /* Light cyan */

    /* Semantic colors */
    --success: #00897b;
    --warning: #ff9800;
    --info: #039be5;
    --danger: #e53935;

    /* Neutrals */
    --dark: #212121;
    --gray-dark: #424242;
    --gray: #616161;
    --gray-light: #9e9e9e;
    --light: #f5f5f5;
    --white: #ffffff;

    /* Effects */
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.08);
    --radius: 0.625rem;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: #fafafa;
    min-height: 100vh;
}

/* Header gradient */
header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

header h1 {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

header h1 strong {
    font-weight: 700;
}

header p {
    font-size: 1.25rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

/* Main content area */
main {
    max-width: 1200px;
    margin: -3rem auto 4rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

section {
    background: white;
    padding: 3rem;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

h2 {
    color: var(--primary-dark);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: -0.01em;
}

h3 {
    color: var(--primary);
    font-size: 1.875rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

h4 {
    color: var(--gray-dark);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.lead {
    font-size: 1.125rem;
    color: var(--gray);
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.8;
}

/* Alert Widgets - Elegant Style */
.alert {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.alert strong {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

.alert-info {
    background: rgba(0, 151, 167, 0.08);
    color: var(--info);
}

.alert-info::before {
    background: var(--info);
}

.alert-warning {
    background: rgba(255, 167, 38, 0.08);
    color: #ef6c00;
}

.alert-warning::before {
    background: var(--warning);
}

.alert-success {
    background: rgba(0, 137, 123, 0.08);
    color: var(--success);
}

.alert-success::before {
    background: var(--success);
}

/* Card Widgets - Clean Design */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.card:hover::after {
    transform: scaleX(1);
}

.card h3 {
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-weight: 500;
}

.card-featured {
    background: linear-gradient(135deg, rgba(0, 121, 107, 0.03) 0%, rgba(255, 107, 107, 0.03) 100%);
    border: 2px solid var(--primary-light);
    padding-top: 3.5rem;
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.card-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition);
    position: relative;
}

.card-link::after {
    content: '→';
    transition: transform 0.2s ease;
}

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

.card-link:hover::after {
    transform: translateX(4px);
}

.card-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

/* Buttons - Refined Design */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
    font-size: 0.9375rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 121, 107, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 121, 107, 0.3);
}

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

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

/* Navigation Widgets */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

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

.breadcrumb .separator {
    color: var(--gray-light);
    font-size: 0.75rem;
}

.breadcrumb .current {
    color: var(--gray);
}

/* Pagination - Clean Style */
.pagination {
    display: flex;
    gap: 0.25rem;
    margin-top: 2rem;
    justify-content: center;
}

.page-link {
    padding: 0.625rem 1rem;
    border-radius: var(--radius);
    color: var(--gray-dark);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.875rem;
}

.page-link:hover {
    background: var(--light);
    color: var(--primary);
}

.page-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 121, 107, 0.2);
}

/* Social Links - Minimal Style */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--light);
    text-decoration: none;
    transition: var(--transition);
    color: var(--gray);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 121, 107, 0.2);
}

.social-link .icon {
    font-size: 1.25rem;
}

/* Guidelines Grid */
.guidelines {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.practice {
    padding: 1.75rem;
    background: var(--light);
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
    border: 1px solid transparent;
}

.practice::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent);
    transition: height 0.3s ease;
}

.practice:hover {
    background: white;
    border-color: var(--accent-light);
    box-shadow: var(--shadow);
}

.practice:hover::before {
    height: 60%;
}

.practice h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Code Examples - Elegant Dark Theme */
.code-example {
    margin: 2rem 0;
}

pre {
    background: var(--dark);
    color: #e8eaf6;
    padding: 1.75rem;
    border-radius: var(--radius);
    overflow-x: auto;
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    line-height: 1.7;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

code {
    font-family: monospace;
}

/* Inline code */
p code,
li code {
    background: rgba(0, 121, 107, 0.08);
    color: var(--primary-dark);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-weight: 500;
}

/* Tutorial sections */
.tutorial {
    background: linear-gradient(135deg, rgba(0, 121, 107, 0.02) 0%, rgba(255, 107, 107, 0.02) 100%);
    border: 1px solid rgba(0, 121, 107, 0.1);
}

.example-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--light);
    border-radius: var(--radius);
    position: relative;
    padding-left: 2.5rem;
}

.example-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 2px;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, white 0%, rgba(0, 121, 107, 0.05) 100%);
    text-align: center;
    padding: 4rem 3rem;
    border-radius: var(--radius);
    margin-bottom: 3rem;
    border: 1px solid rgba(0, 121, 107, 0.1);
}

.hero h2 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    font-weight: 300;
    color: var(--dark);
}

.hero h2 strong {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    background-clip: text;
    color: transparent;
}

/* Pattern boxes */
.pattern {
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border: 1px solid var(--light);
    border-radius: var(--radius);
    transition: var(--transition);
}

.pattern:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

/* Notification stack */
.notification-stack {
    max-width: 600px;
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--radius);
    margin: 1rem 0;
}

/* Widget showcase */
.widget-showcase {
    margin-bottom: 3rem;
}

.showcase-item {
    margin: 2rem 0;
    padding: 2.5rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--light);
    transition: var(--transition);
}

.showcase-item:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.showcase-item h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.showcase-item pre {
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--dark);
    color: white;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
}

/* Utility classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

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

    main {
        margin-top: -2rem;
    }

    section {
        padding: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .guidelines {
        grid-template-columns: 1fr;
    }
}

/* Print styles */
@media print {
    header {
        background: none;
        color: var(--dark);
    }

    .social-links,
    .pagination,
    footer::before {
        display: none;
    }
}
