/* ==============================================================================
 * TECHALICIOUS ACADEMY - Custom Styles
 * ==============================================================================
 * Extends github-theme.css with application-specific components
 * ============================================================================== */

/* ------------------------------------------------------------------------------
 * Sticky Footer Layout
 * ------------------------------------------------------------------------------ */

html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

main.container {
    flex: 1;
    width: 100%;
}

/* ------------------------------------------------------------------------------
 * Layout
 * ------------------------------------------------------------------------------ */

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 30px;
}

@media (min-width: 1400px) {
    .container { max-width: 1024px; }
}

@media (max-width: 600px) {
    .container { padding: 15px; }
}

/* ------------------------------------------------------------------------------
 * Header / Navigation
 * ------------------------------------------------------------------------------ */

.site-header {
    width: 100%;
    background: #fafafa;
    border-bottom: 1px solid #e7e7e7;
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.site-title:hover {
    text-decoration: none;
    color: #4183C4;
}

.site-nav {
    display: flex;
    gap: 1.5rem;
}

.site-nav a {
    color: #555;
    font-size: 0.95rem;
}

.site-nav a:hover {
    color: #4183C4;
}

/* ------------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------------ */

.site-footer {
    width: 100%;
    padding: 0.5rem 0;
    background: #fafafa;
    border-top: 1px solid #e7e7e7;
    color: #777;
    font-size: 0.9rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

/* ------------------------------------------------------------------------------
 * Lists (How It Works, etc.)
 * ------------------------------------------------------------------------------ */

.container ol li,
.container ul li {
    padding: 0.5rem 0;
}

/* ------------------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------------------ */

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background-color: #4183C4;
    border-color: #4183C4;
    color: #fff;
}

.btn-primary:hover {
    background-color: #3572a8;
    border-color: #3572a8;
    color: #fff;
}

.btn-secondary {
    background-color: #fafafa;
    border-color: #d1d5da;
    color: #333;
}

.btn-secondary:hover {
    background-color: #f0f0f0;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-lg {
    padding: 0.8rem 1.6rem;
    font-size: 1.1rem;
}

/* ------------------------------------------------------------------------------
 * Forms
 * ------------------------------------------------------------------------------ */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #d1d5da;
    border-radius: 4px;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #4183C4;
    box-shadow: 0 0 0 3px rgba(65, 131, 196, 0.15);
}

.form-input::placeholder {
    color: #999;
}

.form-hint {
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: #777;
}

/* ------------------------------------------------------------------------------
 * Alerts / Notices
 * ------------------------------------------------------------------------------ */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-error {
    background-color: #fce4e4;
    border-color: #f5c6c6;
    color: #9a3030;
}

.alert-success {
    background-color: #e6f4ea;
    border-color: #b7e4c7;
    color: #1e7e34;
}

.alert-info {
    background-color: #e8f4fd;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff8e6;
    border-color: #ffeeba;
    color: #856404;
}

/* ------------------------------------------------------------------------------
 * Cards
 * ------------------------------------------------------------------------------ */

.card {
    background: #FAFAFA;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    padding: 1rem 1.5rem 1.5rem;
    margin-bottom: 1rem;
}

.card h3:first-child {
    margin-top: 0;
}

/* Remove header underlines inside boxed elements */
.card h1, .card h2, .card h3, .card h4,
.locked-message h1, .locked-message h2, .locked-message h3, .locked-message h4 {
    border-bottom: none;
    padding-bottom: 0;
}

.card-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.card-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.card-description {
    color: #555;
    margin-bottom: 1rem;
}

/* ------------------------------------------------------------------------------
 * Tutorial List (Directory Style)
 * ------------------------------------------------------------------------------ */

.tutorial-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tutorial-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.tutorial-icon {
    padding-top: 0.15rem;
}

.tutorial-item:last-child {
    border-bottom: none;
}

.tutorial-icon {
    width: 24px;
    margin-right: 0.75rem;
    text-align: center;
    color: #777;
}

.tutorial-name {
    flex: 1;
}

.tutorial-meta {
    color: #777;
    font-size: 0.85rem;
    margin-left: 1rem;
}

/* File list within tutorial */
.file-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    font-family: "Lucida Console", Consolas, monospace;
    font-size: 0.95rem;
}

.file-item {
    display: flex;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #e8e8e8;
    border-radius: 3px;
    transition: background-color 0.15s;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: #FAFAFA;
}

.file-name {
    flex: 1;
}

.file-size {
    color: #999;
    font-size: 0.85rem;
}

/* ------------------------------------------------------------------------------
 * Locked Content Overlay
 * ------------------------------------------------------------------------------ */

.locked-overlay {
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%);
    padding: 3rem 2rem 2rem;
    text-align: center;
    margin-top: -3rem;
    position: relative;
}

.locked-message {
    background: #fafafa;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    padding: 2rem;
    max-width: 500px;
    text-align: center;
    box-sizing: border-box;
}

/* Constrained card variant (matches locked-message width) */
.card-centered {
    max-width: 500px;
    box-sizing: border-box;
}

.locked-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* ------------------------------------------------------------------------------
 * Price Display
 * ------------------------------------------------------------------------------ */

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.price-note {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.25rem;
}

/* ------------------------------------------------------------------------------
 * Content Display (for .txt files)
 * ------------------------------------------------------------------------------ */

.content-display {
    background: #fafafa;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    padding: 1.5rem;
    font-family: "Lucida Console", Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* ------------------------------------------------------------------------------
 * Breadcrumbs
 * ------------------------------------------------------------------------------ */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    list-style: none;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 0.5rem;
    color: #999;
}

.breadcrumb-item a {
    color: #4183C4;
}

.breadcrumb-item.active {
    color: #777;
}

/* ------------------------------------------------------------------------------
 * Utility Classes
 * ------------------------------------------------------------------------------ */

.text-center { text-align: center; }
.text-muted { color: #777; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
