/**
 * Reusable Component Styles
 * 
 * All shared UI components
 * 
 * @package Asivo
 * @version 1.0.0
 */

/* ================================
   Buttons
   ================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-md);
}

.btn--primary:hover,
.btn--primary:focus {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-primary);
    text-decoration: none;
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--secondary:hover,
.btn--secondary:focus {
    background-color: rgba(79, 70, 229, 0.12);
    border-color: var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
}

.btn--large {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-lg);
}

.btn--small {
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
}

/* ================================
   Cards
   ================================ */

.card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: transform var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
}

.card__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.card__description {
    color: var(--color-gray-light);
    font-size: var(--text-sm);
}

/* ================================
   Service Cards
   ================================ */

.service-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.service-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow-primary);
}

.service-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(79, 70, 229, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    color: var(--color-primary);
}

.service-card__icon svg {
    width: 24px;
    height: 24px;
}

.service-card__title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.service-card__toggle {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: none;
    border: none;
    color: var(--color-accent);
    font-size: var(--text-lg);
    cursor: pointer;
    padding: var(--space-1);
    transition: transform var(--transition-base);
}

.service-card__toggle[aria-expanded="true"] .service-card__toggle-icon {
    transform: rotate(180deg);
}

.service-card__content {
    display: none;
    margin-top: var(--space-3);
}

.service-card--expanded .service-card__content {
    display: block;
}

.service-card__description {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
}

.service-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

/* ================================
   Tags
   ================================ */

.tag {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    background-color: var(--color-card-border);
    color: var(--color-text-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    font-family: var(--font-ui);
}

/* ================================
   Skill Cards
   ================================ */

.skill-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    transition: all var(--transition-base);
}

.skill-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow-primary);
}

.skill-card__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(0, 209, 255, 0.1));
    border-radius: var(--radius-md);
    color: var(--color-accent);
    font-size: var(--text-2xl);
}

.skill-card__title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.skill-card__level {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    font-family: var(--font-headline);
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.skill-card__description {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

/* ================================
   Portfolio Ring (Hero)
   ================================ */

.portfolio-ring {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.portfolio-ring__svg {
    width: 100%;
    height: 100%;
    animation: rotate 20s linear infinite;
}

.portfolio-ring__text {
    fill: var(--color-accent);
    font-size: 16px;
    font-weight: var(--font-medium);
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.portfolio-ring__button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: var(--text-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-glow-primary);
}

.portfolio-ring__button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ================================
   Grids
   ================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-4);
}

/* ================================
   Responsive Components
   ================================ */

@media (max-width: 768px) {
    .services-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-ring {
        width: 250px;
        height: 250px;
    }
}
