/* ================================================================================================================================
===================================================================================================================================
=================================================[ ESTILOS GENERALES ]=============================================================
===================================================================================================================================
=================================================================================================================================== 

0. VARIABLES
1. MAIN
2. TEXTS
3. HEADER
4. FOOTER
5. LOGIN
6. TABLAS
7. ADMINISTRACION
8. DASHBOARD
9. FORMS, BUTTONS, MESSAGES
10. TITTLE NEW!

*/

:root {
    --color-primario: #dc3545;
    --color-secundario: #b22234;
    --color-danger: #007bff;
    --color-info: #013f81;
    --color-fondo: rgba(255, 255, 255, 0.527);
    --color-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    --color-titulos: #2b2a2a;
    --color-texto: #000000;
    --color-black: #000000cc; 
    --color-black2: #000000f3; 
    --color-white: #ffffff;
}

@import url(https://fonts.googleapis.com/css?family=Open+Sans:800);

/* =================================================[ MAIN ]========================================================== */
html {
    height: auto;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-image: url("../images/portada.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: right center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px; 
    margin: auto;
    padding: 40px;
    background-color: var(--color-fondo);
    border-radius: 8px;
    box-shadow: var(--color-shadow);
    text-align: center;
    flex: 1;
    margin-top: 25px;
    margin-bottom: 25px;
}

/* Tablet */
@media (max-width: 1024px) {
  .container {
    min-height: auto; /* Ajustá 50px según la altura de tu header/footer */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Opcional: centra verticalmente el contenido */
  }

  html {
    height: 100%;
  }

  body {
    background-position: center right;
    background-color: var(--color-titulos);
  }
}

/* Móvil */
@media (max-width: 768px) {
  .container {
    min-height: auto; /* Ajustá 50px según la altura de tu header/footer */
    display: flex;
    flex-direction: column;
    padding: 20px 10px;
    margin-top: 15px;
    margin-bottom: 15px;
    justify-content: center; /* Opcional: centra verticalmente el contenido */
  }

  html {
    height: 100%;
  }

  body {
    background-size: cover;
    background-position: center right;
    background-color: var(--color-titulos);
  }
}

/* =================================================[ TEXT ]========================================================== */
h1, h2 {
    color: var(--color-titulos);
    font-size: 24px;
    margin-bottom: 20px;
}


.titulo-subrayado {
  position: relative;
  display: inline-block;
  color: white;
  font-size: 32px;
}

.titulo-subrayado::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  background: crimson;
  bottom: -5px;
  left: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.titulo-subrayado:hover::after {
  transform: scaleX(1);
}

a {
    display: block;
    margin-top: 15px;
    color: var(--color-texto);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Tablet */
@media (max-width: 1024px) {
  h1, h2 {
    font-size: 22px;
  }

  .titulo-subrayado {
    font-size: 28px;
  }
}

/* Móvil */
@media (max-width: 768px) {
  h1, h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .titulo-subrayado {
    font-size: 24px;
  }

  a {
    font-size: 16px;
  }
}

/* =================================================[ HEADER ]========================================================== */
.logo {
    max-width: 150px;
}

.main-header {
    background: var(--color-black);
    padding: 10px 20px;
    box-shadow: var(--color-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 40px; 
}

.nav-bar {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 15px;
    padding: 0;
    margin-top: 5px;
}

.nav-list li {
    display: inline;
}

.nav-list a {
    text-decoration: none;
    color: var(--color-white);
    font-size: 15px;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: 0.3s ease-in-out;
    background: rgba(255, 255, 255, 0.2);
}

.nav-list a:hover {
    background: rgba(124, 3, 3, 0.562);
    text-decoration: underline;
}

.nav-list a.btn-logout {
    text-decoration: none;
    color: white;
    display: inline-block;
    font-size: 15px;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: 0.3s;
    background: var(--color-primario);
}

.nav-list a.btn-logout:hover {
    background: var(--color-secundario);
}

/* Oculta el botón hamburguesa en escritorio */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* Para móviles */
@media (max-width: 768px) {
    .nav-list {
        z-index: 99;
        display: none;
        flex-direction: column;
        background-color: var(--color-black2);
        position: absolute;
        top: 48px; /* ajusta según altura de tu nav */
        right: 0;
        width: 100%;
        padding: 10px 0;
        z-index: 1000;
    }

    .nav-list.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        color: white;
    }

    .nav-bar {
        position: relative;
    }

    .nav-list li {
        text-align: center;
    }

    .submenu {
        position: static; /* para que se muestre bien en vertical */
    }
}


/* =================================================[ FOOTER ]========================================================== */
footer {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 20px;
    width: 100%;
    font-size: 14px;
    box-sizing: border-box;
    margin-top: auto;

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px; /* espacio entre columnas en móvil */
    text-align: center;
}

footer .left,
footer .center,
footer .right {
    font-size: 12px;
    flex: 1;
    min-width: 200px; /* Para que no se compriman demasiado */
}

.footer-copy {
    color: var(--color-white);
    font-size: 12px;
    display: inline-flex;
    text-decoration: none;
    margin-top: 0px;
}

@media (max-width: 768px) {
    footer {
        flex-direction: column;
        text-align: center;
    }

    footer .left,
    footer .center,
    footer .right {
        padding: 5px 0;
    }
}

/* =================================================[ LOGIN ]========================================================== */
.formulario-login {
    max-width: 400px;
    margin: auto;
    padding: 20px;
    background: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.label-login {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    color: var(--color-black);
    font-size: 14px;
}

.input-login {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.input-login:focus {
    border-color: var(--color-primario);
    outline: none;
    box-shadow: var(--color-shadow);
}

.boton-login {
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    background: var(--color-primario);
    border: none;
    color: var(--color-white);
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.boton-login:hover {
    background: var(--color-secundario);
}

@media (max-width: 480px) {
  .formulario-login {
    padding: 15px;
    width: 90%;
  }

  .input-login, .boton-login {
    font-size: 14px;
    padding: 8px;
  }

  .label-login {
    font-size: 13px;
  }
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .input-login {
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  cursor: pointer;
  font-size: 18px;
  color: #999;
  user-select: none;
}


/* =================================================[ TABLAS ]========================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    min-width: 600px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table th, table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

table th {
    background-color: var(--color-black);
    color: var(--color-white);
}

table tbody tr:nth-child(even) {
    background-color: var(--color-white);
}

table a.btn {
    background-color: var(--color-primario);
    text-decoration: none;
}

table a.btn:hover {
    background-color: var(--color-secundario);
}


.export-buttons, .filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
}

.filter-item {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 768px) {
  table th, table td {
    padding: 8px;
    font-size: 13px;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-item {
    min-width: 100%;
  }

  .export-buttons, .filter-buttons {
    flex-direction: column;
    gap: 8px;
  }
}

.buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-group {
    display: flex;
    gap: 10px;
}

/* Estilo solo para móviles */
@media (max-width: 768px) {
    .buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn-group {
        justify-content: center;
    }

    .btn-group .btn {
        width: 100%;
    }
}

/* =================================================[ ADMINISTRACION ]========================================================== */
.formulario-editar {
    max-width: 90%;
    margin: auto;
    padding: 20px;
    background: var(--color-white);
    border-radius: 10px;
    box-shadow: var(--color-shadow);
}

.form-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-group div {
    width: 48%;
    display: flex;
    flex-direction: column;
}

.label-editar {
    font-weight: bold;
    display: block;
    color: var(--color-black);
    font-size: 14px;
    align-self: flex-start;
}

.input-editar, .select-editar {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    margin-bottom: 25px;
}

.input-editar:focus, .select-editar:focus {
    border-color: var(--color-primario);
    outline: none;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease-in-out;
}

.boton-editar {
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    background: var(--color-primario);
    border: none;
    color: var(--color-white);
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.boton-editar:hover {
    background: var(--color-secundario);
}

.avatar-preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--color-primario);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.boton-subir-avatar {
    display: inline-block;
    background: var(--color-primario);
    color: var(--color-white);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.boton-subir-avatar:hover {
    background: var(--color-secundario);
}

.input-avatar {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid white;
}
.submenu {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px;
    background-color: #fff;
    color: #000;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
}
.submenu a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #000;
    border-bottom: 1px solid #eee;
}
.submenu a:hover {
    background-color: #f2f2f2;
}

@media (max-width: 768px) {
  .form-group div {
    width: 100%;
  }

  .input-editar, .select-editar {
    font-size: 14px;
  }

  .boton-editar {
    font-size: 14px;
  }

  .boton-subir-avatar {
    font-size: 12px;
    padding: 8px 16px;
  }

  .avatar-preview {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 768px) {
  .submenu {
    position: static;
    box-shadow: none;
    background-color: var(--color-black2);
  }

  .submenu a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--color-white);
    border-bottom: 1px solid #eee;
  }
}

/* =================================================[ DASHOBARD ]========================================================== */
.dashboard-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.dashboard-title {
    font-size: 32px;
    color: var(--color-titulos);
    margin-bottom: 10px;
}

.dashboard-user {
    font-size: 22px;
    color: var(--color-texto);
    margin-bottom: 20px;
}

.dashboard-links {
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 10px;
    margin-bottom: 20px;
}

.btn-dashboard {
    display: flex; 
    justify-content: center; 
    align-items: center;
    padding: 10px;
    background: var(--color-primario);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: 0.3s;
    width: 50%;
    text-align: center;
    transition: background-color 0.3s, transform 0.3s ease;
}

.btn-dashboard:hover {
    background-color: var(--color-secundario);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .dashboard-container {
        max-width: 90%;
        margin: 20px auto;
        padding: 15px;
    }

    .dashboard-title {
        font-size: 28px;
    }

    .dashboard-user {
        font-size: 18px;
    }

    .btn-dashboard {
        padding: 12px;
    }
}

/* ===========================================[ FORMS, BUTTONS, MESSAGES ]====================================================== */
input, select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid var(--color-primario);
    box-sizing: border-box;
    outline: none;
    box-shadow: 0 0 5px rgba(var(--color-primario), 0.5);
}

.message h1 {
    font-size: 28px;
    font-weight: 700;
}
.message h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-titulos); /* Asegúrate de que el color esté definido */
    transition: color 0.3s ease-in-out;
    margin-bottom: 30px;
}

.message h1:hover {
    color: var(--color-secundario); /* Cambiar de color al hacer hover */
}


.btn {
    display: inline-block;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    margin: 10px;
    transition: all 0.3s ease-in-out; /* importante para suavizar */
}

.btn:hover {
    transform: scale(1.05);
    font-weight: bold;
    background-color: rgb(22, 22, 22, 0.8);
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2); /* sombra más suave */
}

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

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

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

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

.btn-logout {
    display: inline-block;
    padding: 10px;
    background: var(--color-primario);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: 0.3s;
}

.btn-logout:hover {
    background: var(--color-secundario);
}


@media (max-width: 768px) {
    .btn {
        padding: 12px;
        text-align: center;
    }
}

.input-group-precio {
  position: relative;
}

.simbolo-precio {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 16px;
  pointer-events: none;
}

.input-group-precio .form-control {
  padding-left: 24px; /* espacio para el símbolo $ */
}


/* =================================================[ TITTLE NEW ]========================================================== */

.text {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-dasharray: 70 330;
  stroke-dashoffset: 0;
  -webkit-animation: stroke 6s infinite linear;
  animation: stroke 6s infinite linear;
  font: 45px Open Sans, Impact;
  text-transform: uppercase;
  letter-spacing: 3px; /* Opcional: Espaciado entre letras */
  animation-timing-function: ease-in-out; /* Agregar suavizado */
}

.text:nth-child(5n + 1) {
  stroke: #dc3545; /* Rojo fuerte (color primario) */
  -webkit-animation-delay: -1.2s;
  animation-delay: -1.2s;
}

.text:nth-child(5n + 2) {
  stroke: #b22234; /* Rojo oscuro (color secundario) */
  -webkit-animation-delay: -2.4s;
  animation-delay: -2.4s;
}

.text:nth-child(5n + 3) {
  stroke: #000000; /* Negro */
  -webkit-animation-delay: -3.6s;
  animation-delay: -3.6s;
}

.text:nth-child(5n + 4) {
  stroke: #8b0000; /* Rojo oscuro (variación más profunda) */
  -webkit-animation-delay: -4.8s;
  animation-delay: -4.8s;
}

.text:nth-child(5n + 5) {
  stroke: #2f4f4f; /* Gris oscuro (más oscuro para equilibrio) */
  -webkit-animation-delay: -6s;
  animation-delay: -6s;
}

@-webkit-keyframes stroke {
  100% {
    stroke-dashoffset: -400;
  }
}

@keyframes stroke {
  100% {
    stroke-dashoffset: -400;
  }
}



.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--color-secundario); /* cursor */
    white-space: nowrap;
    margin: 20px auto;
    letter-spacing: 2px;
    animation: typing 3s steps(30, end), blink-caret 0.75s step-end infinite;
    display: inline; /* Cambiado de inline-block a inline */
    color: var(--color-titulos);
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--color-secundario); }
}

@media (max-width: 768px) {
  .typewriter {
    font-size: 16px; /* Reducir tamaño en pantallas pequeñas */
    letter-spacing: 1px; /* Ajustar espaciado en pantallas pequeñas */
  }
}