@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

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

/* ======== PÁGINA PRINCIPAL / LOGIN ======== */
body {
    background: #f2f4f5;
    color: #333;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* HEADER / LOGO */
header {
    width: 100%;
    padding-top: 60px;
    /* Verificar la prox para que todas figuren igual que el index*/
    display: flex;
    justify-content: center;
}

header img {
    width: 400px;
    height: auto;
    max-width: 90%;


}

/* TITULO PRINCIPAL */
main h2 {
    max-width: 600px;
    width: 90%;
    margin: 50px auto 30px auto;

    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-style: italic;
    font-size: 36px;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: center;
    color: #333;

    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.resaltado {
    font-weight: 800;
    font-style: italic;
    color: #b71c1c;
}

/* BOTONES */
.botones {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 0 auto 50px auto;
    flex-wrap: wrap;
    width: 90%;
    max-width: 850px;
    /* Limita el ancho del contenedor */

}

.btn {
    width: 384.45px;
    height: 99px;
    line-height: 99px;
    text-align: center;

    background: #b71c1c;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;

    border: none;
    border-radius: 15px;
    text-decoration: none;
    cursor: pointer;

    box-shadow: 5px 5px 7px rgba(0, 0, 0, 0.25);

    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* DESCRIPCIÓN */
.descripcion {
    max-width: 992px;
    width: 90%;
    margin: 0 auto;
    padding: 20px;

    background: #000000;
    opacity: 1;

    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    text-align: justify;
    border-radius: 10px;
}


.footer {
    width: 100%;
    margin-top: auto;
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center;
    font-size: 13px;
    color: #333;
    background-color: #f2f4f5;
}

.footer-top {
    margin-bottom: 10px;
}

.footer-top .social-icons a {
    margin: 0 8px;
    color: #000;
    font-size: 18px;
    text-decoration: none;
}

.footer-top p {
    margin: 8px 0;
    font-weight: 500;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.footer-bottom p {
    margin: 0;
    font-size: 12px;
    color: #444;
}

.footer-bottom span {
    margin: 5px 6px;
    display: inline-block;
}

.footer-bottom i {
    margin-right: 5px;
}


/* Contenedor principal */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    box-sizing: border-box;
}

/* Ícono de inicio */
.home-icon-link {
    position: absolute;
    top: 30px;
    left: 30px;
}

.home-icon {
    width: 96px;
    height: 96px;
}

/* Logo */
.logo {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 25px;
}

/* Formulario */
.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 20px;
}

/* email y contraseña */
.input-group {
    width: 100%;
}

input[type="email"],
input[type="password"],
input[type="text"],
/* Agregado */
input[type="tel"],
/* Agregado */
input[type="url"],
/* Agregado */
input[type="file"] {
    width: 100%;
    height: 75px;
    padding: 0 20px;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Placeholder */
input::placeholder {
    color: #C5C5C5;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 24px;
}

/* Botón "Iniciar Sesión" */
.submit-btn {
    width: 100%;
    height: 70px;
    margin-top: 5px;
    background-color: #ac0505;
    color: #fff;
    border: none;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #920404;
}

/* Enlaces de texto */
.forgot-password,
.no-account {
    color: #ac0505;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

.no-account {
    margin-top: 10px;
}

/* Botón "Entrar con Google" */
.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 53.76px;
    background-color: #ecf0f1;
    border: 3px solid #C3C3C3;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    color: #ac0505;
}

.google-login-btn span {
    color: #ac0505;
    margin-right: 5px;
}

.google-login-btn img {
    width: 30px;
    height: 45px;
    vertical-align: middle;


}

/* Botón "Crear una cuenta" */
.create-account-btn {
    display: block;
    width: 100%;
    height: 65px;
    line-height: 65px;
    background-color: transparent;
    color: #ac0505;
    border: 2px solid #ac0505;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}

.create-account-btn:hover {
    background-color: #ac0505;
    color: #fff;
}

.logo-upload-group {
    width: 100%;
    max-width: 350px;
    margin-bottom: 15px;
}

/*botón de carga de logo */
.logo-upload-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 20px;
    background-color: #fff;
    border: 3px solid #C3C3C3;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s;
}

.logo-upload-btn:hover {
    background-color: #f5f5f5;
}

.logo-upload-btn img {
    width: 24px;
    height: auto;
    margin-right: 10px;
}

#logoFileName {
    font-size: 0.8rem;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* ======== ESTILOS DE NAVEGACIÓN (NAV) ======== */

/* NAV Principal */
.main-nav {
    width: 100%;
    background-color: #AC0505;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Botón del Menú Desplegable  */
.menu-toggle-btn {
    background-color: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 5px 10px;
    transition: background-color 0.2s ease;
    border-radius: 5px;
    
}

/* ======== ESTILOS DEL MENÚ GENERAL DE USUARIO ======== */
.user-dropdown-content {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 250px; 
    height: 100vh; 
    
    transform: translateX(-100%); 
    transition: transform 0.3s ease-in-out; /* Animación de entrada/salida */
    
    /* Estilos Visuales */
    background-color: #7D0000; 
    box-shadow: 2px 0 5px rgba(0,0,0,0.5); 
    z-index: 1000; 
    overflow-y: auto; 
    padding-top: 60px; 
    text-align: left;
}

/* Estado Activo de JS */
.user-dropdown-content.show-user-menu {
    transform: translateX(0); 
}

/* Estilos de los enlaces */
.user-dropdown-content a {
    padding: 15px 20px;
    text-decoration: none;
    display: block;
    font-size: 16px;
    background-color: transparent; 
    font-weight: 500;
     color: white;
}

.user-dropdown-content a:hover {
    background-color: #AC0505; 
    color: white; 
}

/* Estilo para el campo de búsqueda "busca un servicio o empresa" */
.nav-search-input {
    width: 100%;
    height: 40px;
    padding: 0 20px;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Contenedor del Logo en el NAV */
.nav-logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-logo-container img {
    height: 60px;
    width: auto;
}

/* placeholder */
.nav-search-input::placeholder {
    color: #C5C5C5;
    /* Color solicitado */
    font-weight: 500;
    font-size: 1rem;
}

/* Contenedor del buscador */
.search-container {
    flex-grow: 1;
    max-width: 500px;
    margin: 0 20px;
}

/* ======== ESTILOS DE HOME (Contenido principal) ======== */

.home-title {
    margin: 40px auto 10px auto;
    font-size: 32px;
    font-weight: 500;
    color: #333;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-content: center;
    gap: 20px 10px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 60px auto;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    order: 0;
}

.category-item span {
    order: 1;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.category-icon {
    order: 2;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.category-icon:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-icon i {
    display: none;
}

/* ======== ESTILOS DEL MENÚ DESPLEGABLE DE PERFIL USUARIO Y EMPRESA ======== */

.dropdown-menu-container {
    position: relative;
    display: inline-block;
    background: #7D0000;
    border-radius: 5px;
    padding: 5px;
}

.profile-dropdown-btn {
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 5px;

}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    border: 1px solid #941616;
    background-color: #AC0505;
    min-width: 200px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    z-index: 101;
    border-radius: 5px;
    overflow: hidden;
    text-align: left;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 16px;
}

.dropdown-content a:hover {
    background-color: #7D0000;
}

.dropdown-content .logout-link {
    font-weight: 600;
}

.show {
    display: block;
}


/* Sección de Características */
.features-section {
    width: 100%;
    padding: 60px 20px;
    text-align: center;
}

.features-section h3 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.features-section p {
    font-size: 18px;
    color: #b71c1c;
    font-weight: 500;
    margin-bottom: 50px;
}

/* Contenedor de Tarjetas de Características */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    width: 300px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    background: #fff;
}

.feature-card i {
    font-size: 40px;
    color: #ac0505;
    margin-bottom: 10px;
}

.feature-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.feature-card p {
    font-size: 14px;
    color: #555;
    margin: 0;
}

/* Pie de página */
.footer {
    width: 100%;
    margin-top: 40px;
    text-align: center;
    font-size: 13px;
    color: #333;
}

.footer-top {
    margin-bottom: 10px;
}

.footer-top .social-icons a {
    margin: 0 8px;
    color: #000;
    font-size: 18px;
    text-decoration: none;
}

.footer-top p {
    margin: 8px 0;
    font-weight: 500;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.footer-bottom p {
    margin: 0;
    font-size: 12px;
    color: #444;
}

.footer-bottom span {
    margin: 5px 6px;
    display: inline-block;
}

.footer-bottom i {
    margin-right: 5px;
}

/* Media Query */
@media (min-width: 769px) {
    .logo {
        width: 383px;
        height: 138px;
        max-width: none;
    }

    .login-container {
        width: 100%;
        max-width: 400px;
        padding: 20px;
        box-sizing: border-box;
    }

    .input-group,
    .submit-btn,
    .create-account-btn {
        width: 360px;
        max-width: none;
    }

    .google-login-btn {
        width: 195px;
        max-width: none;
    }
}

/* Media Query para móviles*/
@media (max-width: 768px) {
    .home-icon-link {
        top: 20px;
        left: 15px;
    }

    .home-icon {
        width: 40px;
        height: 40px;
    }

    .logo {
        width: 180px;
        margin-top: 60px;
    }

    .botones {
        flex-direction: column;
        gap: 15px;
        width: 80%;
    }

    .btn {
        width: 100%;
        min-width: 0;
        height: 60px;
        line-height: 60px;
    }

    main h2 {
        font-size: 24px;
        margin: 30px auto 20px auto;
    }

    header img {
        width: 200px;
    }

    .main-nav {
        flex-wrap: wrap;
        padding: 10px;
        /* Ajuste para móvil */
    }

    .nav-logo-container {
        position: static;
        /* Restaura el flujo normal en móvil */
        transform: none;
        order: 1;
        /* Posiciona el logo después del botón de menú */
        flex-grow: 1;
        text-align: center;
    }

    .menu-toggle-btn:first-child {
        order: 0;
    }

    .nav-icons {
        order: 2;
    }

    /* BUSCADOR debajo del título en móvil */
    .search-container {
        order: 3;
        /* Mueve el buscador a la parte de abajo en móvil */
        width: 90%;
        max-width: 100%;
        margin-top: 15px;
        margin-left: auto;
        margin-right: auto;
    }


    /* CATEGORÍAS*/
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px 5px;
        max-width: 100%;
        width: 90%;
        margin: 0 auto 40px auto;
    }

    .category-span {
        font-size: 11px;
    }

    .category-icon {
        width: 50px;
        height: 50px;
        border-radius: 8px;
    }


    /* FEATURES SECTION */
    .features-section {
        padding: 30px 10px;
    }

    .features-section h3 {
        font-size: 22px;
    }

    .features-section p {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .cards-container {
        /* Permite que las tarjetas se apilen o usen 2 columnas */
        gap: 15px;
    }

    .feature-card {
        /* 100% en móvil para que se apilen bien */
        width: 90%;
        max-width: 350px;
        margin: 0 auto;
        padding: 15px;
    }

    .feature-card i {
        font-size: 30px;
    }

    .feature-card h4 {
        font-size: 16px;
    }

    .feature-card p {
        font-size: 12px;
    }
}