/* ===================================
   REUSABLE COMPONENTS
   Author: Hardik
   =================================== */

/* ===== GLASS CARD ===== */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    transition: background var(--transition-base), 
                border-color var(--transition-base),
                transform var(--transition-base);
}

.glass:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.8125rem 1.625rem;
    border-radius: var(--radius-lg);
    font-weight: var(--fw-bold);
    font-size: var(--fs-base);
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: transform var(--transition-base), 
                box-shadow var(--transition-base),
                background var(--transition-base),
                border-color var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--color-secondary);
}

.btn:active {
    transform: translateY(-1px) scale(0.98);
}

.btn:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
}

/* Button Primary */
.btn-primary {
    background: var(--gradient-button);
    border: none;
    color: #ffffff;
    box-shadow: 0 8px 30px -8px rgba(var(--rgb-primary), 0.6);
}

.btn-primary:hover {
    box-shadow: 0 12px 40px -8px rgba(var(--rgb-primary), 0.8);
    transform: translateY(-4px) scale(1.03);
}

/* Button Secondary */
.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--color-secondary);
}

/* Button Submit (with loading state) */
.btn-submit {
    position: relative;
    min-width: 160px;
}

.btn-submit .btn-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

.btn-submit[data-loading="true"] .btn-text {
    visibility: hidden;
}

.btn-submit[data-loading="true"] .btn-loading {
    display: flex;
}

/* Button Disabled */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== CARDS ===== */
.card {
    padding: var(--space-xl);
    transition: transform var(--transition-base), 
                border-color var(--transition-slow);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.card > * {
    position: relative;
    z-index: 1;
}

/* Card Hover Glow Effect */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        260px circle at var(--mx, 50%) var(--my, 0),
        rgba(var(--rgb-primary), 0.28),
        transparent 60%
    );
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.card:hover::before {
    opacity: 1;
}

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

/* ===== TAGS & BADGES ===== */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.375rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-secondary);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2dff8f;
    box-shadow: 0 0 10px #2dff8f;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Tech Chips */
.tech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.tech-chips span {
    padding: 0.5625rem 1.125rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-sm);
    transition: all var(--transition-base);
    cursor: default;
}

.tech-chips span:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    transform: translateY(-4px) rotate(-2deg);
    box-shadow: 0 8px 24px -10px rgba(var(--rgb-secondary), 0.6);
}

/* ===== PROGRESS BARS ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: var(--z-sticky);
    background: var(--gradient-primary);
    box-shadow: 0 0 12px var(--color-secondary);
    transition: width 100ms linear;
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: clamp(1.875rem, 6vw, 2.875rem);
    margin: 0 0 var(--space-md);
    font-weight: var(--fw-black);
    letter-spacing: -0.03em;
}

.section-number {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-secondary);
    letter-spacing: var(--ls-wider);
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    color: var(--text-secondary);
    margin: 0 0 var(--space-2xl);
    font-size: var(--fs-lg);
}

/* ===== STATS ===== */
.stat-card {
    padding: var(--space-lg);
    text-align: center;
    transition: transform var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-6px);
}

.stat-value {
    display: block;
    font-size: var(--fs-4xl);
    font-weight: var(--fw-black);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: var(--space-xs);
}

.stat-text {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    font-weight: var(--fw-medium);
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.form-status {
    margin-top: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(45, 255, 143, 0.1);
    border: 1px solid rgba(45, 255, 143, 0.3);
    color: #2dff8f;
}

.form-status.error {
    display: block;
    background: rgba(255, 61, 154, 0.1);
    border: 1px solid rgba(255, 61, 154, 0.3);
    color: var(--color-accent);
}

/* ===== TERMINAL ===== */
.terminal {
    margin-top: var(--space-2xl);
    padding: 0;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
}

.terminal-bar {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    color: var(--text-muted);
}

.terminal-bar i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff5f57;
}

.terminal-bar i:nth-child(2) {
    background: #febc2e;
}

.terminal-bar i:nth-child(3) {
    background: #28c840;
}

.terminal-content {
    margin: 0;
    padding: var(--space-lg);
    white-space: pre-wrap;
    color: var(--text-primary);
    line-height: 1.8;
}

.user-msg {
    color: var(--color-secondary);
    font-weight: var(--fw-bold);
}

.bot-msg {
    color: var(--color-accent);
    font-weight: var(--fw-bold);
}

/* ===== TESTIMONIAL ===== */
.testimonial-card {
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.testimonial-stars {
    color: #ffd166;
    font-size: var(--fs-lg);
    letter-spacing: 0.1em;
}

.testimonial-text {
    color: var(--text-secondary);
    font-size: var(--fs-lg);
    line-height: var(--lh-relaxed);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: auto;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-button);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--fw-bold);
    font-size: var(--fs-xl);
    color: #ffffff;
}

.author-name {
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.author-role {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: var(--space-2xl);
    margin-top: var(--space-3xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, 
        var(--color-primary), 
        var(--color-secondary), 
        var(--color-accent));
}

.timeline-item {
    position: relative;
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.timeline-dot {
    position: absolute;
    left: calc(-1 * var(--space-2xl) - 5px);
    top: var(--space-lg);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-secondary);
    box-shadow: 0 0 0 4px var(--bg-primary), 
                0 0 12px var(--color-secondary);
}

.timeline-content h3 {
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.timeline-date {
    display: block;
    font-size: var(--fs-sm);
    color: var(--color-secondary);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-sm);
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
}

/* ===== LOADING SPINNER ===== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===== TOOLTIP ===== */
.tip {
    font-size: var(--fs-sm);
    color: var(--color-secondary);
    min-height: 20px;
    margin-top: var(--space-md);
    text-align: center;
    transition: color var(--transition-base);
}
