/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #2d5016;
    --color-secondary: #5a8a3a;
    --color-accent: #8bc34a;
    --color-bg: #f5f5f0;
    --color-white: #ffffff;
    --color-text: #2c3e50;
    --color-text-light: #7f8c8d;
    --color-border: #e0e0e0;
    --color-facil: #4caf50;
    --color-moderada: #ff9800;
    --color-experto: #f44336;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--color-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-primary);
}

.logo svg {
    width: 40px;
    height: 40px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.logo p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--color-secondary);
}

/* Admin Badge */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    animation: admin-pulse 2s ease-in-out infinite;
}

@keyframes admin-pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(255, 152, 0, 0.5);
    }
}

/* Admin Action Buttons */
.btn-admin-edit,
.btn-admin-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    background: var(--color-white);
}

.btn-admin-edit:hover {
    background: #2196F3;
    border-color: #2196F3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-admin-delete {
    border: none;
}

.btn-admin-delete:hover {
    background: #f44336;
    border-color: #f44336;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

/* Admin Login/Logout Buttons */
.btn-admin-login,
.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: 2px solid;
}

.btn-admin-login {
    background: var(--color-white);
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-admin-login:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-logout {
    background: #fff3e0;
    color: #f57c00;
    border-color: #ff9800;
}

.btn-logout:hover {
    background: #f44336;
    color: var(--color-white);
    border-color: #f44336;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

/* Botones */
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

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

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

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

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Main */
.main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Section Header */
.section-header {
    margin-bottom: 2rem;
}

.section-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--color-text-light);
}

/* Rutas Grid */
.rutas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.ruta-card {
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%; /* Permite que todas las cards tengan la misma altura en el grid */
}

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

.ruta-image {
    height: 240px;
    flex-shrink: 0; /* No se encoge */
    background-size: cover;
    background-position: center;
    background-color: var(--color-border);
    position: relative;
}

/* Gradient overlay para mejor legibilidad */
.ruta-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.ruta-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1; /* Crece para ocupar el espacio disponible */
}

.ruta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.ruta-header h4 {
    font-size: 1.4rem;
    color: var(--color-primary);
    flex: 1;
    line-height: 1.3;
    font-weight: 700;
}

.badge {
    padding: 0.4rem 0.85rem;
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-fácil {
    background: #e8f5e9;
    color: var(--color-facil);
    border: 1.5px solid var(--color-facil);
}

.badge-moderada {
    background: #fff3e0;
    color: var(--color-moderada);
    border: 1.5px solid var(--color-moderada);
}

.badge-experto {
    background: #ffebee;
    color: var(--color-experto);
    border: 1.5px solid var(--color-experto);
}

.ruta-descripcion {
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.ruta-ubicacion {
    color: var(--color-text);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
}

.ruta-meta {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    background: var(--color-bg);
    border-radius: 8px;
    flex-wrap: wrap;
}

.ruta-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Contenedor de botones de acción en la tarjeta */
.ruta-card-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: auto; /* Empuja hacia el fondo */
    padding-top: 0.5rem;
}

/* Skeleton Loaders */
.skeleton {
    animation: skeleton-loading 1.5s infinite ease-in-out;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.ruta-card.skeleton .ruta-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

.ruta-card.skeleton .ruta-content > * {
    background: #f0f0f0;
    border-radius: 4px;
    height: 1rem;
    margin-bottom: 0.75rem;
}

/* Filtros y Búsqueda */
.filters-container {
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.filters-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(90, 138, 58, 0.1);
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.filter-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.filter-group label {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.65rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--color-white);
    cursor: pointer;
    transition: all 0.3s;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: var(--color-white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.filter-tag button {
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.empty-state p {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

/* Form Container */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-container h2 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Ruta Detail */
.ruta-detail {
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section para detalle */
.ruta-detail-hero {
    position: relative;
    height: 450px;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-hover);
}

.ruta-detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.ruta-detail-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    z-index: 2;
    color: var(--color-white);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-white);
    text-decoration: none;
    margin-bottom: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    transition: all 0.3s;
}

.back-link:hover {
    background: rgba(255,255,255,0.25);
    transform: translateX(-4px);
}

.ruta-detail-hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.ruta-detail-hero-badges {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.ruta-detail-header {
    margin-bottom: 2rem;
}

.ruta-detail-image {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.ruta-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.ruta-detail-info {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-icon {
    font-size: 1.5rem;
}

.info-item strong {
    display: block;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.info-item p {
    color: var(--color-text-light);
    margin: 0;
}

/* Tabs para organizar contenido */
.detail-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 2rem;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab-button:hover {
    color: var(--color-primary);
}

.tab-button.active {
    color: var(--color-primary);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
    border-radius: 3px 3px 0 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ruta-detail-description,
.ruta-detail-map,
.ruta-detail-comments {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.ruta-detail-description h3,
.ruta-detail-map h3,
.ruta-detail-comments h3 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

/* Comments */
.comment-form {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    border: 2px solid var(--color-border);
}

.comment-form h4 {
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    font-size: 1.3rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    font-family: inherit;
    margin-bottom: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
    font-size: 0.95rem;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(90, 138, 58, 0.1);
}

.comment-form input {
    padding: 0.85rem;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.comment-form input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(90, 138, 58, 0.1);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.comment {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--color-bg);
    border-radius: 12px;
    transition: all 0.3s;
}

.comment:hover {
    box-shadow: var(--shadow);
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-secondary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-header strong {
    color: var(--color-primary);
    font-size: 1.05rem;
}

.comment-date {
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.comment p {
    color: var(--color-text);
    line-height: 1.7;
    margin: 0;
}

.no-comments {
    text-align: center;
    color: var(--color-text-light);
    padding: 3rem 2rem;
    font-size: 1.05rem;
}

/* Alert (legacy - se reemplaza por toasts) */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.alert-success {
    background: #e8f5e9;
    color: var(--color-facil);
    border-left: 4px solid var(--color-facil);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(calc(100% + 20px));
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

/* Tipos de Toast */
.toast-success {
    border-left-color: var(--color-facil);
}

.toast-success .toast-icon {
    background: #e8f5e9;
    color: var(--color-facil);
}

.toast-error {
    border-left-color: var(--color-experto);
}

.toast-error .toast-icon {
    background: #ffebee;
    color: var(--color-experto);
}

.toast-warning {
    border-left-color: var(--color-moderada);
}

.toast-warning .toast-icon {
    background: #fff3e0;
    color: var(--color-moderada);
}

.toast-info {
    border-left-color: var(--color-secondary);
}

.toast-info .toast-icon {
    background: #e8f5e9;
    color: var(--color-secondary);
}

/* Share Button */
.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-share:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-share svg {
    width: 18px;
    height: 18px;
}

/* Share Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.share-modal.show {
    display: flex;
}

.share-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.share-modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--color-border);
}

.share-modal-header h3 {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.5rem;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-light);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.share-modal-close:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.share-modal-body {
    padding: 1.5rem;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
    cursor: pointer;
}

.share-option:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.share-option svg {
    width: 32px;
    height: 32px;
}

/* Colores específicos por plataforma */
.share-whatsapp:hover {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.share-twitter:hover {
    background: #000000;
    color: white;
    border-color: #000000;
}

.share-facebook:hover {
    background: #1877F2;
    color: white;
    border-color: #1877F2;
}

.share-telegram:hover {
    background: #0088cc;
    color: white;
    border-color: #0088cc;
}

.share-email:hover {
    background: #EA4335;
    color: white;
    border-color: #EA4335;
}

.share-copy:hover {
    background: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
}

/* Footer */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    /* Hero */
    .hero {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Header */
    .header-content {
        flex-wrap: wrap;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .logo p {
        font-size: 0.75rem;
    }

    .nav {
        gap: 0.75rem;
    }

    .nav a:not(.btn-primary) {
        display: none;
    }

    /* Filtros */
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-group {
        width: 100%;
        justify-content: space-between;
    }

    .filter-select {
        flex: 1;
    }

    /* Grid de Rutas */
    .rutas-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ruta-card {
        border-radius: 12px;
    }

    .ruta-image {
        height: 200px;
    }

    /* Detalle de Ruta */
    .ruta-detail-hero {
        height: 350px;
        border-radius: 12px;
    }

    .ruta-detail-hero-content {
        padding: 1.5rem;
    }

    .ruta-detail-hero-content h2 {
        font-size: 2rem;
    }

    .ruta-detail-hero-badges {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Tabs */
    .detail-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .detail-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    /* Comentarios */
    .comment {
        flex-direction: column;
        padding: 1rem;
    }

    .comment-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Formularios */
    .form-container {
        padding: 2rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Toasts */
    .toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .toast {
        font-size: 0.9rem;
    }

    /* Share Modal */
    .share-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .share-option {
        font-size: 0.8rem;
        padding: 0.75rem;
    }

    .share-option svg {
        width: 28px;
        height: 28px;
    }
}

/* Mejoras para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .rutas-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* Touch improvements */
@media (hover: none) {
    .btn-primary,
    .btn-secondary,
    .tab-button,
    .filter-select {
        min-height: 44px;
    }

    .ruta-card:hover {
        transform: none;
    }

    .ruta-card:active {
        transform: scale(0.98);
    }
}
