/* ============================================
   COOPTRANS - Cooperativa de Transporte
   Estilo: Profesional transporte (tipo TachoTools)
   Limpio, claro, serio, confiable
   ============================================ */

:root {
    --azul-oscuro: #1E3A5F;
    --azul: #2563EB;
    --azul-claro: #3B82F6;
    --verde: #059669;
    --verde-claro: #10B981;
    --naranja: #F59E0B;
    --rojo: #DC2626;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --bg-gray: #F1F5F9;
    --text-dark: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --border-dark: #CBD5E1;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }


/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    transition: var(--transition);
}
.header.scrolled { box-shadow: var(--shadow-md); }
.header-container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 26px; }
.logo-text { font-size: 1.3rem; font-weight: 800; color: var(--azul-oscuro); letter-spacing: -0.5px; }
.logo-sub { font-size: 0.65rem; color: var(--text-muted); display: none; }
.nav { display: flex; gap: 24px; }
.nav-link { color: var(--text-body); text-decoration: none; font-size: 0.87rem; font-weight: 500; transition: var(--transition); }
.nav-link:hover { color: var(--azul); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.btn-call { color: var(--text-muted); text-decoration: none; font-size: 0.82rem; font-weight: 500; }
.btn-call:hover { color: var(--azul); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 6px; font-size: 0.87rem; font-weight: 600; text-decoration: none; cursor: pointer; border: none; transition: var(--transition); font-family: inherit; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-primary { background: var(--azul); color: white; }
.btn-primary:hover { background: var(--azul-oscuro); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--text-dark); border: 1px solid var(--border-dark); }
.btn-secondary:hover { background: var(--bg-gray); border-color: var(--azul); }
.btn-socios { background: var(--verde); color: white; }
.btn-socios:hover { background: #047857; }
.btn-full { width: 100%; justify-content: center; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-dark); border-radius: 1px; transition: var(--transition); }


/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 85vh; display: flex; align-items: center; position: relative;
    background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%);
    overflow: hidden;
}
.hero-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url('https://images.unsplash.com/photo-1601584115197-04ecc0da31d7?w=1920') center/cover; opacity: 0.12; }
.hero-content { position: relative; z-index: 2; padding: 120px 0 80px; max-width: 640px; }
.hero-badge { display: inline-block; background: rgba(255,255,255,0.15); color: white; padding: 6px 14px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; margin-bottom: 20px; letter-spacing: 0.5px; text-transform: uppercase; }
.hero-title { font-size: clamp(2rem, 4.5vw, 3rem); color: white; margin-bottom: 20px; line-height: 1.2; font-weight: 800; }
.hero-title span { color: var(--naranja); }
.hero-subtitle { font-size: 1.05rem; color: rgba(255,255,255,0.85); margin-bottom: 32px; line-height: 1.7; font-weight: 400; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.hero .btn-primary { background: var(--naranja); color: var(--text-dark); }
.hero .btn-primary:hover { background: #D97706; }
.hero .btn-secondary { color: white; border-color: rgba(255,255,255,0.4); }
.hero .btn-secondary:hover { background: rgba(255,255,255,0.1); }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stat { text-align: left; }
.stat-number { display: block; font-size: 1.6rem; font-weight: 800; color: white; }
.stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.7); }

/* ============================================
   SECTIONS
   ============================================ */
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); text-align: center; margin-bottom: 10px; color: var(--text-dark); font-weight: 800; }
.section-title span { color: var(--azul); }
.section-title.text-left { text-align: left; }
.section-subtitle { text-align: center; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 48px; max-width: 580px; margin-left: auto; margin-right: auto; line-height: 1.7; }


/* ============================================
   SERVICIOS
   ============================================ */
.servicios { padding: 80px 0; background: var(--bg-white); }
.servicios-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.servicio-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: var(--transition); }
.servicio-card:hover { border-color: var(--azul); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.servicio-icon { font-size: 2rem; margin-bottom: 12px; }
.servicio-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--text-dark); }
.servicio-card p { color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; font-size: 0.88rem; }
.servicio-list { list-style: none; }
.servicio-list li { padding: 4px 0 4px 18px; position: relative; color: var(--text-body); font-size: 0.84rem; }
.servicio-list li::before { content: '✓'; position: absolute; left: 0; color: var(--verde); font-weight: 700; font-size: 0.8rem; }

/* ============================================
   POR QUÉ NOSOTROS
   ============================================ */
.porque { padding: 80px 0; background: var(--bg-gray); }
.porque-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.porque-card { padding: 24px; border-radius: var(--radius-lg); background: var(--bg-white); border: 1px solid var(--border); transition: var(--transition); position: relative; }
.porque-card:hover { border-color: var(--azul-claro); box-shadow: var(--shadow-md); }
.porque-number { font-size: 2.5rem; font-weight: 900; color: rgba(37, 99, 235, 0.08); position: absolute; top: 12px; right: 16px; }
.porque-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-dark); }
.porque-card p { color: var(--text-muted); line-height: 1.6; font-size: 0.88rem; }

/* ============================================
   EQUIPO
   ============================================ */
.equipo { padding: 80px 0; background: var(--bg-white); }
.equipo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.equipo-card { text-align: center; padding: 28px 16px; background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: var(--transition); }
.equipo-card:hover { box-shadow: var(--shadow-md); border-color: var(--azul-claro); }
.equipo-avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--azul); display: flex; align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 1.1rem; margin: 0 auto 12px; }
.equipo-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 2px; color: var(--text-dark); }
.equipo-role { color: var(--azul); font-size: 0.78rem; font-weight: 600; margin-bottom: 8px; }
.equipo-desc { color: var(--text-muted); font-size: 0.78rem; line-height: 1.5; }


/* ============================================
   TESTIMONIOS
   ============================================ */
.testimonios { padding: 80px 0; background: var(--azul-oscuro); }
.testimonios .section-title { color: white; }
.testimonios .section-title span { color: var(--naranja); }
.testimonios .section-subtitle { color: rgba(255,255,255,0.6); }
.testimonios-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.testimonio-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg); padding: 28px; transition: var(--transition); }
.testimonio-card:hover { background: rgba(255,255,255,0.08); border-color: var(--naranja); }
.testimonio-stars { margin-bottom: 12px; font-size: 0.9rem; }
.testimonio-text { color: rgba(255,255,255,0.9); font-style: italic; line-height: 1.7; margin-bottom: 16px; font-size: 0.88rem; }
.testimonio-author { display: flex; align-items: center; gap: 10px; }
.testimonio-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--azul); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 0.85rem; }
.testimonio-name { display: block; color: white; font-weight: 600; font-size: 0.84rem; }
.testimonio-time { color: rgba(255,255,255,0.5); font-size: 0.72rem; }

/* ============================================
   HORARIOS
   ============================================ */
.horarios { padding: 60px 0; background: var(--bg-gray); }
.horarios-banner { display: flex; justify-content: space-between; align-items: center; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; flex-wrap: wrap; gap: 24px; }
.horarios-info h3 { font-size: 1.1rem; margin-bottom: 12px; color: var(--azul-oscuro); }
.horarios-grid-simple { display: flex; gap: 28px; flex-wrap: wrap; }
.horario-item { display: flex; flex-direction: column; gap: 2px; }
.horario-item .dia { font-weight: 600; color: var(--text-dark); font-size: 0.84rem; }
.horario-item .hora { color: var(--text-muted); font-size: 0.8rem; }
.horario-item.cerrado .hora { color: var(--rojo); }
.horarios-cta { text-align: center; }
.horarios-cta p { color: var(--text-muted); margin-bottom: 10px; font-size: 0.84rem; }


/* ============================================
   CONTACTO
   ============================================ */
.contacto { padding: 80px 0; background: var(--bg-white); }
.contacto-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; }
.contacto-form { display: flex; flex-direction: column; gap: 16px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem; font-family: inherit; transition: var(--transition); background: var(--bg-white); color: var(--text-dark); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.contacto-info-panel { display: flex; flex-direction: column; gap: 12px; }
.info-card { padding: 20px; background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius); }
.info-card h4 { font-size: 0.9rem; margin-bottom: 6px; color: var(--azul-oscuro); }
.info-card a { color: var(--azul); text-decoration: none; font-weight: 600; font-size: 0.95rem; display: block; margin-bottom: 2px; }
.info-card a:hover { color: var(--azul-oscuro); }
.info-card p { color: var(--text-muted); font-size: 0.78rem; }

/* ============================================
   FOOTER
   ============================================ */
.footer { background: var(--azul-oscuro); padding: 48px 0 20px; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer .logo-text { color: white; }
.footer-brand p { color: rgba(255,255,255,0.5); font-size: 0.75rem; margin-top: 6px; max-width: 280px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.84rem; transition: var(--transition); }
.footer-links a:hover { color: white; }
.footer-social { display: flex; gap: 14px; }
.footer-social a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.84rem; }
.footer-social a:hover { color: white; }
.footer-bottom { text-align: center; padding-top: 20px; }
.footer-bottom p { color: rgba(255,255,255,0.4); font-size: 0.72rem; }


/* ============================================
   SOCIOS / LOGIN / OCR
   ============================================ */
.socios { padding: 80px 0; background: var(--bg-gray); }
.socios-panel { max-width: 680px; margin: 0 auto; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.login-box { text-align: center; max-width: 380px; margin: 0 auto; padding: 16px 0; }
.login-icon { font-size: 2.5rem; margin-bottom: 12px; }
.login-box h3 { font-size: 1.2rem; margin-bottom: 6px; color: var(--azul-oscuro); }
.login-box > p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.88rem; }
.login-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.login-error { background: #FEF2F2; border: 1px solid #FECACA; color: var(--rojo); padding: 8px 14px; border-radius: 6px; font-size: 0.82rem; text-align: center; }
.login-help { margin-top: 16px; font-size: 0.75rem; color: var(--text-muted); }
.panel-header-user { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px; font-size: 0.84rem; color: var(--text-body); }

.upload-area { border: 2px dashed var(--border-dark); border-radius: var(--radius-lg); padding: 40px 24px; text-align: center; cursor: pointer; transition: var(--transition); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.upload-area:hover, .upload-area.dragover { border-color: var(--azul); background: rgba(37, 99, 235, 0.02); }
.upload-area .upload-icon { font-size: 3rem; }
.upload-area h3 { font-size: 1.1rem; color: var(--text-dark); }
.upload-area p { color: var(--text-muted); font-size: 0.88rem; }
.upload-hint { font-size: 0.75rem !important; opacity: 0.6; }
.upload-area input[type="file"] { display: none; }
.upload-preview { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.upload-preview img { max-width: 100%; max-height: 280px; border-radius: var(--radius); box-shadow: var(--shadow-md); object-fit: contain; }

.processing-animation { text-align: center; padding: 36px 0; }
.processing-spinner { width: 48px; height: 48px; border: 3px solid var(--border); border-top-color: var(--azul); border-radius: 50%; margin: 0 auto 16px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.processing-animation h3 { color: var(--text-dark); margin-bottom: 6px; font-size: 1.05rem; }
.processing-animation p { color: var(--text-muted); margin-bottom: 16px; font-size: 0.88rem; }
.progress-bar { width: 100%; max-width: 360px; height: 6px; background: var(--bg-gray); border-radius: 3px; overflow: hidden; margin: 0 auto; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--azul), var(--verde)); border-radius: 3px; width: 0%; transition: width 0.5s ease; }

.form-header { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.form-header h3 { font-size: 0.95rem; color: var(--verde); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.form-group-total { grid-column: span 2; }
.form-group-total input { font-size: 1.2rem !important; font-weight: 700 !important; color: var(--azul-oscuro) !important; background: var(--bg-gray) !important; }
.form-actions { display: flex; flex-direction: column; gap: 10px; }
.success-animation { text-align: center; padding: 36px 0; }
.success-icon { font-size: 3.5rem; margin-bottom: 12px; }
.success-animation h3 { color: var(--verde); margin-bottom: 10px; font-size: 1.15rem; }
.success-animation p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.88rem; }

.socios-historial { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.socios-historial h4 { font-size: 0.95rem; margin-bottom: 12px; color: var(--azul-oscuro); }
.historial-table-wrapper { overflow-x: auto; margin-bottom: 14px; border-radius: var(--radius); border: 1px solid var(--border); }
.historial-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.historial-table th { background: var(--azul-oscuro); color: white; padding: 8px 10px; text-align: left; font-weight: 600; white-space: nowrap; }
.historial-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.historial-table tr:nth-child(even) { background: var(--bg-light); }
.historial-table tr:hover { background: rgba(37, 99, 235, 0.03); }


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav { position: fixed; top: 0; right: -100%; width: 75%; max-width: 280px; height: 100vh; background: var(--bg-white); flex-direction: column; padding: 70px 24px 24px; gap: 16px; transition: right 0.3s ease; z-index: 999; box-shadow: var(--shadow-lg); border-left: 1px solid var(--border); }
    .nav.open { right: 0; }
    .hamburger { display: flex; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .header-actions { display: none; }
    .servicios-grid, .porque-grid { grid-template-columns: 1fr; }
    .equipo-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonios-grid { grid-template-columns: 1fr; }
    .contacto-grid { grid-template-columns: 1fr; }
    .horarios-banner { flex-direction: column; text-align: center; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
    .socios-panel { padding: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group-total { grid-column: span 1; }
}

@media (max-width: 480px) {
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .equipo-grid { grid-template-columns: 1fr; }
    .hero-stats { flex-direction: column; gap: 16px; }
}
