/* ============================================
   OFICIOS (CLASSIC CAR SERVICES) - MODERN STYLES
   Directory of services for classic car enthusiasts
   ============================================ */

:root {
    --primary-color: #2061a8;
    --primary-hover: #1a4f8a;
    --success-color: #28a745;
    --text-color: #333;
    --text-muted: #666;
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --box-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --box-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --box-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ============================================
   INDEX PAGE - LISTING
   ============================================ */
.oficios-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.oficios-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 3px solid var(--primary-color);
}

.oficios-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.oficios-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.oficios-title a:hover {
    color: var(--primary-color);
}

.oficios-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

/* Grid Layout */
.oficios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

/* Card */
.oficio-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-sm);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.oficio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.oficio-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.oficio-card-link:hover {
    text-decoration: none;
}

/* Hover solo en el título */
.oficio-card-link:hover .oficio-card-title {
    text-decoration: underline;
}

.oficio-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 6/2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:1px 1px 6px -3px rgba(0, 0, 0, 0.75);
}

.oficio-card-image img {
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

.oficio-card:hover .oficio-card-image img {
    transform: scale(1.05);
}

.oficio-card-body {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.oficio-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.oficio-card:hover .oficio-card-title {
    color: var(--primary-color);
}

.oficio-card-description {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.oficio-card-footer {
    padding: var(--spacing-sm) var(--spacing-md);
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.oficio-card-cta {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================
   VER PAGE - DETAIL
   ============================================ */
.oficio-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.oficio-main-column {
    min-width: 0;
}

.oficio-sidebar {
    position: sticky;
    top: var(--spacing-md);
    height: fit-content;
}

/* Detail Header */
.oficio-detail-header {
    background: white;
    margin-bottom: var(--spacing-lg);
}

.oficio-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 var(--spacing-sm) 0;
}

.oficio-detail-title a {
    color: inherit;
    text-decoration: none;
}

.oficio-detail-title a:hover {
    color: var(--primary-color);
}

.oficio-detail-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Detail Content */
.oficio-detail-content {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.oficio-detail-section {
    margin-bottom: var(--spacing-lg);
}

.oficio-detail-section:last-child {
    margin-bottom: 0;
}

.oficio-detail-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--primary-color);
}

.oficio-detail-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Gallery */
.oficio-gallery {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.oficio-gallery-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.oficio-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 180px));
    gap: var(--spacing-sm);
    justify-content: center;
}

.oficio-gallery-item {
    position: relative;
    aspect-ratio: 3/2;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.oficio-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oficio-gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--box-shadow-md);
}

/* Sidebar Components */
.oficio-sidebar-box {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-sm);
    margin-bottom: var(--spacing-md);
}

.oficio-sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.oficio-contact-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-speed) ease;
}

.oficio-contact-btn:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-md);
}

/* ============================================
   SOCIAL SHARE
   ============================================ */
.share-box {
    background: white;
    padding: var(--spacing-md) 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-sm);
    margin-bottom: var(--spacing-md);
}

.share-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: var(--spacing-md);
    transition: all var(--transition-speed) ease;
}

.share-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.st-inline-share-buttons,
.st-inline-share-buttons > div {
    display: flex !important;
    flex-wrap: wrap !important;
}

.st-btn {
    margin: 4px !important;
}

#st-1 .st-total.st-hidden {
    display: none !important;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.oficio-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg);
}

.oficio-lightbox.active {
    display: flex;
}

.oficio-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.oficio-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}

.oficio-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.oficio-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition-speed) ease;
}

.oficio-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.oficio-lightbox-prev {
    left: var(--spacing-md);
}

.oficio-lightbox-next {
    right: var(--spacing-md);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .oficio-detail-layout {
        grid-template-columns: 1fr;
    }

    .oficio-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .oficios-container,
    .oficio-detail-layout {
        padding: var(--spacing-sm);
    }

    .oficios-title {
        font-size: 1.5rem;
    }

    .oficios-grid {
        grid-template-columns: 1fr;
    }

    .oficio-detail-title {
        font-size: 1.25rem;
    }

    .oficio-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.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;
}

*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.oficio-card {
    animation: fadeIn 0.5s ease forwards;
}

.oficio-card:nth-child(1) { animation-delay: 0.1s; }
.oficio-card:nth-child(2) { animation-delay: 0.2s; }
.oficio-card:nth-child(3) { animation-delay: 0.3s; }
.oficio-card:nth-child(4) { animation-delay: 0.4s; }
