/* ═══════════════════════════════════════════════
   TechPro SA — Components
   ═══════════════════════════════════════════════ */

/* ─── Buttons ─── */
.tp-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--tp-space-sm);
    padding: 0.75rem 1.75rem;
    font-family: var(--tp-font-display);
    font-size: var(--tp-text-sm);
    font-weight: 600;
    line-height: 1;
    border: 2px solid transparent;
    border-radius: var(--tp-radius);
    cursor: pointer;
    transition: all var(--tp-duration) var(--tp-ease);
    text-align: center;
    white-space: nowrap;
}
.tp-btn:focus-visible { outline: 2px solid var(--tp-primary); outline-offset: 2px; }

.tp-btn--primary {
    background: var(--tp-primary);
    color: var(--tp-white);
}
.tp-btn--primary:hover {
    background: var(--tp-primary-dark);
    color: var(--tp-white);
    transform: translateY(-1px);
    box-shadow: var(--tp-shadow-md);
}

.tp-btn--accent {
    background: var(--tp-accent);
    color: var(--tp-white);
}
.tp-btn--accent:hover {
    background: var(--tp-accent-hover);
    color: var(--tp-white);
    transform: translateY(-1px);
}

.tp-btn--outline {
    background: transparent;
    border-color: var(--tp-primary);
    color: var(--tp-primary);
}
.tp-btn--outline:hover {
    background: var(--tp-primary);
    color: var(--tp-white);
}

.tp-btn--whatsapp {
    background: var(--tp-whatsapp);
    color: var(--tp-white);
}
.tp-btn--whatsapp:hover {
    background: #1da851;
    color: var(--tp-white);
}

.tp-btn--emergency {
    background: var(--tp-emergency);
    color: var(--tp-white);
    animation: pulse-emergency 2s infinite;
}

.tp-btn--sm { padding: 0.5rem 1.25rem; font-size: var(--tp-text-xs); }
.tp-btn--lg { padding: 1rem 2.5rem; font-size: var(--tp-text-lg); }
.tp-btn--block { display: flex; justify-content: center; width: 100%; }

@keyframes pulse-emergency {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

/* ─── Cards ─── */
.tp-service-card {
    background: var(--tp-white);
    border-radius: var(--tp-radius-lg);
    overflow: hidden;
    box-shadow: var(--tp-shadow-sm);
    border: 1px solid var(--tp-gray-300);
    transition: all var(--tp-duration-md) var(--tp-ease);
}
.tp-service-card:hover {
    box-shadow: var(--tp-shadow-lg);
    transform: translateY(-4px);
    border-color: var(--tp-primary-light);
}

.tp-card-image {
    overflow: hidden;
    aspect-ratio: 4/3;
}
.tp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--tp-duration-lg) var(--tp-ease);
}
.tp-service-card:hover .tp-card-image img { transform: scale(1.05); }

.tp-card-body {
    padding: var(--tp-space-lg);
}
.tp-card-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    background: var(--tp-primary-light);
    border-radius: var(--tp-radius);
    align-items: center;
    justify-content: center;
    margin-bottom: var(--tp-space-md);
    color: var(--tp-primary);
    font-size: 1.5rem;
}
.tp-card-title { font-size: var(--tp-text-xl); margin-bottom: var(--tp-space-sm); }
.tp-card-title a { color: var(--tp-gray-900); }
.tp-card-title a:hover { color: var(--tp-primary); }
.tp-card-excerpt { color: var(--tp-gray-600); font-size: var(--tp-text-sm); margin-bottom: var(--tp-space-md); }
.tp-card-price { display: block; color: var(--tp-primary); font-weight: 700; font-size: var(--tp-text-lg); margin-bottom: var(--tp-space-md); }

/* ─── Service Grid ─── */
.tp-service-grid { display: grid; gap: var(--tp-space-xl); }
.tp-grid-2 { grid-template-columns: repeat(2, 1fr); }
.tp-grid-3 { grid-template-columns: repeat(3, 1fr); }
.tp-grid-4 { grid-template-columns: repeat(4, 1fr); }

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

/* ─── Badges ─── */
.tp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: var(--tp-text-xs);
    font-weight: 600;
    border-radius: var(--tp-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tp-badge--emergency { background: #fef2f2; color: var(--tp-emergency); border: 1px solid #fecaca; }
.tp-badge--success { background: #f0fdf4; color: var(--tp-success); border: 1px solid #bbf7d0; }
.tp-badge--info { background: var(--tp-primary-light); color: var(--tp-primary); border: 1px solid #bfdbfe; }
.tp-verified-badge { color: var(--tp-success); font-size: var(--tp-text-xs); font-weight: 600; }

/* ─── Trust Section ─── */
.tp-trust-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--tp-space-xl);
    padding: var(--tp-space-3xl) 0;
}
.tp-trust-badge {
    display: flex;
    align-items: center;
    gap: var(--tp-space-md);
    text-align: left;
}
.tp-trust-badge strong { display: block; font-size: var(--tp-text-base); color: var(--tp-gray-900); }
.tp-trust-badge span { display: block; font-size: var(--tp-text-sm); color: var(--tp-gray-600); }

@media (max-width: 768px) {
    .tp-trust-section { grid-template-columns: repeat(2, 1fr); }
}

/* ─── CTA Blocks ─── */
.tp-cta {
    background: linear-gradient(135deg, var(--tp-primary), var(--tp-primary-dark));
    color: var(--tp-white);
    padding: var(--tp-space-3xl) var(--tp-space-2xl);
    border-radius: var(--tp-radius-xl);
    text-align: center;
}
.tp-cta--emergency {
    background: linear-gradient(135deg, var(--tp-emergency), #991b1b);
    animation: pulse-border 3s infinite;
}
@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
    50% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); }
}

.tp-cta-title { font-size: var(--tp-text-3xl); color: var(--tp-white); margin-bottom: var(--tp-space-sm); }
.tp-cta-text { font-size: var(--tp-text-lg); opacity: 0.9; margin-bottom: var(--tp-space-xl); }
.tp-cta-actions { display: flex; gap: var(--tp-space-md); justify-content: center; flex-wrap: wrap; }
.tp-cta .tp-btn--primary { background: var(--tp-white); color: var(--tp-primary); }
.tp-cta .tp-btn--primary:hover { background: var(--tp-gray-100); }
.tp-cta .tp-btn--outline { border-color: var(--tp-white); color: var(--tp-white); }
.tp-cta .tp-btn--outline:hover { background: rgba(255,255,255,0.15); }

/* ─── FAQ Accordion ─── */
.tp-faq-accordion { max-width: var(--tp-max-narrow); }
.tp-faq-item {
    border-bottom: 1px solid var(--tp-gray-300);
}
.tp-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--tp-space-lg) 0;
    font-size: var(--tp-text-lg);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    color: var(--tp-gray-900);
}
.tp-faq-question::-webkit-details-marker { display: none; }
.tp-faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform var(--tp-duration) var(--tp-ease);
    color: var(--tp-primary);
}
.tp-faq-item[open] .tp-faq-question::after { content: '−'; }
.tp-faq-answer {
    padding-bottom: var(--tp-space-lg);
    color: var(--tp-gray-600);
    line-height: 1.7;
}

/* ─── Testimonials ─── */
.tp-testimonials-slider { position: relative; overflow: hidden; }
.tp-slider-track { display: flex; transition: transform var(--tp-duration-lg) var(--tp-ease); }
.tp-testimonial-card {
    flex: 0 0 100%;
    padding: var(--tp-space-2xl);
    text-align: center;
}
@media (min-width: 768px) {
    .tp-testimonial-card { flex: 0 0 50%; }
}
@media (min-width: 1024px) {
    .tp-testimonial-card { flex: 0 0 33.333%; }
}

.tp-stars { display: flex; justify-content: center; gap: 2px; margin-bottom: var(--tp-space-md); }
.tp-star { color: var(--tp-gray-400); }
.tp-star--filled { color: #f59e0b; }
.tp-testimonial-text { font-size: var(--tp-text-lg); color: var(--tp-gray-700); margin-bottom: var(--tp-space-lg); font-style: italic; }
.tp-testimonial-author { display: flex; align-items: center; gap: var(--tp-space-md); justify-content: center; }
.tp-author-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; }
.tp-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tp-author-name { display: block; font-weight: 600; }
.tp-author-location { font-size: var(--tp-text-sm); color: var(--tp-gray-500); }

.tp-slider-nav { display: flex; justify-content: center; gap: var(--tp-space-md); margin-top: var(--tp-space-lg); }
.tp-slider-prev, .tp-slider-next {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid var(--tp-gray-300);
    background: var(--tp-white);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--tp-duration) var(--tp-ease);
    display: flex; align-items: center; justify-content: center;
}
.tp-slider-prev:hover, .tp-slider-next:hover {
    border-color: var(--tp-primary);
    color: var(--tp-primary);
}

/* ─── Breadcrumbs ─── */
.tp-breadcrumbs { padding: var(--tp-space-md) 0; }
.tp-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--tp-text-sm);
}
.tp-breadcrumb-item { display: flex; align-items: center; }
.tp-breadcrumb-item a { color: var(--tp-gray-500); }
.tp-breadcrumb-item a:hover { color: var(--tp-primary); }
.tp-breadcrumb-sep { margin: 0 var(--tp-space-sm); color: var(--tp-gray-400); }

/* ─── Forms ─── */
.tp-form-group { margin-bottom: var(--tp-space-lg); }
.tp-form-label {
    display: block;
    font-size: var(--tp-text-sm);
    font-weight: 600;
    color: var(--tp-gray-900);
    margin-bottom: var(--tp-space-xs);
}
.tp-form-input, .tp-form-select, .tp-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--tp-gray-300);
    border-radius: var(--tp-radius);
    font-family: var(--tp-font-body);
    font-size: var(--tp-text-base);
    color: var(--tp-gray-900);
    background: var(--tp-white);
    transition: border-color var(--tp-duration) var(--tp-ease), box-shadow var(--tp-duration) var(--tp-ease);
}
.tp-form-input:focus, .tp-form-select:focus, .tp-form-textarea:focus {
    outline: none;
    border-color: var(--tp-primary);
    box-shadow: 0 0 0 3px var(--tp-primary-light);
}
.tp-form-textarea { min-height: 120px; resize: vertical; }
.tp-form-hint { font-size: var(--tp-text-xs); color: var(--tp-gray-500); margin-top: 0.25rem; }
.tp-form-error { color: var(--tp-emergency); font-size: var(--tp-text-xs); margin-top: 0.25rem; }

/* ─── Area Tags ─── */
.tp-area-grid { display: grid; gap: var(--tp-space-sm); }
.tp-area-link {
    display: flex;
    align-items: center;
    gap: var(--tp-space-sm);
    padding: var(--tp-space-sm) var(--tp-space-md);
    background: var(--tp-gray-100);
    border-radius: var(--tp-radius);
    font-size: var(--tp-text-sm);
    color: var(--tp-gray-700);
    transition: all var(--tp-duration) var(--tp-ease);
}
.tp-area-link:hover { background: var(--tp-primary-light); color: var(--tp-primary); }
.tp-area-tags { display: flex; flex-wrap: wrap; gap: var(--tp-space-sm); }
.tp-area-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--tp-gray-100);
    border-radius: var(--tp-radius-full);
    font-size: var(--tp-text-xs);
    color: var(--tp-gray-600);
}
a.tp-area-tag:hover { background: var(--tp-primary-light); color: var(--tp-primary); }

/* ─── WhatsApp Float ─── */
.tp-whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 1000;
}
.tp-whatsapp-btn {
    display: flex;
    align-items: center;
    gap: var(--tp-space-sm);
    padding: 0.75rem 1.25rem;
    background: var(--tp-whatsapp);
    color: var(--tp-white);
    border-radius: var(--tp-radius-full);
    box-shadow: var(--tp-shadow-lg);
    font-weight: 600;
    font-size: var(--tp-text-sm);
    transition: all var(--tp-duration) var(--tp-ease);
}
.tp-whatsapp-btn:hover { background: #1da851; color: var(--tp-white); transform: scale(1.05); }
.tp-whatsapp-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px; height: 24px;
    background: var(--tp-gray-800);
    color: var(--tp-white);
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.tp-hidden { display: none !important; }

@media (max-width: 768px) {
    .tp-whatsapp-float { bottom: 80px; right: 12px; }
    .tp-whatsapp-text { display: none; }
    .tp-whatsapp-btn { padding: 0.875rem; border-radius: 50%; }
}

/* ─── Mobile CTA Bar ─── */
.tp-mobile-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--tp-white);
    border-top: 1px solid var(--tp-gray-300);
    padding: var(--tp-space-sm);
    z-index: 999;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
    .tp-mobile-cta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
    body { padding-bottom: 72px; }
}
.tp-mcta-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--tp-space-sm) 0;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--tp-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tp-mcta-call { color: var(--tp-primary); }
.tp-mcta-whatsapp { color: var(--tp-whatsapp); }
.tp-mcta-quote { color: var(--tp-accent); }
.tp-mcta-book { color: var(--tp-primary-dark); }
