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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.header {
    background-color: #6c757d;
    color: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 30px;
    width: 60px;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.nav {
    margin-left: auto;
}

.btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    display: inline-block;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
}

.btn-success {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.hero {
    background-color: #f8f9fa;
    color: #2c3e50;
    text-align: center;
    padding: 4rem 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #6c757d;
}

.features {
    padding: 3rem 2rem;
    background-color: white;
}

.features h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.workers-section {
    padding: 3rem 2rem;
    background-color: #ecf0f1;
}

.workers-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.workers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.worker-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.worker-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.form-group:last-child {
    display: flex;
    gap: 0.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Mejorar experiencia táctil en móviles */
@media (max-width: 768px) {
    .btn {
        min-height: 44px; /* Tamaño mínimo para toques */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    input, select, textarea {
        font-size: 16px !important; /* Prevenir zoom automático en iOS */
    }
    
    .modal {
        -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    }
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    display: none;
}

.success-message {
    color: #27ae60;
    font-size: 1rem;
    margin: 1rem 0;
    text-align: center;
    display: none;
}

/* Estilos para checkboxes y labels */
.checkbox-group {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
    accent-color: #3498db;
}

.checkbox-group label {
    display: inline;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"]:focus + label {
    color: #3498db;
}

/* Estilos para enlaces dentro de labels de checkbox */
.checkbox-group label a {
    color: #3498db;
    text-decoration: underline;
    font-weight: bold;
}

.checkbox-group label a:hover {
    color: #2980b9;
}

/* Mejorar accesibilidad en móviles para enlaces */
@media (max-width: 768px) {
    .checkbox-group label a {
        padding: 2px 4px;
        display: inline-block;
    }
}

/* Estilos específicos para el modal de selección de tipo */
.modal-content h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

#register-type-modal .modal-content {
    text-align: center;
}

#register-type-modal .btn {
    margin: 0.5rem;
    min-width: 150px;
}

/* Estilos para la página de perfil */
.profile-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.profile-section {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-item label {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    color: #555;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
}

/* Estilo especial para experiencia */
.info-item:nth-child(1) {
    border-left-color: #27ae60;
}

.info-item:nth-child(2) {
    border-left-color: #e67e22;
}

.info-item:nth-child(3) {
    border-left-color: #9b59b6;
}

.info-item:nth-child(4) {
    border-left-color: #e74c3c;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.communication-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.admin-actions {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .logo-img {
        height: 25px;
        width: 50px;
    }

    .nav-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .feature-grid,
    .workers-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .profile-info {
        grid-template-columns: 1fr;
    }
    
    .profile-section {
        padding: 1.5rem;
    }
    
    .profile-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .features,
    .workers-section {
        padding: 2rem 1rem;
    }
    
    .profile-section {
        padding: 1rem;
    }
    
    .profile-info {
        gap: 0.5rem;
    }
    
    .info-item label {
        font-size: 0.8rem;
    }
    
    .info-item span {
        font-size: 1rem;
    }
    
    /* Mejoras específicas para modales en móviles */
    .modal-content {
        margin: 0.5rem;
        padding: 1rem;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-content h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 0.8rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.4rem;
        font-size: 0.9rem;
    }
    
    .checkbox-group {
        margin: 0.8rem 0;
        font-size: 0.9rem;
    }
    
    .checkbox-group input[type="checkbox"] {
        transform: scale(1.1);
    }
    
    /* Botones en modales móviles */
    .form-group:last-child {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-group:last-child .btn {
        width: 100%;
        margin: 0.2rem 0;
    }
    
    /* Modal de selección de tipo */
    #register-type-modal .btn {
        min-width: 120px;
        margin: 0.3rem;
        font-size: 0.9rem;
    }
    
    /* Ajustes para campos de trabajador */
    #worker-fields .form-group {
        margin-bottom: 0.6rem;
    }
}
