/**
 * Global Component Styles
 * Buttons, forms, and common UI elements
 */

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    text-decoration: none;
    transition: all var(--transition-medium);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background: var(--accent-red);
    color: var(--primary);
}

.btn-primary:hover {
    background: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-red);
    border: 2px solid var(--accent-red);
}

.btn-secondary:hover {
    background: var(--accent-red);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-white {
    background: var(--primary);
    color: var(--accent-red);
}

.btn-white:hover {
    background: var(--accent-light-grey);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--accent-red);
    transform: translateY(-2px);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.125rem;
}

/* ---------- BREADCRUMBS ---------- */
.breadcrumb {
    margin-bottom: var(--space-lg);
}

.breadcrumb ol {
    display: flex;
    gap: var(--space-md);
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.breadcrumb li {
    position: relative;
    color: var(--text-grey);
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    position: absolute;
    right: -12px;
    color: var(--text-grey);
}

.breadcrumb a {
    color: var(--text-grey);
    transition: color var(--transition-fast);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent-red);
}

.breadcrumb .active {
    color: var(--text-dark);
    font-weight: 500;
}

/* White breadcrumbs for dark backgrounds */
.hero-content .breadcrumb li,
.hero-content .breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
}

.hero-content .breadcrumb li:not(:last-child)::after {
    color: rgba(255, 255, 255, 0.5);
}

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

.hero-content .breadcrumb .active {
    color: var(--primary);
}

/* ---------- CARDS ---------- */
.card {
    background: var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-medium);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.card-image {
    position: relative;
    overflow: hidden;
    background: var(--accent-light-grey);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: var(--space-lg);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--space-sm);
}

.card-description {
    color: var(--text-grey);
    line-height: 1.6;
}

/* ---------- FORMS ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-grey);
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--text-dark);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(254, 0, 0, 0.1);
}

label {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--text-dark);
    font-weight: 500;
}

.form-group {
    margin-bottom: var(--space-lg);
}

/* ---------- BADGES ---------- */
.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--accent-red);
    color: var(--primary);
}

.badge-secondary {
    background: var(--accent-grey);
    color: var(--primary);
}

.badge-success {
    background: var(--success);
    color: var(--primary);
}

.badge-info {
    background: var(--info);
    color: var(--primary);
}

/* ---------- TABLES ---------- */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--accent-light-grey);
    padding: var(--space-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--accent-red);
}

td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-grey);
    color: var(--text-grey);
}

tr:hover {
    background: var(--accent-light-grey);
}

/* ---------- SECTIONS ---------- */
.section {
    padding: var(--section-padding) 0;
}

.section-title {
    text-align: center;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-dark);
    margin-bottom: var(--space-3xl);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-red);
    border-radius: var(--radius-sm);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-grey);
    margin-top: var(--space-md);
    margin-bottom: var(--space-2xl);
}

/* ---------- CONTAINER ---------- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--container-padding);
}

/* ---------- GRID LAYOUTS ---------- */
.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ---------- UTILITIES ---------- */
.text-center {
    text-align: center;
}

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

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

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mt-5 { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mb-5 { margin-bottom: var(--space-2xl); }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: var(--space-sm); }
.pt-2 { padding-top: var(--space-md); }
.pt-3 { padding-top: var(--space-lg); }
.pt-4 { padding-top: var(--space-xl); }
.pt-5 { padding-top: var(--space-2xl); }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: var(--space-sm); }
.pb-2 { padding-bottom: var(--space-md); }
.pb-3 { padding-bottom: var(--space-lg); }
.pb-4 { padding-bottom: var(--space-xl); }
.pb-5 { padding-bottom: var(--space-2xl); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }
.gap-4 { gap: var(--space-xl); }
.gap-5 { gap: var(--space-2xl); }