/* ===================================
   VARIABLES Y RESET
=================================== */
:root {
    --primary-color: #003366;
    --secondary-color: #ff6600;
    --accent-color: #0066cc;
    --dark-color: #1a1a2e;
    --light-color: #f4f4f4;
    --gray-color: #666;
    --white: #ffffff;
    --success-color: #28a745;
    --error-color: #dc3545;
    
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
    
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* ===================================
   NAVEGACIÓN
=================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: var(--shadow-lg);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    margin-right: 10px;
    color: var(--secondary-color);
    font-size: 2rem;
}

.highlight {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-link {
    margin-left: 2rem;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.btn-admin {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background: var(--dark-color);
    transition: var(--transition);
}

/* ===================================
   HERO SECTION
=================================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    padding-top: 70px;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 102, 0.7);
    z-index: -1;
}

.hero-content {
    max-width: 900px;
    padding: 2rem;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-secondary);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 4rem;
    padding: 0 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    color: var(--white);
}

.stat-item i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.stat-number {
    display: block;
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===================================
   BOTONES
=================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

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

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

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--white);
    color: var(--secondary-color);
    transform: scale(1.1);
}

/* ===================================
   SECCIONES
=================================== */
.section {
    padding: 5rem 0;
}

.section-light {
    background: var(--light-color);
}

.section-dark {
    background: var(--dark-color);
    color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.text-white {
    color: var(--white);
}

.text-gray {
    color: #aaa;
}

.section-line {
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 0 auto 1.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   SOBRE NOSOTROS
=================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-content h3 {
    font-family: var(--font-secondary);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-content p {
    margin-bottom: 1.5rem;
    color: var(--gray-color);
}

.about-features {
    list-style: none;
    margin-bottom: 2rem;
}

.about-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-features i {
    color: var(--secondary-color);
}

.about-images {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.image-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

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

.main-image {
    grid-row: span 2;
}

/* ===================================
   PRODUCTOS
=================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

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

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-family: var(--font-secondary);
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.product-info p {
    color: var(--gray-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ===================================
   SERVICIOS
=================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-icon i {
    font-size: 2rem;
    color: var(--white);
}

.service-card h3 {
    font-family: var(--font-secondary);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--gray-color);
    font-size: 0.95rem;
}

/* ===================================
   GALERÍA PÚBLICA
=================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    padding: 1.5rem 1rem 1rem;
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.gallery-item-overlay h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.gallery-item-overlay p {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    opacity: 0.95;
}

/* Filtros de galería */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--secondary-color);
    background: transparent;
    color: var(--secondary-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    color: #fff;
}

/* Badge de tipo de archivo en galería */
.media-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.media-badge.image {
    background: var(--secondary-color);
    color: white;
}

.media-badge.video {
    background: #e91e63;
    color: white;
}

/* ===================================
   LIGHTBOX
=================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.lightbox img,
.lightbox video {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    outline: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s;
    line-height: 1;
}

.lightbox-close:hover {
    transform: rotate(90deg);
    color: var(--secondary-color);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: background 0.3s;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    padding: 1rem 2rem;
    background: rgba(0,0,0,0.7);
    z-index: 10001;
    max-width: 80%;
    margin: 0 auto;
    border-radius: 8px;
}

.lightbox-caption h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.1rem;
}

.lightbox-caption p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===================================
   TESTIMONIOS
=================================== */
.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.testimonial-content {
    margin-bottom: 1.5rem;
    position: relative;
}

.testimonial-content i {
    font-size: 2rem;
    color: var(--secondary-color);
    opacity: 0.3;
    position: absolute;
    top: -10px;
    left: 0;
}

.testimonial-content p {
    font-style: italic;
    color: var(--gray-color);
    padding-left: 2rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h4 {
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.testimonial-author p {
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* ===================================
   CONTACTO
=================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    gap: 1rem;
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 10px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: var(--white);
    font-size: 1.2rem;
}

.contact-card h4 {
    margin-bottom: 0.5rem;
    color: var(--white);
}

.contact-card p {
    color: #aaa;
    font-size: 0.95rem;
}

.map-container {
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
}

.contact-form-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.contact-form h3 {
    font-family: var(--font-secondary);
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

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

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

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

.form-group label i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-primary);
    transition: var(--transition);
}

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

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: var(--gray-color);
    font-size: 0.8rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-group input {
    width: auto;
    margin-top: 0.3rem;
}

.checkbox-group label {
    font-weight: 400;
    font-size: 0.9rem;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ===================================
   ADMIN PANEL - CORREGIDO Y COMPLETO
=================================== */
.admin-login {
    max-width: 400px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.login-form h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.login-hint {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--gray-color);
}

.admin-dashboard {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* ===== ADMIN TABS ===== */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    padding: 0.6rem 1rem;
    background: #f1f3f4;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    background: #e2e6ea;
    transform: translateY(-1px);
}

.tab-btn.active {
    background: var(--secondary-color);
    color: white;
}

.tab-btn[style*="display: none"] {
    pointer-events: none;
    opacity: 0.5;
    display: none !important;
}

.tab-btn:not([style*="display: none"]) {
    pointer-events: auto;
    opacity: 1;
}

.logout-btn {
    margin-left: auto;
    background: var(--error-color);
    color: var(--white);
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block !important;
    animation: fadeIn 0.2s ease;
}

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

/* ===== UPLOAD FORM ===== */
.upload-form {
    max-width: 600px;
}

.file-upload-wrapper {
    border: 2px dashed #ddd;
    padding: 2rem;
    text-align: center;
    border-radius: 5px;
    margin-top: 0.5rem;
    transition: border-color 0.2s;
}

.file-upload-wrapper:hover {
    border-color: var(--secondary-color);
}

.file-preview {
    margin-top: 1rem;
}

.file-preview img,
.file-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 5px;
}

.upload-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    width: 0%;
    transition: width 0.3s;
}

/* ===== MESSAGES LIST ===== */
.messages-list {
    margin-top: 1rem;
}

.message-item {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--secondary-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.message-header h4 {
    color: var(--primary-color);
}

.message-date {
    color: var(--gray-color);
    font-size: 0.85rem;
}

.message-body p {
    margin: 0.5rem 0;
}

.message-body strong {
    color: var(--dark-color);
}

/* ===== GALERÍA ADMIN - IMÁGENES Y VIDEOS ===== */
.gallery-management {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 1rem;
}

.gallery-manage-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-manage-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gallery-manage-item img,
.gallery-manage-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* Video preview con play button */
.gallery-manage-item .video-preview {
    position: relative;
    padding-top: 75%;
    background: #1a1a2e;
}

.gallery-manage-item .video-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-manage-item .video-preview .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255,102,0,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-manage-item .video-preview .play-icon i {
    color: #fff;
    font-size: 1.2rem;
    margin-left: 3px;
}

/* Badge de tipo en galería admin */
.gallery-manage-item .file-type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.gallery-manage-item .file-type-badge.image {
    background: var(--secondary-color);
    color: white;
}

.gallery-manage-item .file-type-badge.video {
    background: #e91e63;
    color: white;
}

/* Info debajo de la imagen */
.gallery-manage-info {
    padding: 8px;
    background: white;
}

.gallery-manage-info p {
    margin: 0.2rem 0;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-manage-info p:first-child {
    font-weight: 600;
    font-size: 0.9rem;
}

.gallery-manage-info .category-badge {
    background: #e8f4f8;
    color: #0d4a6b;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
}

.gallery-manage-info .file-size {
    color: #999;
    font-size: 0.7rem;
}

/* Botón eliminar */
.btn-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--error-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.btn-delete:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* ===== TABLA DE USUARIOS ===== */
.users-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.users-table thead {
    background: #f1f3f4;
}

.users-table th {
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    color: var(--dark-color);
}

.users-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.users-table tr:hover {
    background: #f9f9f9;
}

.users-table .role-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.users-table .role-badge.admin {
    background: #003366;
    color: white;
}

.users-table .role-badge.comercial {
    background: #28a745;
    color: white;
}

.users-table .status-badge {
    font-weight: 500;
}

.users-table .status-badge.active {
    color: #28a745;
}

.users-table .status-badge.inactive {
    color: #dc3545;
}

.users-table .action-btn {
    padding: 6px 12px;
    margin: 0 4px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.users-table .action-btn:hover {
    background: #f1f3f4;
}

.users-table .action-btn.delete {
    border-color: #dc3545;
    color: #dc3545;
}

.users-table .action-btn.delete:hover {
    background: #dc3545;
    color: white;
}

.users-table .current-user {
    color: #999;
    font-style: italic;
}

/* ===== USER BADGE ===== */
.admin-user-badge {
    animation: slideInDown 0.3s ease;
    background: #f8f9fa;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--secondary-color);
}

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

#userAvatar {
    text-transform: uppercase;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,51,102,0.2);
}

#userRole {
    text-transform: capitalize;
}

/* ===== RESPONSIVE ADMIN ===== */
@media (max-width: 768px) {
    .admin-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    #adminUserBadge {
        padding: 0.6rem 0.8rem;
    }
    
    #adminUserBadge > div {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    #adminUserBadge button {
        width: 100%;
        margin-top: 5px;
    }
    
    .gallery-management {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .users-table {
        font-size: 0.8rem;
    }
    
    .users-table th,
    .users-table td {
        padding: 8px;
    }
}

/* ===================================
   FOOTER
=================================== */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.footer-col h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

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

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

/* ===================================
   MODAL DE PRODUCTO
=================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    overflow: auto;
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    max-width: 800px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

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

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-color);
}

.close-modal:hover {
    color: var(--dark-color);
}

/* ===================================
   ELEMENTOS FLOTANTES
=================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37,211,102,0.4);
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 100px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 99;
    transition: var(--transition);
}

.scroll-top.visible {
    display: block;
}

.scroll-top:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ===================================
   ANIMACIONES
=================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 1s ease;
}

.animate-fade-in-delay {
    animation: fadeInUp 1s ease 0.3s backwards;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 1s ease 0.6s backwards;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading spinner genérico */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s ease-in-out infinite;
}

/* ===================================
   RESPONSIVE GENERAL
=================================== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .about-images {
        order: -1;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        margin: 1.5rem 0;
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        position: relative;
        bottom: auto;
        margin-top: 3rem;
        gap: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .lightbox-close {
        font-size: 2.5rem;
        top: 10px;
        right: 20px;
    }
}

@media (max-width: 576px) {
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .scroll-top {
        right: 30px;
    }
    
    .lightbox-caption {
        max-width: 90%;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===================================
   UTILIDADES ADICIONALES
=================================== */
.login-hint {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #666;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.admin-login .form-group small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 0.8rem;
}

/* Badge de modo demo */
.demo-badge {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #ffc107;
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1001;
    display: none;
}
.demo-badge.visible { display: block; }

/* Placeholder para imágenes no disponibles */
.img-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

/* ===================================
   FIXES FINALES PARA ADMIN
=================================== */
/* Asegurar que los tabs ocultos no interfieran */
.role-admin-only[style*="display:none"] {
    display: none !important;
}

/* Asegurar que el badge se muestre cuando corresponde */
#adminUserBadge[style*="display:block"] {
    display: block !important;
}

/* Fix para contenido de tabs */
.tab-content[style*="display:block"]:not(.active) {
    display: none !important;
}

/* Spinner centrado */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Mensajes de estado */
.status-message {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.status-message.success {
    color: var(--success-color);
}

.status-message.error {
    color: var(--error-color);
}