/* Component Styles for fwdslsh Website */

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

/* ===== COMMON COMPONENT PATTERNS ===== */

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-dark);
    box-shadow: 0 4px 14px rgba(0, 255, 65, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 65, 0.4);
}

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

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Code Blocks */
.code-block {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
   
    color: var(--primary-dim);
    line-height: 1.6;
    text-wrap: auto;
    overflow-x: clip;
    text-wrap-mode: auto;
    overflow-wrap: break-word;
}

.code-snippet {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--primary);
    margin-top: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.code-snippet:hover {
    background: rgba(0, 255, 65, 0.1);
}

/* Code Editor Mockup */
.code-editor {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    font-family: var(--font-mono);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.editor-header {
    background: var(--bg-card);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.editor-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red {
    background: #ff5f56;
}

.dot-yellow {
    background: #ffbd2e;
}

.dot-green {
    background: #27ca3f;
}

.editor-title {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.editor-content {
    padding: 1rem;
    background: var(--bg-darker);
}

.code-line {
    display: flex;
    align-items: center;
    min-height: 1.5rem;
    opacity: 0;
}

.line-number {
    color: var(--text-dim);
    margin-right: 1rem;
    min-width: 2rem;
    text-align: right;
    font-size: 0.8rem;
}

.html-tag {
    color: #569cd6;
}

.html-attr {
    color: #92c5f8;
}

.html-string {
    color: #ce9178;
}

.html-comment {
    color: #6a9955;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.card-gradient {
    background: var(--gradient-bg);
}

.card-with-top-border {
    position: relative;
    overflow: hidden;
}

.card-with-top-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
}

/* Icon Components */
.icon-circle {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--bg-dark);
    margin-bottom: 1rem;
}

.icon-rounded {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--bg-dark);
    margin-bottom: 1.5rem;
}

/* Responsive Grids */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-auto-fit-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.grid-auto-fit-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

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

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-spacing {
    padding: 6rem 2rem;
}

.section-spacing-small {
    padding: 4rem 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .grid-auto-fit,
    .grid-auto-fit-small,
    .grid-auto-fit-large {
        grid-template-columns: 1fr;
    }

    .code-block {
        padding: 1.5rem;
    }

    .editor-content {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .section-spacing {
        padding: 4rem 1rem;
    }

    .container,
    .container-narrow {
        padding: 0 1rem;
    }

    .code-block {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }
}

/* ===== QUICK LINKS COMPONENT ===== */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.quick-link {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quick-link:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.1);
}

.quick-link-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 8px;
    color: var(--bg-dark);
    flex-shrink: 0;
}

.quick-link-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    margin-top: 0;
}

.quick-link-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    .quick-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quick-link {
        padding: 1rem;
    }
    
    .quick-link-icon {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
}