/* ===== VARIABLES CSS ===== */
:root {
    /* Colores principales */
    --color-primary: #15690b;
    --color-secondary: #25dd05;
    --color-accent: #000000;
    
    /* Degradados */
    --gradient-header: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    --gradient-sidebar: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    --gradient-hero: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    
    /* Colores de texto */
    --text-light: #ffffff;
    --text-dark: #000004;
    --text-gray: #6c757d;
    
    /* Colores de fondo */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-dark: #2b2d42;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    /* Medidas */
    --header-height: 70px;
    --sidebar-width: 280px;
    --container-max-width: 1200px;
    
    /* Transiciones */
    --transition-normal: 0.3s ease;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Header */
header {
    background: var(--gradient-header);
    color: var(--text-light);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.logo h1 {
    font-size: 1.5rem;
}

/* Botón menú hamburguesa */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Menú desktop */
.desktop-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.desktop-menu ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: background 0.3s ease;
}

.desktop-menu ul li a:hover,
.desktop-menu ul li a.active {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* ===== SIDEBAR MÓVIL - CORREGIDO CON TRANSFORM ===== */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--gradient-sidebar);
    color: var(--text-light);
    z-index: 1002;
    transition: transform var(--transition-normal);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    /* IMPORTANTE: Usamos transform en lugar de left */
    transform: translateX(-100%);
    will-change: transform;
}

.mobile-sidebar.active {
    transform: translateX(0);
}

/* Para asegurar que no haya ningún resto visible */
.mobile-sidebar:not(.active) {
    transform: translateX(-100%);
    visibility: hidden; /* Doble aseguramiento */
}

.mobile-sidebar.active {
    visibility: visible;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.5rem;
}

.close-menu {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
}

.nav-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-links a {
    color: var(--text-light);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 1;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    z-index: 1001;
    display: none;
    backdrop-filter: blur(3px);
}

.overlay.active {
    display: block;
}

/* Main content */
.main-content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* Hero section */
.hero {
    background: var(--gradient-hero);
    color: var(--text-light);
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--text-light);
    color: var(--color-primary);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--color-primary);
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section title */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--gradient-header);
    margin: 1rem auto;
    border-radius: 3px;
}

/* Features section */
.features {
    padding: 4rem 0;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-gray);
}

/* About section */
.about {
    padding: 4rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-list {
    list-style: none;
    margin: 2rem 0;
}

.about-list li {
    margin-bottom: 0.5rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-list li::before {
    content: '✓';
    color: var(--color-primary);
    font-weight: bold;
}

.about-image {
    background: var(--gradient-header);
    border-radius: 10px;
    padding: 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.5rem;
    text-align: center;
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--text-light);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== RESPONSIVE DESIGN ===== */
/* Desktop */
@media (min-width: 965px) {
    .desktop-menu {
        display: block;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .mobile-sidebar {
        display: none; /* En desktop no existe */
    }
    
    .overlay {
        display: none !important;
    }
}

/* Móvil y tablet */
@media (max-width: 964px) {
    .menu-toggle {
        display: flex !important;
    }
    
    .desktop-menu {
        display: none !important;
    }
    
    .mobile-sidebar {
        display: block; /* Existe pero oculto con transform */
    }
    
    .overlay {
        display: none;
    }
    
    .overlay.active {
        display: block;
    }
    
    .header-container {
        justify-content: flex-start;
    }
    
    .logo {
        margin-left: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: -1;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-sidebar {
        width: 85%;
    }
}
/*estilos adicionales para las otras paginas*/
/* Estilos para páginas internas */
.page-header {
    background: var(--gradient-header);
    color: var(--text-light);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* About page */
.about-page {
    padding: 3rem 0;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

.stat-label {
    color: var(--text-gray);
}

/* Services page */
.services-page {
    padding: 3rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-item {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.service-item ul {
    list-style: none;
    margin-top: 1rem;
}

.service-item ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.service-item ul li::before {
    content: '✓';
    color: var(--color-primary);
    position: absolute;
    left: 0;
}

/* Products page */
.products-page {
    padding: 3rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-image {
    position: relative;
    height: 200px;
    background: var(--gradient-header);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 4rem;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-accent);
    color: var(--text-light);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.product-info {
    padding: 1.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
    margin: 1rem 0;
}

/* Gallery page */
.gallery-page {
    padding: 3rem 0;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    background: var(--bg-light);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-header);
    color: var(--text-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.gallery-image {
    position: relative;
    height: 250px;
    background: var(--gradient-header);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 3rem;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Blog page */
.blog-page {
    padding: 3rem 0;
}

.blog-grid {
    display: grid;
    gap: 2rem;
}

.blog-post {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    background: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.post-image {
    height: 200px;
    background: var(--gradient-header);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 3rem;
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.post-content h2 {
    margin-bottom: 1rem;
}

.post-content h2 a {
    color: var(--text-dark);
    text-decoration: none;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

/* Contact page */
.contact-page {
    padding: 3rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h2,
.contact-form h2 {
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-header);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-post {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
}

/*ajustes personales*/
#logos{

    width: 70px;
    height: 60px;
    box-shadow: 0 0 white 70px;
}
.mi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas en PC */
}

@media (max-width: 1100px) {
    .mi-grid { grid-template-columns: repeat(3, 1fr); } /* 3 columnas */
}

@media (max-width: 800px) {
    .mi-grid { grid-template-columns: repeat(2, 1fr); } /* 2 columnas */
}

@media (max-width: 500px) {
    .mi-grid { grid-template-columns: 1fr; } /* 1 columna en móvil */
}

/* Estilos para usuario en header */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 40px;
}

.user-info span {
    font-size: 0.9rem;
}

.user-link {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 20px;
    transition: background 0.3s;
}

.user-link:hover {
    background: rgba(255,255,255,0.2);
}

.logout {
    color: #ffebee;
}

.user-buttons {
    display: flex;
    gap: 10px;
}

.user-btn {
    padding: 8px 20px;
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
}

.user-btn:hover {
    background: rgba(255,255,255,0.3);
}

.user-btn.register {
    background: #2e7d32;
}

.user-btn.register:hover {
    background: #1b5e20;
}

@media (max-width: 964px) {
    .user-menu {
        margin-left: auto;
    }
    
    .user-info span {
        display: none;
    }
    
    .user-btn {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
}